@nutui/nutui 3.2.8-beta.1 → 3.3.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 +36 -0
- package/dist/nutui.es.js +68 -150
- package/dist/nutui.umd.js +68 -150
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -1
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +1 -1
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +3 -2
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +2 -2
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +1 -1
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +57 -139
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +1 -1
- package/dist/packages/_es/interceptor.js +2 -2
- package/dist/packages/_es/mountComponent.js +2 -2
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/props.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/popover/index.scss +1 -2
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +52 -52
- package/dist/styles/themes/jdb.scss +52 -52
- package/dist/styles/themes/jddkh.scss +52 -52
- package/dist/styles/themes/jdt.scss +52 -52
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +4 -4
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/badge/index.vue.d.ts +1 -1
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +4 -4
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/datepicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/dialog/index.vue.d.ts +5 -5
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
- package/dist/types/__VUE/image/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +3 -3
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +1 -1
- package/dist/types/__VUE/overlay/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/index.vue.d.ts +7 -4
- package/dist/types/__VUE/uploader/uploader.d.ts +3 -0
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## v3.3.0
|
|
2
|
+
|
|
3
|
+
`2022-12-02`
|
|
4
|
+
|
|
5
|
+
小程序版本依赖 Taro ^3.5.x
|
|
6
|
+
|
|
7
|
+
NutUI 非常感谢您对开源事业做出的贡献!🌷🌷🌷
|
|
8
|
+
本次社区贡献者 @mikasayw @thx125
|
|
9
|
+
* :sparkles: chore: npm source set registry.npmmirror.com @richard1015
|
|
10
|
+
* :zap: feat(input): 添加小程序属性always-system (#1863) @mikasayw
|
|
11
|
+
* :zap: feat: 抽离 CreateComponent 函数,用于 函数式组件开发 (#1876) @yangxiaolu1993
|
|
12
|
+
* :zap: feat: 重构 Popover,去除第三方依赖 (#1873) @yangxiaolu1993
|
|
13
|
+
* :zap: feat: Popover 组件 Taro 小程序适配 (#1882) @yangxiaolu1993
|
|
14
|
+
* :zap: feat(input): 新增enterkeyhint属性(H5版本支持confirm-type) (#1867) @mikasayw
|
|
15
|
+
* :zap: upd: overlay,popup @szg2008
|
|
16
|
+
* :bug: fix(popup): update hide animation @szg2008
|
|
17
|
+
* :bug: fix(addresslist): 地址组件优化 (#1877)@ailululu
|
|
18
|
+
* :bug: fix(popup): 组件修改(#1877)(#1883) @yangxiaolu1993
|
|
19
|
+
* :bug: fix(Address): 组件体积优化 (#1885) @yangxiaolu1993
|
|
20
|
+
* :bug: test(countdown,picker,imagepreview,dialog): 组件单元测试修改 (#1886) @yangxiaolu1993
|
|
21
|
+
* :bug: fix: change mobile jump bug @richard1015
|
|
22
|
+
* :bug: fix(inputNumber): taro h5 style issues #1874 (#1887)@Drjingfubo
|
|
23
|
+
* :bug: upd(form): add try catch ,fix submit method @richard1015
|
|
24
|
+
* :bug: fix(Menu): 修复MenuItem 无法销毁问题 #1788 (#1857) @thx125
|
|
25
|
+
* :bug: fix(elevator): elevator组件elevator__item__${i}渲染出现小数 #1844 @szg2008
|
|
26
|
+
* :bug: fix(menu): 隐藏菜单时,不移除Popup里的内容 (#1891) @yangjinjun3
|
|
27
|
+
* :bug: fix(input): 合并template代码 (#1890) @ailululu
|
|
28
|
+
* :bug: fix(textarea): 渲染问题处理,collapse 单测修复 (#1892) @Ymm0008
|
|
29
|
+
* :bug: fix(input): commontent增加类型 (#1893) @ailululu
|
|
30
|
+
* :bug: fix(menu): 修复弹框跳转问题 (#1894) @yangjinjun3
|
|
31
|
+
* :bug: fix(Uploader): H5 打包去掉Taro 内容 (#1895) @yangxiaolu1993
|
|
32
|
+
* :bug: fix(popup): popover 小程序warn解决 @szg2008
|
|
33
|
+
* :bug: fix(popover): 样式换行问题修改 (#1897) @yangxiaolu1993
|
|
34
|
+
* 📖 docs(form): en us submit desc edit @richard1015
|
|
35
|
+
* 📖 docs(steps): 补充icon自定义的文档 @szg2008
|
|
36
|
+
* 📖 docs(Signature): 签名组件文档修改 (#1896) @szg2008
|
|
1
37
|
## v3.2.7
|
|
2
38
|
|
|
3
39
|
`2022-11-18`
|
package/dist/nutui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.
|
|
2
|
+
* @nutui/nutui v3.3.0 Fri Dec 02 2022 20:55:40 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -226,7 +226,7 @@ const funInterceptor = (interceptor, {
|
|
|
226
226
|
if (isPromise(returnVal)) {
|
|
227
227
|
returnVal.then((value) => {
|
|
228
228
|
if (value) {
|
|
229
|
-
done();
|
|
229
|
+
done(value);
|
|
230
230
|
} else if (canceled) {
|
|
231
231
|
canceled();
|
|
232
232
|
}
|
|
@@ -410,7 +410,7 @@ const CreateComponent = (options, component2) => {
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
const root = document.createElement("view");
|
|
413
|
-
const name = component2.name
|
|
413
|
+
const name = component2.name ? component2.name + "-" : "";
|
|
414
414
|
const id1 = options.id || new Date().getTime();
|
|
415
415
|
root.id = name + id1;
|
|
416
416
|
let Wrapper = {};
|
|
@@ -5736,19 +5736,19 @@ const _hoisted_10$5 = {
|
|
|
5736
5736
|
key: 0,
|
|
5737
5737
|
class: "calendar-curr-tips calendar-curr-tips-top"
|
|
5738
5738
|
};
|
|
5739
|
-
const _hoisted_11$
|
|
5739
|
+
const _hoisted_11$4 = {
|
|
5740
5740
|
key: 1,
|
|
5741
5741
|
class: "calendar-curr-tips calendar-curr-tips-bottom"
|
|
5742
5742
|
};
|
|
5743
|
-
const _hoisted_12$
|
|
5743
|
+
const _hoisted_12$4 = {
|
|
5744
5744
|
key: 2,
|
|
5745
5745
|
class: "calendar-curr-tip-curr"
|
|
5746
5746
|
};
|
|
5747
|
-
const _hoisted_13$
|
|
5747
|
+
const _hoisted_13$2 = {
|
|
5748
5748
|
key: 4,
|
|
5749
5749
|
class: "calendar-day-tip"
|
|
5750
5750
|
};
|
|
5751
|
-
const _hoisted_14$
|
|
5751
|
+
const _hoisted_14$2 = {
|
|
5752
5752
|
key: 0,
|
|
5753
5753
|
class: "nut-calendar-footer"
|
|
5754
5754
|
};
|
|
@@ -5815,17 +5815,17 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5815
5815
|
date: day.type == "curr" ? day : ""
|
|
5816
5816
|
})
|
|
5817
5817
|
])) : createCommentVNode("", true),
|
|
5818
|
-
_ctx.bottomInfo ? (openBlock(), createElementBlock("view", _hoisted_11$
|
|
5818
|
+
_ctx.bottomInfo ? (openBlock(), createElementBlock("view", _hoisted_11$4, [
|
|
5819
5819
|
renderSlot(_ctx.$slots, "bottomInfo", {
|
|
5820
5820
|
date: day.type == "curr" ? day : ""
|
|
5821
5821
|
})
|
|
5822
5822
|
])) : createCommentVNode("", true),
|
|
5823
|
-
!_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(day) ? (openBlock(), createElementBlock("view", _hoisted_12$
|
|
5823
|
+
!_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(day) ? (openBlock(), createElementBlock("view", _hoisted_12$4, toDisplayString(_ctx.translate("today")), 1)) : createCommentVNode("", true),
|
|
5824
5824
|
_ctx.isStartTip(day, month) ? (openBlock(), createElementBlock("view", {
|
|
5825
5825
|
key: 3,
|
|
5826
5826
|
class: normalizeClass(["calendar-day-tip", { "calendar-curr-tips-top": _ctx.rangeTip() }])
|
|
5827
5827
|
}, toDisplayString(_ctx.startText || _ctx.translate("start")), 3)) : createCommentVNode("", true),
|
|
5828
|
-
_ctx.isEndTip(day, month) ? (openBlock(), createElementBlock("view", _hoisted_13$
|
|
5828
|
+
_ctx.isEndTip(day, month) ? (openBlock(), createElementBlock("view", _hoisted_13$2, toDisplayString(_ctx.endText || _ctx.translate("end")), 1)) : createCommentVNode("", true)
|
|
5829
5829
|
], 10, _hoisted_8$d);
|
|
5830
5830
|
}), 128))
|
|
5831
5831
|
], 2)
|
|
@@ -5835,7 +5835,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5835
5835
|
], 4)
|
|
5836
5836
|
], 512)
|
|
5837
5837
|
], 544),
|
|
5838
|
-
_ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view", _hoisted_14$
|
|
5838
|
+
_ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view", _hoisted_14$2, [
|
|
5839
5839
|
createElementVNode("view", {
|
|
5840
5840
|
class: "calendar-confirm-btn",
|
|
5841
5841
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirm && _ctx.confirm(...args))
|
|
@@ -7566,7 +7566,8 @@ const _sfc_main$18 = create$18({
|
|
|
7566
7566
|
};
|
|
7567
7567
|
const renderInput = (type) => {
|
|
7568
7568
|
return h(type == "textarea" ? "textarea" : "input", {
|
|
7569
|
-
style: type == "textarea" ? stylesTextarea : styles
|
|
7569
|
+
style: type == "textarea" ? stylesTextarea : styles,
|
|
7570
|
+
type: type != "textarea" && inputType(type)
|
|
7570
7571
|
});
|
|
7571
7572
|
};
|
|
7572
7573
|
const state = reactive({
|
|
@@ -8595,46 +8596,6 @@ class Uploader$1 {
|
|
|
8595
8596
|
console.warn("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 XMLHttpRequest");
|
|
8596
8597
|
}
|
|
8597
8598
|
}
|
|
8598
|
-
uploadTaro(uploadFile, env) {
|
|
8599
|
-
var _a;
|
|
8600
|
-
const options = this.options;
|
|
8601
|
-
if (env === "WEB") {
|
|
8602
|
-
this.upload();
|
|
8603
|
-
} else {
|
|
8604
|
-
if (options.beforeXhrUpload) {
|
|
8605
|
-
options.beforeXhrUpload(uploadFile, options);
|
|
8606
|
-
} else {
|
|
8607
|
-
const uploadTask = uploadFile({
|
|
8608
|
-
url: options.url,
|
|
8609
|
-
filePath: options.taroFilePath,
|
|
8610
|
-
fileType: options.fileType,
|
|
8611
|
-
header: {
|
|
8612
|
-
"Content-Type": "multipart/form-data",
|
|
8613
|
-
...options.headers
|
|
8614
|
-
},
|
|
8615
|
-
formData: options.formData,
|
|
8616
|
-
name: options.name,
|
|
8617
|
-
success(response) {
|
|
8618
|
-
var _a2, _b;
|
|
8619
|
-
if (options.xhrState == response.statusCode) {
|
|
8620
|
-
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
8621
|
-
} else {
|
|
8622
|
-
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
8623
|
-
}
|
|
8624
|
-
},
|
|
8625
|
-
fail(e) {
|
|
8626
|
-
var _a2;
|
|
8627
|
-
(_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
|
|
8628
|
-
}
|
|
8629
|
-
});
|
|
8630
|
-
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
8631
|
-
uploadTask.progress((res) => {
|
|
8632
|
-
var _a2;
|
|
8633
|
-
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
8634
|
-
});
|
|
8635
|
-
}
|
|
8636
|
-
}
|
|
8637
|
-
}
|
|
8638
8599
|
}
|
|
8639
8600
|
const { translate: translate$j } = createComponent("uploader");
|
|
8640
8601
|
class FileItem {
|
|
@@ -8708,6 +8669,19 @@ const _sfc_main$12 = create$12({
|
|
|
8708
8669
|
[prefixCls]: true
|
|
8709
8670
|
};
|
|
8710
8671
|
});
|
|
8672
|
+
const renderInput = () => {
|
|
8673
|
+
let params = {
|
|
8674
|
+
class: `nut-uploader__input`,
|
|
8675
|
+
type: "file",
|
|
8676
|
+
accept: props.accept,
|
|
8677
|
+
multiple: props.multiple,
|
|
8678
|
+
name: props.name,
|
|
8679
|
+
disabled: props.disabled
|
|
8680
|
+
};
|
|
8681
|
+
if (props.capture)
|
|
8682
|
+
params.capture = "camera";
|
|
8683
|
+
return h("input", params);
|
|
8684
|
+
};
|
|
8711
8685
|
const clearInput = (el) => {
|
|
8712
8686
|
el.value = "";
|
|
8713
8687
|
};
|
|
@@ -8840,20 +8814,10 @@ const _sfc_main$12 = create$12({
|
|
|
8840
8814
|
};
|
|
8841
8815
|
const onDelete = (file, index) => {
|
|
8842
8816
|
clearUploadQueue(index);
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
deleted(file, index);
|
|
8848
|
-
}
|
|
8849
|
-
}).catch((error) => {
|
|
8850
|
-
console.log(error, "\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
8851
|
-
});
|
|
8852
|
-
} else if (fn) {
|
|
8853
|
-
deleted(file, index);
|
|
8854
|
-
} else {
|
|
8855
|
-
console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
8856
|
-
}
|
|
8817
|
+
funInterceptor(props.beforeDelete, {
|
|
8818
|
+
args: [file, fileList],
|
|
8819
|
+
done: () => deleted(file, index)
|
|
8820
|
+
});
|
|
8857
8821
|
};
|
|
8858
8822
|
const onChange = (event) => {
|
|
8859
8823
|
if (props.disabled) {
|
|
@@ -8862,13 +8826,9 @@ const _sfc_main$12 = create$12({
|
|
|
8862
8826
|
const $el = event.target;
|
|
8863
8827
|
let { files } = $el;
|
|
8864
8828
|
if (props.beforeUpload) {
|
|
8865
|
-
props.beforeUpload(files).then((f) =>
|
|
8866
|
-
const _files = filterFiles(new Array().slice.call(f));
|
|
8867
|
-
readFile(_files);
|
|
8868
|
-
});
|
|
8829
|
+
props.beforeUpload(files).then((f) => changeReadFile(f));
|
|
8869
8830
|
} else {
|
|
8870
|
-
|
|
8871
|
-
readFile(_files);
|
|
8831
|
+
changeReadFile(files);
|
|
8872
8832
|
}
|
|
8873
8833
|
emit("change", {
|
|
8874
8834
|
fileList,
|
|
@@ -8878,6 +8838,10 @@ const _sfc_main$12 = create$12({
|
|
|
8878
8838
|
clearInput($el);
|
|
8879
8839
|
}
|
|
8880
8840
|
};
|
|
8841
|
+
const changeReadFile = (f) => {
|
|
8842
|
+
const _files = filterFiles(new Array().slice.call(f));
|
|
8843
|
+
readFile(_files);
|
|
8844
|
+
};
|
|
8881
8845
|
return {
|
|
8882
8846
|
onChange,
|
|
8883
8847
|
onDelete,
|
|
@@ -8885,7 +8849,8 @@ const _sfc_main$12 = create$12({
|
|
|
8885
8849
|
classes,
|
|
8886
8850
|
fileItemClick,
|
|
8887
8851
|
clearUploadQueue,
|
|
8888
|
-
submit
|
|
8852
|
+
submit,
|
|
8853
|
+
renderInput
|
|
8889
8854
|
};
|
|
8890
8855
|
}
|
|
8891
8856
|
});
|
|
@@ -8893,36 +8858,27 @@ const _hoisted_1$P = {
|
|
|
8893
8858
|
key: 0,
|
|
8894
8859
|
class: "nut-uploader__slot"
|
|
8895
8860
|
};
|
|
8896
|
-
const _hoisted_2$G =
|
|
8897
|
-
const _hoisted_3$x = ["accept", "multiple", "name", "disabled"];
|
|
8898
|
-
const _hoisted_4$q = {
|
|
8861
|
+
const _hoisted_2$G = {
|
|
8899
8862
|
key: 0,
|
|
8900
8863
|
class: "nut-uploader__preview-img"
|
|
8901
8864
|
};
|
|
8902
|
-
const
|
|
8865
|
+
const _hoisted_3$x = {
|
|
8903
8866
|
key: 0,
|
|
8904
8867
|
class: "nut-uploader__preview__progress"
|
|
8905
8868
|
};
|
|
8906
|
-
const
|
|
8907
|
-
const
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
};
|
|
8911
|
-
const _hoisted_8$a = { class: "nut-uploader__preview__progress__msg" };
|
|
8912
|
-
const _hoisted_9$6 = ["onClick", "src"];
|
|
8913
|
-
const _hoisted_10$4 = {
|
|
8914
|
-
key: 4,
|
|
8869
|
+
const _hoisted_4$q = { class: "nut-uploader__preview__progress__msg" };
|
|
8870
|
+
const _hoisted_5$i = ["onClick", "src"];
|
|
8871
|
+
const _hoisted_6$h = {
|
|
8872
|
+
key: 3,
|
|
8915
8873
|
class: "nut-uploader__preview-img__file"
|
|
8916
8874
|
};
|
|
8917
|
-
const
|
|
8918
|
-
const
|
|
8919
|
-
const
|
|
8875
|
+
const _hoisted_7$f = ["onClick"];
|
|
8876
|
+
const _hoisted_8$a = { class: "tips" };
|
|
8877
|
+
const _hoisted_9$6 = {
|
|
8920
8878
|
key: 1,
|
|
8921
8879
|
class: "nut-uploader__preview-list"
|
|
8922
8880
|
};
|
|
8923
|
-
const
|
|
8924
|
-
const _hoisted_15$1 = ["accept", "multiple", "name", "disabled"];
|
|
8925
|
-
const _hoisted_16$1 = ["accept", "multiple", "name", "disabled"];
|
|
8881
|
+
const _hoisted_10$4 = ["onClick"];
|
|
8926
8882
|
function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8927
8883
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
8928
8884
|
const _component_nut_progress = resolveComponent("nut-progress");
|
|
@@ -8931,55 +8887,36 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8931
8887
|
}, [
|
|
8932
8888
|
_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_1$P, [
|
|
8933
8889
|
renderSlot(_ctx.$slots, "default"),
|
|
8934
|
-
_ctx.maximum - _ctx.fileList.length ? (openBlock(),
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
type: "file",
|
|
8939
|
-
capture: "camera",
|
|
8940
|
-
accept: _ctx.accept,
|
|
8941
|
-
multiple: _ctx.multiple,
|
|
8942
|
-
name: _ctx.name,
|
|
8943
|
-
disabled: _ctx.disabled,
|
|
8944
|
-
onChange: _cache[0] || (_cache[0] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
8945
|
-
}, null, 40, _hoisted_2$G)) : (openBlock(), createElementBlock("input", {
|
|
8946
|
-
key: 1,
|
|
8947
|
-
class: "nut-uploader__input",
|
|
8948
|
-
type: "file",
|
|
8949
|
-
accept: _ctx.accept,
|
|
8950
|
-
multiple: _ctx.multiple,
|
|
8951
|
-
name: _ctx.name,
|
|
8952
|
-
disabled: _ctx.disabled,
|
|
8953
|
-
onChange: _cache[1] || (_cache[1] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
8954
|
-
}, null, 40, _hoisted_3$x))
|
|
8955
|
-
], 64)) : createCommentVNode("", true)
|
|
8890
|
+
_ctx.maximum - _ctx.fileList.length ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), {
|
|
8891
|
+
key: 0,
|
|
8892
|
+
onChange: _ctx.onChange
|
|
8893
|
+
}, null, 40, ["onChange"])) : createCommentVNode("", true)
|
|
8956
8894
|
])) : createCommentVNode("", true),
|
|
8957
8895
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item, index) => {
|
|
8958
8896
|
return openBlock(), createElementBlock("view", {
|
|
8959
8897
|
class: normalizeClass(["nut-uploader__preview", [_ctx.listType]]),
|
|
8960
8898
|
key: item.uid
|
|
8961
8899
|
}, [
|
|
8962
|
-
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view",
|
|
8963
|
-
item.status
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
createVNode(_component_nut_icon, {
|
|
8900
|
+
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_2$G, [
|
|
8901
|
+
item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_3$x, [
|
|
8902
|
+
item.status != "ready" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
8903
|
+
key: 0,
|
|
8967
8904
|
color: "#fff",
|
|
8968
8905
|
name: item.status == "error" ? "failure" : "loading"
|
|
8969
|
-
}, null, 8, ["name"]),
|
|
8970
|
-
createElementVNode("view",
|
|
8906
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
8907
|
+
createElementVNode("view", _hoisted_4$q, toDisplayString(item.message), 1)
|
|
8971
8908
|
])) : createCommentVNode("", true),
|
|
8972
|
-
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, mergeProps({ key:
|
|
8909
|
+
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
8973
8910
|
onClick: ($event) => _ctx.onDelete(item, index),
|
|
8974
8911
|
class: "close",
|
|
8975
8912
|
name: _ctx.deleteIcon
|
|
8976
8913
|
}), null, 16, ["onClick", "name"])) : createCommentVNode("", true),
|
|
8977
8914
|
item.type.includes("image") && item.url ? (openBlock(), createElementBlock("img", {
|
|
8978
|
-
key:
|
|
8915
|
+
key: 2,
|
|
8979
8916
|
class: "nut-uploader__preview-img__c",
|
|
8980
8917
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
8981
8918
|
src: item.url
|
|
8982
|
-
}, null, 8,
|
|
8919
|
+
}, null, 8, _hoisted_5$i)) : (openBlock(), createElementBlock("view", _hoisted_6$h, [
|
|
8983
8920
|
createElementVNode("view", {
|
|
8984
8921
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
8985
8922
|
class: "nut-uploader__preview-img__file__name"
|
|
@@ -8989,17 +8926,17 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8989
8926
|
name: "link"
|
|
8990
8927
|
}),
|
|
8991
8928
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
8992
|
-
], 8,
|
|
8929
|
+
], 8, _hoisted_7$f)
|
|
8993
8930
|
])),
|
|
8994
|
-
createElementVNode("view",
|
|
8995
|
-
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view",
|
|
8931
|
+
createElementVNode("view", _hoisted_8$a, toDisplayString(item.name), 1)
|
|
8932
|
+
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_9$6, [
|
|
8996
8933
|
createElementVNode("view", {
|
|
8997
8934
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
8998
8935
|
class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
|
|
8999
8936
|
}, [
|
|
9000
8937
|
createVNode(_component_nut_icon, { name: "link" }),
|
|
9001
8938
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
9002
|
-
], 10,
|
|
8939
|
+
], 10, _hoisted_10$4),
|
|
9003
8940
|
createVNode(_component_nut_icon, {
|
|
9004
8941
|
class: "nut-uploader__preview-img__file__del",
|
|
9005
8942
|
onClick: ($event) => _ctx.onDelete(item, index),
|
|
@@ -9025,26 +8962,7 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9025
8962
|
color: "#808080",
|
|
9026
8963
|
name: _ctx.uploadIcon
|
|
9027
8964
|
}), null, 16, ["size", "name"]),
|
|
9028
|
-
|
|
9029
|
-
key: 0,
|
|
9030
|
-
class: "nut-uploader__input",
|
|
9031
|
-
type: "file",
|
|
9032
|
-
capture: "camera",
|
|
9033
|
-
accept: _ctx.accept,
|
|
9034
|
-
multiple: _ctx.multiple,
|
|
9035
|
-
name: _ctx.name,
|
|
9036
|
-
disabled: _ctx.disabled,
|
|
9037
|
-
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
9038
|
-
}, null, 40, _hoisted_15$1)) : (openBlock(), createElementBlock("input", {
|
|
9039
|
-
key: 1,
|
|
9040
|
-
class: "nut-uploader__input",
|
|
9041
|
-
type: "file",
|
|
9042
|
-
accept: _ctx.accept,
|
|
9043
|
-
multiple: _ctx.multiple,
|
|
9044
|
-
name: _ctx.name,
|
|
9045
|
-
disabled: _ctx.disabled,
|
|
9046
|
-
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
9047
|
-
}, null, 40, _hoisted_16$1))
|
|
8965
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), { onChange: _ctx.onChange }, null, 40, ["onChange"]))
|
|
9048
8966
|
], 2)) : createCommentVNode("", true)
|
|
9049
8967
|
], 2);
|
|
9050
8968
|
}
|
|
@@ -15551,7 +15469,7 @@ const _hoisted_1$r = {
|
|
|
15551
15469
|
class: "nut-popover-content-group"
|
|
15552
15470
|
};
|
|
15553
15471
|
const _hoisted_2$o = ["onClick"];
|
|
15554
|
-
const _hoisted_3$m = { class: "nut-popover-menu-name" };
|
|
15472
|
+
const _hoisted_3$m = { class: "nut-popover-menu-item-name" };
|
|
15555
15473
|
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15556
15474
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
15557
15475
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
@@ -19927,6 +19845,6 @@ function install(app) {
|
|
|
19927
19845
|
}
|
|
19928
19846
|
});
|
|
19929
19847
|
}
|
|
19930
|
-
const version = "3.
|
|
19848
|
+
const version = "3.3.0";
|
|
19931
19849
|
var nutui_vue_build = { install, version, Locale };
|
|
19932
19850
|
export { ActionSheet, Address, AddressList, Animate, Audio, AudioOperate, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Category, CategoryPane, Cell, CellGroup, _sfc_main$1e as Checkbox, _sfc_main$1d as CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, Comment, _sfc_main$1H as ConfigProvider, CountDown, CountUp, DatePicker, _Dialog as Dialog, Divider, Drag, Ecard, Elevator, Ellipsis, Empty, FixedNav, Form, FormItem, _sfc_main$1A as Grid, GridItem, _sfc_main$1N as Icon, Image$1 as Image, _ImagePreview as ImagePreview, Indicator, InfiniteLoading, Input, InputNumber, Invoice, _sfc_main$1F as Layout, List, Locale, Menu, MenuItem, Navbar, NoticeBar, NotifyFunction as Notify, NumberKeyboard, OverLay, Pagination, Picker, Popover, Popup, Price, Progress, _sfc_main$17 as Radio, _sfc_main$16 as RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Sku, Step, _sfc_main$H as Steps, _sfc_main$1C as Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, ToastFunction as Toast, TrendArrow, Uploader, Video, WaterMark, nutui_vue_build as default, install, version };
|