@nutui/nutui-react-taro 2.6.13 → 2.6.15-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/CalendarItem.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Empty/style/style.css +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/InfiniteLoading.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/WaterMark.js +1 -1
- package/dist/esm/{address.taro-CtVpobLw.js → address.taro-BYzOGUEN.js} +1 -1
- package/dist/esm/{calendar.taro-Bf5owfGd.js → calendar.taro-BXrHr8bg.js} +1 -1
- package/dist/esm/{calendaritem.taro-PLHReAvU.js → calendaritem.taro-CRultyrO.js} +3 -1
- package/dist/esm/{cascader.taro-y9_hSUSJ.js → cascader.taro-jxe42b68.js} +2 -2
- package/dist/esm/{formitem.taro-tLWeQ0P5.js → formitem.taro-Dmt5-wxG.js} +3 -2
- package/dist/esm/{infiniteloading.taro-g1RbqnSS.js → infiniteloading.taro-TbcBB0Qr.js} +7 -7
- package/dist/esm/{menu.taro-JDg_-XpO.js → menu.taro-CrPdDbYM.js} +1 -1
- package/dist/esm/{menuitem.taro-BFfGgTms.js → menuitem.taro-DMV3j4DK.js} +4 -2
- package/dist/esm/nutui-react.es.js +11 -11
- package/dist/esm/{sticky.taro-DZzgkigZ.js → sticky.taro-Zbz7wQH8.js} +29 -31
- package/dist/esm/{uploader.taro-CiamsRGo.js → uploader.taro-DfO2HWvy.js} +13 -11
- package/dist/esm/{watermark.taro-BR12yZQt.js → watermark.taro-CZ6R5FlJ.js} +3 -3
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +61 -50
- package/dist/nutui.react.umd.js +61 -50
- package/dist/packages/empty/empty.scss +1 -1
- package/dist/packages/uploader/uploader.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/styles/variables-jmapp.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/form/types.d.ts +1 -0
- package/dist/types/packages/griditem/types.d.ts +13 -0
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
- package/dist/types/packages/watermark/watermark.d.ts +2 -0
- package/dist/types/packages/watermark/watermark.taro.d.ts +10 -0
- package/dist/types/utils/get-scroll-parent.d.ts +1 -1
- package/dist/types/utils/use-client-rect.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/packages/form/usewatch.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v2.6.14
|
|
2
|
+
`2024-07-19`
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
* :sparkles: feat(menuitem): 新增css类名,增强自定义样式能力 (#2443) @Alex-huxiyang
|
|
6
|
+
* :sparkles: feat(empty): add css variable nutui-empty-background-color (#2451) @Alex-huxiyang
|
|
7
|
+
* :sparkles: feat(infiniteLoading): 继承 scrollView 的 props 类型 (#2441) @oasis-cloud
|
|
8
|
+
* :bug: fix(cascader): 初始化设置value未成功选中 (#2435) @Alex-huxiyang
|
|
9
|
+
* :bug: fix(swiper): display abnormal when dir = 'rtl' (#2454) @Alex-huxiyang
|
|
10
|
+
* :bug: fix(form): 兼容校验时机 (#2437) @Alex-huxiyang
|
|
11
|
+
* :bug: fix(form): 在FromInstance增加validateFields方法的定义 (#2450) @jinjl
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# v2.6.13
|
|
15
|
+
`2024-07-12`
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* :sparkles: feat: tabs滚动条兼容火狐浏览器 (#2431) @JoanneXu6677
|
|
19
|
+
* :sparkles: feat(drag): add the ability to support onDrag, onDragStart, onDragEnd callbacks (#2418) @Alex-huxiyang
|
|
20
|
+
* :bug: fix(formItem): validateTrigger无法正确触发校验 (#2433) @Alex-huxiyang
|
|
21
|
+
* :bug: fix: 日历组件滚动到顶部时 出现空白问题 (#2409) @522109452
|
|
22
|
+
* :bug: fix(imagepreview): 无法在预期情景正确关闭图片的异常 (#2421) @Alex-huxiyang
|
|
23
|
+
|
|
24
|
+
|
|
1
25
|
# v2.6.12
|
|
2
26
|
`2024-07-05`
|
|
3
27
|
|
package/dist/esm/Address.js
CHANGED
package/dist/esm/Calendar.js
CHANGED
package/dist/esm/CalendarItem.js
CHANGED
package/dist/esm/Cascader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-
|
|
1
|
+
.nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-empty-background-color, #fff)}.nut-empty-image{width:var(--nutui-empty-image-size, 160px);height:var(--nutui-empty-image-size, 160px)}.nut-empty-image .img{width:100%;height:100%}.nut-empty-image img,.nut-empty-image image{width:100%;height:100%}.nut-empty-title{margin-top:var(--nutui-empty-title-margin-top, 0px);margin-bottom:var(--nutui-empty-title-margin-bottom, 8px);color:var(--nutui-gray-7, #1a1a1a);font-size:var(--nutui-font-size-3, 14px);line-height:var(--nutui-empty-title-line-height, var(--nutui-font-size-3, 14px))}.nut-empty-description{margin-top:var(--nutui-empty-description-margin-top, 0px);color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-font-size-2, 12px);line-height:var(--nutui-empty-description-line-height, 1.2)}.nut-empty-small .nut-empty-image{width:var(--nutui-empty-image-small-size, 120px);height:var(--nutui-empty-image-small-size, 120px)}.nut-empty-actions{display:flex;margin-top:16px}.nut-empty-actions .nut-button.nut-empty-actions-left,.nut-empty-actions .nut-button.nut-empty-actions-right{height:28px;padding:0 12px;font-weight:400}.nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:16px}[dir=rtl] .nut-empty-actions .nut-button.nut-empty-actions-left,.nut-rtl .nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:0;margin-left:16px}
|
package/dist/esm/Form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { u as useForm, S as SECRET, C as Context, F as FormItem } from "./formitem.taro-
|
|
3
|
+
import { u as useForm, S as SECRET, C as Context, F as FormItem } from "./formitem.taro-Dmt5-wxG.js";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
5
|
import { C as Cell } from "./cell.taro-CVFlcls2.js";
|
|
6
6
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { labelPosition: "right", starPosition: "left", divider: false, onFinish: (values) => {
|
package/dist/esm/FormItem.js
CHANGED
package/dist/esm/Menu.js
CHANGED
package/dist/esm/MenuItem.js
CHANGED
package/dist/esm/Sticky.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-progress{display:flex;align-items:center;position:relative;width:100%}.nut-progress-outer{flex:auto;border-radius:var(--nutui-progress-border-radius, 12px);height:var(--nutui-progress-height, 10px);background:var(--nutui-progress-background, var(--nutui-gray-3, #f6f6f6))}.nut-progress-outer .nut-progress-active:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--nutui-progress-border-radius, 12px);animation:progressActive 2s ease-in-out infinite}.nut-progress-inner{height:100%;display:flex;flex-direction:column;justify-content:center;transition:all .4s;border-radius:var(--nutui-progress-border-radius, 12px);background:var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #f53d4d) 0%, var(--nutui-color-primary-stop-2, #fa2c19) 100%))}.nut-progress-text{display:flex;align-items:center;position:absolute;top:var(--nutui-progress-text-position-top, -4px);bottom:var(--nutui-progress-text-position-bottom, -4px);transition:all .4s;transform:translate(-50%)}.nut-progress-text-inner{display:flex;align-items:center;height:100%;width:100%;color:var(--nutui-progress-text-color, var(--nutui-color-primary-text, #ffffff));padding:var(--nutui-progress-text-padding, 0 5px);border-radius:var(--nutui-progress-text-border-radius, 5px);font-size:var(--nutui-progress-text-font-size, 9px);line-height:1;background:var(--nutui-progress-text-background, var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #f53d4d) 0%, var(--nutui-color-primary-stop-2, #fa2c19) 100%)))}@keyframes progressActive{0%{background:#ffffff1a;width:0}20%{background:#ffffff80;width:0}to{background:#fff0;width:100%}}[dir=rtl] .nut-progress-text,.nut-rtl .nut-progress-text{transform:translate(50%)}.nut-uploader{position:relative;display:flex;flex-wrap:wrap}.nut-uploader-slot{position:relative}.nut-uploader-upload{position:relative;display:flex;align-items:center;justify-content:center;background:var(--nutui-uploader-background, var(--nutui-gray-3, #f6f6f6));width:var(--nutui-uploader-image-width, 100px);height:var(--nutui-uploader-image-height, 100px);border:var(--nutui-uploader-image-border, 0px);border-radius:var(--nutui-uploader-image-border-radius, 4px)}.nut-uploader-icon{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--nutui-uploader-image-color, var(--nutui-gray-5, #8c8c8c))}.nut-uploader-icon i,.nut-uploader-icon .nut-icon{color:var(--nutui-uploader-image-color, var(--nutui-gray-5, #8c8c8c));margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-icon-tip{font-size:var(--nutui-uploader-image-icon-tip-font-size, 12px)}.nut-uploader-input{position:absolute!important;top:0;left:0;width:100%!important;height:100%!important;overflow:hidden;cursor:pointer;opacity:0}.nut-uploader-input:disabled{cursor:not-allowed}.nut-uploader-upload-disabled{background:var(--nutui-uploader-background-disabled, var(--nutui-gray-3, #f6f6f6));color:var(--nutui-uploader-image-disabled, var(--nutui-color-text-disabled, #bfbfbf))}.nut-uploader-upload-disabled .nut-uploader-icon i,.nut-uploader-upload-disabled .nut-uploader-icon .nut-icon{color:var(--nutui-uploader-image-disabled, var(--nutui-color-text-disabled, #bfbfbf));margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-preview{position:relative;margin-right:var(--nutui-uploader-preview-margin-right, 10px);margin-bottom:var(--nutui-uploader-preview-margin-bottom, 10px);border-radius:var(--nutui-uploader-image-border-radius, 4px);box-shadow:0 2px 10px #0000001a}.nut-uploader-preview-progress{position:absolute;left:0;top:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background:var(--nutui-uploader-preview-progress-background, var(--nutui-black-10, rgba(0, 0, 0, .7)));border-radius:var(--nutui-uploader-image-border-radius, 4px)}.nut-uploader-preview-progress i{margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-preview-progress-msg{color:var(--nutui-gray-5, #8c8c8c);font-size:12px}.nut-uploader-preview.list{width:100%;margin-right:0;margin-bottom:0;margin-top:10px;box-shadow:0 2px 10px #00000003}.nut-uploader-preview-list{width:100%;height:32px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background-color:var(--nutui-gray-2, #f8f8f8)}.nut-uploader-preview-list .nut-uploader-preview-img-file-name{display:flex;align-items:center;-webkit-line-clamp:1;padding:2px;height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nut-uploader-preview-list .nut-progress{position:absolute;left:0;right:0;bottom:0}.nut-uploader-preview-list .nut-progress .nut-progress-outer{height:2px!important}.nut-uploader-preview .close{position:absolute;right:var(--nutui-uploader-preview-close-right, 0px);top:var(--nutui-uploader-preview-close-top, 0px);transform:translate(50%,-50%);z-index:1}.nut-uploader-preview-img{position:relative;width:var(--nutui-uploader-image-width, 100px);height:var(--nutui-uploader-image-height, 100px);border-radius:var(--nutui-uploader-image-border-radius, 4px);overflow:hidden}.nut-uploader-preview-img i{color:var(--nutui-gray-7, #1a1a1a)}.nut-uploader-preview-img .tips{position:absolute;bottom:0;left:0;font-size:12px;color:#fff;text-align:center;box-sizing:border-box;height:var(--nutui-uploader-preview-tips-height, 24px);line-height:var(--nutui-uploader-preview-tips-height, 24px);border-radius:var(--nutui-uploader-image-border-radius, 4px);border-top-left-radius:0;border-top-right-radius:0;padding:var(--nutui-uploader-preview-tips-padding, 0 5px);background:var(--nutui-uploader-preview-tips-background, var(--nutui-black-7));width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nut-uploader-preview-img-c{
|
|
1
|
+
.nut-progress{display:flex;align-items:center;position:relative;width:100%}.nut-progress-outer{flex:auto;border-radius:var(--nutui-progress-border-radius, 12px);height:var(--nutui-progress-height, 10px);background:var(--nutui-progress-background, var(--nutui-gray-3, #f6f6f6))}.nut-progress-outer .nut-progress-active:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--nutui-progress-border-radius, 12px);animation:progressActive 2s ease-in-out infinite}.nut-progress-inner{height:100%;display:flex;flex-direction:column;justify-content:center;transition:all .4s;border-radius:var(--nutui-progress-border-radius, 12px);background:var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #f53d4d) 0%, var(--nutui-color-primary-stop-2, #fa2c19) 100%))}.nut-progress-text{display:flex;align-items:center;position:absolute;top:var(--nutui-progress-text-position-top, -4px);bottom:var(--nutui-progress-text-position-bottom, -4px);transition:all .4s;transform:translate(-50%)}.nut-progress-text-inner{display:flex;align-items:center;height:100%;width:100%;color:var(--nutui-progress-text-color, var(--nutui-color-primary-text, #ffffff));padding:var(--nutui-progress-text-padding, 0 5px);border-radius:var(--nutui-progress-text-border-radius, 5px);font-size:var(--nutui-progress-text-font-size, 9px);line-height:1;background:var(--nutui-progress-text-background, var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #f53d4d) 0%, var(--nutui-color-primary-stop-2, #fa2c19) 100%)))}@keyframes progressActive{0%{background:#ffffff1a;width:0}20%{background:#ffffff80;width:0}to{background:#fff0;width:100%}}[dir=rtl] .nut-progress-text,.nut-rtl .nut-progress-text{transform:translate(50%)}.nut-uploader{position:relative;display:flex;flex-wrap:wrap}.nut-uploader-slot{position:relative}.nut-uploader-upload{position:relative;display:flex;align-items:center;justify-content:center;background:var(--nutui-uploader-background, var(--nutui-gray-3, #f6f6f6));width:var(--nutui-uploader-image-width, 100px);height:var(--nutui-uploader-image-height, 100px);border:var(--nutui-uploader-image-border, 0px);border-radius:var(--nutui-uploader-image-border-radius, 4px)}.nut-uploader-icon{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--nutui-uploader-image-color, var(--nutui-gray-5, #8c8c8c))}.nut-uploader-icon i,.nut-uploader-icon .nut-icon{color:var(--nutui-uploader-image-color, var(--nutui-gray-5, #8c8c8c));margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-icon-tip{font-size:var(--nutui-uploader-image-icon-tip-font-size, 12px)}.nut-uploader-input{position:absolute!important;top:0;left:0;width:100%!important;height:100%!important;overflow:hidden;cursor:pointer;opacity:0}.nut-uploader-input:disabled{cursor:not-allowed}.nut-uploader-upload-disabled{background:var(--nutui-uploader-background-disabled, var(--nutui-gray-3, #f6f6f6));color:var(--nutui-uploader-image-disabled, var(--nutui-color-text-disabled, #bfbfbf))}.nut-uploader-upload-disabled .nut-uploader-icon i,.nut-uploader-upload-disabled .nut-uploader-icon .nut-icon{color:var(--nutui-uploader-image-disabled, var(--nutui-color-text-disabled, #bfbfbf));margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-preview{position:relative;margin-right:var(--nutui-uploader-preview-margin-right, 10px);margin-bottom:var(--nutui-uploader-preview-margin-bottom, 10px);border-radius:var(--nutui-uploader-image-border-radius, 4px);box-shadow:0 2px 10px #0000001a}.nut-uploader-preview-progress{position:absolute;left:0;top:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background:var(--nutui-uploader-preview-progress-background, var(--nutui-black-10, rgba(0, 0, 0, .7)));border-radius:var(--nutui-uploader-image-border-radius, 4px)}.nut-uploader-preview-progress i{margin-bottom:var(--nutui-uploader-image-icon-margin-bottom, 6px)}.nut-uploader-preview-progress-msg{color:var(--nutui-gray-5, #8c8c8c);font-size:12px}.nut-uploader-preview.list{width:100%;margin-right:0;margin-bottom:0;margin-top:10px;box-shadow:0 2px 10px #00000003}.nut-uploader-preview-list{width:100%;height:32px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background-color:var(--nutui-gray-2, #f8f8f8)}.nut-uploader-preview-list .nut-uploader-preview-img-file-name{display:flex;align-items:center;-webkit-line-clamp:1;padding:2px;height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nut-uploader-preview-list .nut-progress{position:absolute;left:0;right:0;bottom:0}.nut-uploader-preview-list .nut-progress .nut-progress-outer{height:2px!important}.nut-uploader-preview .close{position:absolute;right:var(--nutui-uploader-preview-close-right, 0px);top:var(--nutui-uploader-preview-close-top, 0px);transform:translate(50%,-50%);z-index:1}.nut-uploader-preview-img{position:relative;width:var(--nutui-uploader-image-width, 100px);height:var(--nutui-uploader-image-height, 100px);border-radius:var(--nutui-uploader-image-border-radius, 4px);overflow:hidden}.nut-uploader-preview-img i{color:var(--nutui-gray-7, #1a1a1a)}.nut-uploader-preview-img .tips{position:absolute;bottom:0;left:0;font-size:12px;color:#fff;text-align:center;box-sizing:border-box;height:var(--nutui-uploader-preview-tips-height, 24px);line-height:var(--nutui-uploader-preview-tips-height, 24px);border-radius:var(--nutui-uploader-image-border-radius, 4px);border-top-left-radius:0;border-top-right-radius:0;padding:var(--nutui-uploader-preview-tips-padding, 0 5px);background:var(--nutui-uploader-preview-tips-background, var(--nutui-black-7));width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nut-uploader-preview-img-c{display:flex;justify-content:center;align-items:center;height:100%;position:initial;border-radius:var(--nutui-uploader-image-border-radius, 4px)}.nut-uploader-preview-img-file{height:100%;width:100%;display:flex;align-items:center;justify-content:center;transition:all .3s}.nut-uploader-preview-img-file-name{display:flex;width:90%;font-size:12px;color:var(--nutui-gray-6, #595959);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all}.nut-uploader-preview-img-file-name.error{color:red!important}.nut-uploader-preview-img-file-name.success{color:#1890ff!important}.nut-uploader-preview-img-file-name .nut-icon-Link{flex-shrink:0}[dir=rtl] .nut-uploader-input,.nut-rtl .nut-uploader-input{left:auto;right:0}[dir=rtl] .nut-uploader-preview,.nut-rtl .nut-uploader-preview{margin-right:0;margin-left:var(--nutui-uploader-preview-margin-right, 10px)}[dir=rtl] .nut-uploader-preview-progress,.nut-rtl .nut-uploader-preview-progress{left:auto;right:0}[dir=rtl] .nut-uploader-preview.list,.nut-rtl .nut-uploader-preview.list{margin-right:0;margin-left:0}[dir=rtl] .nut-uploader-preview .close,.nut-rtl .nut-uploader-preview .close{right:auto;left:var(--nutui-uploader-preview-close-right, 0px);transform:translate(-50%,-50%)}[dir=rtl] .nut-uploader-preview-img .tips,.nut-rtl .nut-uploader-preview-img .tips{left:auto;right:0}
|
package/dist/esm/Uploader.js
CHANGED
package/dist/esm/WaterMark.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Check, Location, ArrowLeft } from "@nutui/icons-react-taro";
|
|
|
4
4
|
import { P as Popup } from "./popup.taro-CR3JyuJV.js";
|
|
5
5
|
import { ScrollView } from "@tarojs/components";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
7
|
-
import { C as Cascader } from "./cascader.taro-
|
|
7
|
+
import { C as Cascader } from "./cascader.taro-jxe42b68.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
10
10
|
const defaultProps$2 = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef } from "react";
|
|
2
2
|
import { P as Popup } from "./popup.taro-CR3JyuJV.js";
|
|
3
|
-
import { C as CalendarItem } from "./calendaritem.taro-
|
|
3
|
+
import { C as CalendarItem } from "./calendaritem.taro-CRultyrO.js";
|
|
4
4
|
import { U as Utils } from "./date-CYwRNlGq.js";
|
|
5
5
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
@@ -313,8 +313,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
313
313
|
};
|
|
314
314
|
useEffect(() => {
|
|
315
315
|
setCurrentDate(resetDefaultValue() || []);
|
|
316
|
-
popup && resetRender();
|
|
317
316
|
}, [defaultValue]);
|
|
317
|
+
useEffect(() => {
|
|
318
|
+
popup && resetRender();
|
|
319
|
+
}, [currentDate]);
|
|
318
320
|
const scrollToDate = (date) => {
|
|
319
321
|
if (Utils.compareDate(date, propStartDate)) {
|
|
320
322
|
date = propStartDate;
|
|
@@ -209,7 +209,7 @@ const InternalCascader = (props, ref) => {
|
|
|
209
209
|
});
|
|
210
210
|
const syncValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
211
211
|
const currentValue = innerValue;
|
|
212
|
-
if (currentValue === void 0 || currentValue
|
|
212
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
if (currentValue.length === 0) {
|
|
@@ -237,7 +237,7 @@ const InternalCascader = (props, ref) => {
|
|
|
237
237
|
state.initLoading = false;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
if (needToSync.length && currentValue
|
|
240
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
241
241
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
242
242
|
pathNodes.forEach((node, index) => {
|
|
243
243
|
state.tabsCursor = index;
|
|
@@ -42,7 +42,7 @@ class FormStore {
|
|
|
42
42
|
this.store = values;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
this.setFieldsValue = (newStore) => {
|
|
45
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
46
46
|
this.store = Object.assign(Object.assign({}, this.store), newStore);
|
|
47
47
|
this.fieldEntities.forEach((entity) => {
|
|
48
48
|
const { name } = entity.props;
|
|
@@ -61,6 +61,7 @@ class FormStore {
|
|
|
61
61
|
item.entity.onStoreChange("update");
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
+
needValidate && this.validateFields();
|
|
64
65
|
};
|
|
65
66
|
this.setCallback = (callback) => {
|
|
66
67
|
this.callbacks = Object.assign(Object.assign({}, this.callbacks), callback);
|
|
@@ -212,7 +213,7 @@ class FormItem extends React__default.Component {
|
|
|
212
213
|
if (this.props.getValueFromEvent) {
|
|
213
214
|
next = this.props.getValueFromEvent(...args);
|
|
214
215
|
}
|
|
215
|
-
setFieldsValue({ [name]: next });
|
|
216
|
+
setFieldsValue({ [name]: next }, false);
|
|
216
217
|
} });
|
|
217
218
|
const { validateTrigger } = this.props;
|
|
218
219
|
let validateTriggers = [this.props.trigger || "onChange"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
1
|
+
import { _ as __rest, a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { ScrollView } from "@tarojs/components";
|
|
@@ -9,7 +9,7 @@ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type:
|
|
|
9
9
|
const classPrefix = `nut-infiniteloading`;
|
|
10
10
|
const InfiniteLoading = (props) => {
|
|
11
11
|
const { locale } = useConfig();
|
|
12
|
-
const { children, type, hasMore, threshold, target, pullRefresh, pullingText, loadingText, loadMoreText, className, onRefresh, onLoadMore, onScroll } =
|
|
12
|
+
const _a = Object.assign(Object.assign({}, defaultProps), props), { children, type, hasMore, threshold, target, pullRefresh, pullingText, loadingText, loadMoreText, className, onRefresh, onLoadMore, onScroll } = _a, rest = __rest(_a, ["children", "type", "hasMore", "threshold", "target", "pullRefresh", "pullingText", "loadingText", "loadMoreText", "className", "onRefresh", "onLoadMore", "onScroll"]);
|
|
13
13
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
14
14
|
const [topDisScoll, setTopDisScoll] = useState(0);
|
|
15
15
|
const refreshTop = useRef(null);
|
|
@@ -29,8 +29,8 @@ const InfiniteLoading = (props) => {
|
|
|
29
29
|
const getScrollHeight = () => {
|
|
30
30
|
const parentElement = getParentElement("scroller");
|
|
31
31
|
parentElement.boundingClientRect((rect) => {
|
|
32
|
-
var
|
|
33
|
-
scrollHeight.current = (
|
|
32
|
+
var _a2;
|
|
33
|
+
scrollHeight.current = (_a2 = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _a2 !== void 0 ? _a2 : 0;
|
|
34
34
|
}).exec();
|
|
35
35
|
};
|
|
36
36
|
const getStyle = () => {
|
|
@@ -51,8 +51,8 @@ const InfiniteLoading = (props) => {
|
|
|
51
51
|
isTouching.current = false;
|
|
52
52
|
};
|
|
53
53
|
const scrollAction = (e) => {
|
|
54
|
-
var
|
|
55
|
-
scrollTop.current = (
|
|
54
|
+
var _a2;
|
|
55
|
+
scrollTop.current = (_a2 = e.target) === null || _a2 === void 0 ? void 0 : _a2.scrollTop;
|
|
56
56
|
if (e.target.scrollTop <= 0) {
|
|
57
57
|
e.target.scrollTop = 0;
|
|
58
58
|
}
|
|
@@ -99,7 +99,7 @@ const InfiniteLoading = (props) => {
|
|
|
99
99
|
});
|
|
100
100
|
return React__default.createElement(
|
|
101
101
|
ScrollView,
|
|
102
|
-
{ className: classes, scrollY: true, id: "scroller", type: "list", style: { height: "100%" }, onScroll: scrollAction, onScrollToLower: lower, onTouchStart: touchStart, onTouchMove: touchMove, onTouchEnd: touchEnd },
|
|
102
|
+
Object.assign({}, rest, { className: classes, scrollY: true, id: "scroller", type: "list", style: { height: "100%" }, onScroll: scrollAction, onScrollToLower: lower, onTouchStart: touchStart, onTouchMove: touchMove, onTouchEnd: touchEnd }),
|
|
103
103
|
React__default.createElement(
|
|
104
104
|
"div",
|
|
105
105
|
{ className: "nut-infinite-top", ref: refreshTop, style: getStyle() },
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { ArrowUp, ArrowDown } from "@nutui/icons-react-taro";
|
|
5
|
-
import { M as MenuItem } from "./menuitem.taro-
|
|
5
|
+
import { M as MenuItem } from "./menuitem.taro-DMV3j4DK.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { activeColor: "", closeOnOverlayClick: true, scrollFixed: false, lockScroll: true, overlay: true, icon: null, onOpen: (index, from) => {
|
|
8
8
|
}, onClose: (index, from) => {
|
|
@@ -132,8 +132,10 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
132
132
|
}, onClick: () => {
|
|
133
133
|
handleClick(item);
|
|
134
134
|
} },
|
|
135
|
-
item.value === innerValue ? React__default.createElement(React__default.Fragment, null, icon
|
|
136
|
-
|
|
135
|
+
item.value === innerValue ? React__default.createElement(React__default.Fragment, null, icon ? React__default.cloneElement(icon, {
|
|
136
|
+
className: `nut-menu-container-item-icon ${icon.props.className || ""}`
|
|
137
|
+
}) : React__default.createElement(Check, { color: activeColor, size: 16, className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}` })) : null,
|
|
138
|
+
React__default.createElement(View, { className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`, style: {
|
|
137
139
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
138
140
|
} }, item.text)
|
|
139
141
|
);
|
|
@@ -11,7 +11,7 @@ import { G as G2 } from "./griditem.taro-CcWyYchl.js";
|
|
|
11
11
|
import { L } from "./layout.taro-C-aUcOOE.js";
|
|
12
12
|
import { R } from "./row.taro-ItEq1Bi5.js";
|
|
13
13
|
import { S } from "./space.taro-B1KsEPZL.js";
|
|
14
|
-
import { S as S2 } from "./sticky.taro-
|
|
14
|
+
import { S as S2 } from "./sticky.taro-Zbz7wQH8.js";
|
|
15
15
|
import { S as S3 } from "./safearea.taro-BJpvFsMf.js";
|
|
16
16
|
import { B as B2 } from "./backtop.taro-jWlJ1ZWG.js";
|
|
17
17
|
import { E } from "./elevator.taro-Bsc8PcT0.js";
|
|
@@ -24,19 +24,19 @@ import { T } from "./tabbar.taro-CXk0zLdz.js";
|
|
|
24
24
|
import { T as T2 } from "./tabbaritem.taro-BZNabTBp.js";
|
|
25
25
|
import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
|
|
26
26
|
import { T as T4 } from "./tabs.taro-B2D3AtVV.js";
|
|
27
|
-
import { A } from "./address.taro-
|
|
28
|
-
import { C as C5 } from "./calendar.taro-
|
|
29
|
-
import { C as C6 } from "./calendaritem.taro-
|
|
27
|
+
import { A } from "./address.taro-BYzOGUEN.js";
|
|
28
|
+
import { C as C5 } from "./calendar.taro-BXrHr8bg.js";
|
|
29
|
+
import { C as C6 } from "./calendaritem.taro-CRultyrO.js";
|
|
30
30
|
import { C as C7 } from "./calendarcard.taro-CbvCWF1k.js";
|
|
31
|
-
import { C as C8 } from "./cascader.taro-
|
|
31
|
+
import { C as C8 } from "./cascader.taro-jxe42b68.js";
|
|
32
32
|
import { C as C9, a as a2 } from "./checkbox.taro-Dc054oRo.js";
|
|
33
33
|
import { D as D2 } from "./datepicker.taro-DTyJrlhD.js";
|
|
34
34
|
import { default as default2 } from "./Form.js";
|
|
35
|
-
import { F as F2 } from "./formitem.taro-
|
|
35
|
+
import { F as F2 } from "./formitem.taro-Dmt5-wxG.js";
|
|
36
36
|
import { I as I2 } from "./input.taro-B_B1lJq2.js";
|
|
37
37
|
import { I as I3 } from "./inputnumber.taro-WN5Drnyz.js";
|
|
38
|
-
import { M } from "./menu.taro-
|
|
39
|
-
import { M as M2 } from "./menuitem.taro-
|
|
38
|
+
import { M } from "./menu.taro-CrPdDbYM.js";
|
|
39
|
+
import { M as M2 } from "./menuitem.taro-DMV3j4DK.js";
|
|
40
40
|
import { N as N2 } from "./numberkeyboard.taro-BA0iCeGP.js";
|
|
41
41
|
import { P } from "./picker.taro-CafNRRO5.js";
|
|
42
42
|
import { R as R2, a as a3 } from "./radio.taro-BNSceequ.js";
|
|
@@ -47,13 +47,13 @@ import { S as S8 } from "./shortpassword.taro-DpdtRsQ-.js";
|
|
|
47
47
|
import { S as S9 } from "./signature.taro-zgwaJkIE.js";
|
|
48
48
|
import { S as S10 } from "./switch.taro-CdBmDo18.js";
|
|
49
49
|
import { T as T5 } from "./textarea.taro-DuceTjAx.js";
|
|
50
|
-
import { U } from "./uploader.taro-
|
|
50
|
+
import { U } from "./uploader.taro-DfO2HWvy.js";
|
|
51
51
|
import { A as A2 } from "./actionsheet.taro-CJjNsNrH.js";
|
|
52
52
|
import { B as B3 } from "./badge.taro-BGaxpEYi.js";
|
|
53
53
|
import { B as B4 } from "./dialog.taro-BW9D2Gsr.js";
|
|
54
54
|
import { D as D3 } from "./drag.taro-B_TO4Nnu.js";
|
|
55
55
|
import { E as E2 } from "./empty.taro-CnwDznke.js";
|
|
56
|
-
import { I as I4 } from "./infiniteloading.taro-
|
|
56
|
+
import { I as I4 } from "./infiniteloading.taro-TbcBB0Qr.js";
|
|
57
57
|
import { L as L2 } from "./loading.taro-n_qoNgCW.js";
|
|
58
58
|
import { N as N3 } from "./noticebar.taro-CGUTg60Q.js";
|
|
59
59
|
import { N as N4 } from "./notify.taro-jP7y9zMU.js";
|
|
@@ -92,7 +92,7 @@ import { C as C14 } from "./card.taro-DxcIi5qH.js";
|
|
|
92
92
|
import { T as T10 } from "./timedetail.taro-ya5JNy2L.js";
|
|
93
93
|
import { T as T11 } from "./timeselect.taro-DncKbp3l.js";
|
|
94
94
|
import { T as T12 } from "./trendarrow.taro-DKx5cGIh.js";
|
|
95
|
-
import { W } from "./watermark.taro-
|
|
95
|
+
import { W } from "./watermark.taro-CZ6R5FlJ.js";
|
|
96
96
|
import { A as A7 } from "./avatarcropper.taro-CAVcFvKC.js";
|
|
97
97
|
export {
|
|
98
98
|
A2 as ActionSheet,
|
|
@@ -41,22 +41,21 @@ const Sticky = (props) => {
|
|
|
41
41
|
onChange && onChange(fixed);
|
|
42
42
|
});
|
|
43
43
|
const rootStyle = useMemo(() => {
|
|
44
|
+
var _a2, _b;
|
|
44
45
|
if (!fixed) {
|
|
45
46
|
return {
|
|
46
47
|
height: "",
|
|
47
48
|
width: ""
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
const style2 = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
if (rootRect.width) {
|
|
55
|
-
style2.width = rootRect.width;
|
|
56
|
-
}
|
|
51
|
+
const style2 = {
|
|
52
|
+
height: (_a2 = rootRect.height) !== null && _a2 !== void 0 ? _a2 : "",
|
|
53
|
+
width: (_b = rootRect.width) !== null && _b !== void 0 ? _b : ""
|
|
54
|
+
};
|
|
57
55
|
return style2;
|
|
58
56
|
}, [fixed, rootRect.height, rootRect.width]);
|
|
59
57
|
const stickyStyle = useMemo(() => {
|
|
58
|
+
var _a2, _b;
|
|
60
59
|
if (!fixed) {
|
|
61
60
|
return {
|
|
62
61
|
height: "",
|
|
@@ -64,38 +63,37 @@ const Sticky = (props) => {
|
|
|
64
63
|
[position]: ""
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
|
-
const style2 = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
style2.zIndex = zIndex;
|
|
66
|
+
const style2 = {
|
|
67
|
+
height: (_a2 = rootRect.height) !== null && _a2 !== void 0 ? _a2 : "",
|
|
68
|
+
width: (_b = rootRect.width) !== null && _b !== void 0 ? _b : "",
|
|
69
|
+
transform: `translate3d(0, ${transform}px, 0)`,
|
|
70
|
+
[position]: threshold,
|
|
71
|
+
zIndex
|
|
72
|
+
};
|
|
75
73
|
return style2;
|
|
76
74
|
}, [fixed, rootRect.height, rootRect.width, transform, position]);
|
|
77
75
|
const handleScroll = (scrollTop) => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
76
|
const curRootRect = yield getRectByTaro(rootRef.current);
|
|
79
77
|
const stickyRect = yield getRectByTaro(stickyRef.current);
|
|
80
|
-
if (curRootRect
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
if (!curRootRect || !stickyRect) {
|
|
79
|
+
console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
setRootRect(curRootRect);
|
|
83
|
+
if (position === "top") {
|
|
84
|
+
if (container) {
|
|
85
|
+
const containerRect = yield getRectByTaro(container.current);
|
|
86
|
+
const difference = containerRect.bottom - threshold - curRootRect.height;
|
|
87
|
+
const curTransform = difference < 0 ? difference : 0;
|
|
88
|
+
setTransform(curTransform);
|
|
89
|
+
const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
|
|
90
|
+
setFixed(curFixed);
|
|
93
91
|
} else {
|
|
94
|
-
|
|
95
|
-
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
92
|
+
setFixed(threshold > curRootRect.top);
|
|
96
93
|
}
|
|
97
94
|
} else {
|
|
98
|
-
|
|
95
|
+
const windowHeight = getSystemInfoSync().windowHeight;
|
|
96
|
+
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
99
97
|
}
|
|
100
98
|
});
|
|
101
99
|
const getElement = useCallback(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
2
|
-
import React__default, { useState, useImperativeHandle } from "react";
|
|
2
|
+
import React__default, { useState, useImperativeHandle, useRef, useEffect } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import Taro, { uploadFile, getEnv, chooseMedia, chooseImage } from "@tarojs/taro";
|
|
5
5
|
import { Failure, Link, Del, Loading, Photograph } from "@nutui/icons-react-taro";
|
|
@@ -225,6 +225,10 @@ const InternalUploader = (props, ref) => {
|
|
|
225
225
|
clearUploadQueue();
|
|
226
226
|
}
|
|
227
227
|
}));
|
|
228
|
+
const fileListRef = useRef([]);
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
fileListRef.current = fileList;
|
|
231
|
+
}, [fileList]);
|
|
228
232
|
const clearUploadQueue = (index = -1) => {
|
|
229
233
|
if (index > -1) {
|
|
230
234
|
uploadQueue.splice(index, 1);
|
|
@@ -300,28 +304,28 @@ const InternalUploader = (props, ref) => {
|
|
|
300
304
|
uploadOption.beforeXhrUpload = beforeXhrUpload;
|
|
301
305
|
uploadOption.onStart = (option) => {
|
|
302
306
|
clearUploadQueue(index);
|
|
303
|
-
setFileList(
|
|
307
|
+
setFileList(fileListRef.current.map((item) => {
|
|
304
308
|
if (item.uid === fileItem.uid) {
|
|
305
309
|
item.status = "ready";
|
|
306
310
|
item.message = locale.uploader.readyUpload;
|
|
307
311
|
}
|
|
308
312
|
return item;
|
|
309
313
|
}));
|
|
310
|
-
onStart
|
|
314
|
+
onStart === null || onStart === void 0 ? void 0 : onStart(option);
|
|
311
315
|
};
|
|
312
316
|
uploadOption.onProgress = (e, option) => {
|
|
313
|
-
setFileList(
|
|
317
|
+
setFileList(fileListRef.current.map((item) => {
|
|
314
318
|
if (item.uid === fileItem.uid) {
|
|
315
319
|
item.status = UPLOADING;
|
|
316
320
|
item.message = locale.uploader.uploading;
|
|
317
321
|
item.percentage = e.progress;
|
|
318
|
-
onProgress
|
|
322
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress({ e, option, percentage: item.percentage });
|
|
319
323
|
}
|
|
320
324
|
return item;
|
|
321
325
|
}));
|
|
322
326
|
};
|
|
323
327
|
uploadOption.onSuccess = (responseText, option) => {
|
|
324
|
-
const list =
|
|
328
|
+
const list = fileListRef.current.map((item) => {
|
|
325
329
|
if (item.uid === fileItem.uid) {
|
|
326
330
|
item.status = SUCCESS;
|
|
327
331
|
item.message = locale.uploader.success;
|
|
@@ -337,7 +341,7 @@ const InternalUploader = (props, ref) => {
|
|
|
337
341
|
});
|
|
338
342
|
};
|
|
339
343
|
uploadOption.onFailure = (responseText, option) => {
|
|
340
|
-
const list =
|
|
344
|
+
const list = fileListRef.current.map((item) => {
|
|
341
345
|
if (item.uid === fileItem.uid) {
|
|
342
346
|
item.status = ERROR;
|
|
343
347
|
item.message = locale.uploader.error;
|
|
@@ -397,8 +401,8 @@ const InternalUploader = (props, ref) => {
|
|
|
397
401
|
if (preview) {
|
|
398
402
|
fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
|
|
399
403
|
}
|
|
400
|
-
setFileList([...fileList, fileItem]);
|
|
401
404
|
executeUpload(fileItem, index);
|
|
405
|
+
setFileList([...fileList, fileItem]);
|
|
402
406
|
});
|
|
403
407
|
};
|
|
404
408
|
const filterFiles = (files) => {
|
|
@@ -412,9 +416,7 @@ const InternalUploader = (props, ref) => {
|
|
|
412
416
|
}
|
|
413
417
|
return true;
|
|
414
418
|
});
|
|
415
|
-
|
|
416
|
-
onOversize && onOversize(files);
|
|
417
|
-
}
|
|
419
|
+
oversizes.length && (onOversize === null || onOversize === void 0 ? void 0 : onOversize(files));
|
|
418
420
|
const currentFileLength = filterFile.length + fileList.length;
|
|
419
421
|
if (currentFileLength > maximum) {
|
|
420
422
|
filterFile.splice(filterFile.length - (currentFileLength - maximum));
|
|
@@ -3,10 +3,10 @@ import { getSystemInfo, createOffscreenCanvas } from "@tarojs/taro";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
-
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { content: "", fullPage: true, zIndex: 2e3, gapX: 24, gapY: 48, width: 120, height: 64, image: "", imageWidth: 120, imageHeight: 64, rotate: -22, color: "rgba(0,0,0,.15)", fontStyle: "normal", fontWeight: "normal", fontSize: 14 });
|
|
6
|
+
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { content: "", fullPage: true, zIndex: 2e3, gapX: 24, gapY: 48, width: 120, height: 64, startX: 0, startY: 0, image: "", imageWidth: 120, imageHeight: 64, rotate: -22, color: "rgba(0,0,0,.15)", fontStyle: "normal", fontWeight: "normal", fontSize: 14 });
|
|
7
7
|
const WaterMark = (props) => {
|
|
8
8
|
const { locale } = useConfig();
|
|
9
|
-
const { content, fullPage, zIndex, className, gapX, gapY, width, height, image, imageWidth, imageHeight, rotate, color, fontStyle, fontFamily, fontWeight, fontSize, style } = Object.assign(Object.assign({}, defaultProps), props);
|
|
9
|
+
const { content, fullPage, zIndex, className, gapX, gapY, startX, startY, width, height, image, imageWidth, imageHeight, rotate, color, fontStyle, fontFamily, fontWeight, fontSize, style } = Object.assign(Object.assign({}, defaultProps), props);
|
|
10
10
|
const [base64Url, setBase64Url] = useState("");
|
|
11
11
|
const classPrefix = "nut-watermark";
|
|
12
12
|
const classes = classNames(classPrefix, {
|
|
@@ -65,7 +65,7 @@ const WaterMark = (props) => {
|
|
|
65
65
|
const markSize = Number(fontSize) * ratio;
|
|
66
66
|
ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
67
67
|
ctx.fillStyle = color;
|
|
68
|
-
ctx.fillText(content,
|
|
68
|
+
ctx.fillText(content, startX, startY);
|
|
69
69
|
ctx.restore();
|
|
70
70
|
setBase64Url(canvas.toDataURL());
|
|
71
71
|
}
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED