@nutui/nutui 3.2.8-beta.0 → 3.2.8-beta.2
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/dist/nutui.es.js +67 -149
- package/dist/nutui.umd.js +67 -149
- 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 +1 -1
- 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/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +46 -46
- package/dist/styles/themes/jdb.scss +46 -46
- package/dist/styles/themes/jddkh.scss +46 -46
- package/dist/styles/themes/jdt.scss +46 -46
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +4 -4
- package/dist/types/__VUE/address/index.vue.d.ts +3 -3
- 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 +3 -3
- 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 +1 -1
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- 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 +5 -5
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- 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/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
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.2 Fri Dec 02 2022 18:18:57 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot,
|
|
7
|
-
import { c as createComponent
|
|
6
|
+
import { reactive, computed, h, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, mergeProps, createVNode, createTextVNode } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { f as funInterceptor } from "./interceptor.js";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
import "../locale/lang";
|
|
10
11
|
class UploadOptions {
|
|
@@ -62,46 +63,6 @@ class Uploader {
|
|
|
62
63
|
console.warn("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 XMLHttpRequest");
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
uploadTaro(uploadFile, env) {
|
|
66
|
-
var _a;
|
|
67
|
-
const options = this.options;
|
|
68
|
-
if (env === "WEB") {
|
|
69
|
-
this.upload();
|
|
70
|
-
} else {
|
|
71
|
-
if (options.beforeXhrUpload) {
|
|
72
|
-
options.beforeXhrUpload(uploadFile, options);
|
|
73
|
-
} else {
|
|
74
|
-
const uploadTask = uploadFile({
|
|
75
|
-
url: options.url,
|
|
76
|
-
filePath: options.taroFilePath,
|
|
77
|
-
fileType: options.fileType,
|
|
78
|
-
header: {
|
|
79
|
-
"Content-Type": "multipart/form-data",
|
|
80
|
-
...options.headers
|
|
81
|
-
},
|
|
82
|
-
formData: options.formData,
|
|
83
|
-
name: options.name,
|
|
84
|
-
success(response) {
|
|
85
|
-
var _a2, _b;
|
|
86
|
-
if (options.xhrState == response.statusCode) {
|
|
87
|
-
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
88
|
-
} else {
|
|
89
|
-
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
fail(e) {
|
|
93
|
-
var _a2;
|
|
94
|
-
(_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
98
|
-
uploadTask.progress((res) => {
|
|
99
|
-
var _a2;
|
|
100
|
-
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
66
|
}
|
|
106
67
|
const { translate: translate$1 } = createComponent("uploader");
|
|
107
68
|
class FileItem {
|
|
@@ -175,6 +136,19 @@ const _sfc_main = create({
|
|
|
175
136
|
[prefixCls]: true
|
|
176
137
|
};
|
|
177
138
|
});
|
|
139
|
+
const renderInput = () => {
|
|
140
|
+
let params = {
|
|
141
|
+
class: `nut-uploader__input`,
|
|
142
|
+
type: "file",
|
|
143
|
+
accept: props.accept,
|
|
144
|
+
multiple: props.multiple,
|
|
145
|
+
name: props.name,
|
|
146
|
+
disabled: props.disabled
|
|
147
|
+
};
|
|
148
|
+
if (props.capture)
|
|
149
|
+
params.capture = "camera";
|
|
150
|
+
return h("input", params);
|
|
151
|
+
};
|
|
178
152
|
const clearInput = (el) => {
|
|
179
153
|
el.value = "";
|
|
180
154
|
};
|
|
@@ -307,20 +281,10 @@ const _sfc_main = create({
|
|
|
307
281
|
};
|
|
308
282
|
const onDelete = (file, index2) => {
|
|
309
283
|
clearUploadQueue(index2);
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
deleted(file, index2);
|
|
315
|
-
}
|
|
316
|
-
}).catch((error) => {
|
|
317
|
-
console.log(error, "\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
318
|
-
});
|
|
319
|
-
} else if (fn) {
|
|
320
|
-
deleted(file, index2);
|
|
321
|
-
} else {
|
|
322
|
-
console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
323
|
-
}
|
|
284
|
+
funInterceptor(props.beforeDelete, {
|
|
285
|
+
args: [file, fileList],
|
|
286
|
+
done: () => deleted(file, index2)
|
|
287
|
+
});
|
|
324
288
|
};
|
|
325
289
|
const onChange = (event) => {
|
|
326
290
|
if (props.disabled) {
|
|
@@ -329,13 +293,9 @@ const _sfc_main = create({
|
|
|
329
293
|
const $el = event.target;
|
|
330
294
|
let { files } = $el;
|
|
331
295
|
if (props.beforeUpload) {
|
|
332
|
-
props.beforeUpload(files).then((f) =>
|
|
333
|
-
const _files = filterFiles(new Array().slice.call(f));
|
|
334
|
-
readFile(_files);
|
|
335
|
-
});
|
|
296
|
+
props.beforeUpload(files).then((f) => changeReadFile(f));
|
|
336
297
|
} else {
|
|
337
|
-
|
|
338
|
-
readFile(_files);
|
|
298
|
+
changeReadFile(files);
|
|
339
299
|
}
|
|
340
300
|
emit("change", {
|
|
341
301
|
fileList,
|
|
@@ -345,6 +305,10 @@ const _sfc_main = create({
|
|
|
345
305
|
clearInput($el);
|
|
346
306
|
}
|
|
347
307
|
};
|
|
308
|
+
const changeReadFile = (f) => {
|
|
309
|
+
const _files = filterFiles(new Array().slice.call(f));
|
|
310
|
+
readFile(_files);
|
|
311
|
+
};
|
|
348
312
|
return {
|
|
349
313
|
onChange,
|
|
350
314
|
onDelete,
|
|
@@ -352,7 +316,8 @@ const _sfc_main = create({
|
|
|
352
316
|
classes,
|
|
353
317
|
fileItemClick,
|
|
354
318
|
clearUploadQueue,
|
|
355
|
-
submit
|
|
319
|
+
submit,
|
|
320
|
+
renderInput
|
|
356
321
|
};
|
|
357
322
|
}
|
|
358
323
|
});
|
|
@@ -360,36 +325,27 @@ const _hoisted_1 = {
|
|
|
360
325
|
key: 0,
|
|
361
326
|
class: "nut-uploader__slot"
|
|
362
327
|
};
|
|
363
|
-
const _hoisted_2 =
|
|
364
|
-
const _hoisted_3 = ["accept", "multiple", "name", "disabled"];
|
|
365
|
-
const _hoisted_4 = {
|
|
328
|
+
const _hoisted_2 = {
|
|
366
329
|
key: 0,
|
|
367
330
|
class: "nut-uploader__preview-img"
|
|
368
331
|
};
|
|
369
|
-
const
|
|
332
|
+
const _hoisted_3 = {
|
|
370
333
|
key: 0,
|
|
371
334
|
class: "nut-uploader__preview__progress"
|
|
372
335
|
};
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
};
|
|
378
|
-
const _hoisted_8 = { class: "nut-uploader__preview__progress__msg" };
|
|
379
|
-
const _hoisted_9 = ["onClick", "src"];
|
|
380
|
-
const _hoisted_10 = {
|
|
381
|
-
key: 4,
|
|
336
|
+
const _hoisted_4 = { class: "nut-uploader__preview__progress__msg" };
|
|
337
|
+
const _hoisted_5 = ["onClick", "src"];
|
|
338
|
+
const _hoisted_6 = {
|
|
339
|
+
key: 3,
|
|
382
340
|
class: "nut-uploader__preview-img__file"
|
|
383
341
|
};
|
|
384
|
-
const
|
|
385
|
-
const
|
|
386
|
-
const
|
|
342
|
+
const _hoisted_7 = ["onClick"];
|
|
343
|
+
const _hoisted_8 = { class: "tips" };
|
|
344
|
+
const _hoisted_9 = {
|
|
387
345
|
key: 1,
|
|
388
346
|
class: "nut-uploader__preview-list"
|
|
389
347
|
};
|
|
390
|
-
const
|
|
391
|
-
const _hoisted_15 = ["accept", "multiple", "name", "disabled"];
|
|
392
|
-
const _hoisted_16 = ["accept", "multiple", "name", "disabled"];
|
|
348
|
+
const _hoisted_10 = ["onClick"];
|
|
393
349
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
394
350
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
395
351
|
const _component_nut_progress = resolveComponent("nut-progress");
|
|
@@ -398,55 +354,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
398
354
|
}, [
|
|
399
355
|
_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
400
356
|
renderSlot(_ctx.$slots, "default"),
|
|
401
|
-
_ctx.maximum - _ctx.fileList.length ? (openBlock(),
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
type: "file",
|
|
406
|
-
capture: "camera",
|
|
407
|
-
accept: _ctx.accept,
|
|
408
|
-
multiple: _ctx.multiple,
|
|
409
|
-
name: _ctx.name,
|
|
410
|
-
disabled: _ctx.disabled,
|
|
411
|
-
onChange: _cache[0] || (_cache[0] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
412
|
-
}, null, 40, _hoisted_2)) : (openBlock(), createElementBlock("input", {
|
|
413
|
-
key: 1,
|
|
414
|
-
class: "nut-uploader__input",
|
|
415
|
-
type: "file",
|
|
416
|
-
accept: _ctx.accept,
|
|
417
|
-
multiple: _ctx.multiple,
|
|
418
|
-
name: _ctx.name,
|
|
419
|
-
disabled: _ctx.disabled,
|
|
420
|
-
onChange: _cache[1] || (_cache[1] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
421
|
-
}, null, 40, _hoisted_3))
|
|
422
|
-
], 64)) : createCommentVNode("", true)
|
|
357
|
+
_ctx.maximum - _ctx.fileList.length ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), {
|
|
358
|
+
key: 0,
|
|
359
|
+
onChange: _ctx.onChange
|
|
360
|
+
}, null, 40, ["onChange"])) : createCommentVNode("", true)
|
|
423
361
|
])) : createCommentVNode("", true),
|
|
424
362
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item, index2) => {
|
|
425
363
|
return openBlock(), createElementBlock("view", {
|
|
426
364
|
class: normalizeClass(["nut-uploader__preview", [_ctx.listType]]),
|
|
427
365
|
key: item.uid
|
|
428
366
|
}, [
|
|
429
|
-
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view",
|
|
430
|
-
item.status
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
createVNode(_component_nut_icon, {
|
|
367
|
+
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
368
|
+
item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
369
|
+
item.status != "ready" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
370
|
+
key: 0,
|
|
434
371
|
color: "#fff",
|
|
435
372
|
name: item.status == "error" ? "failure" : "loading"
|
|
436
|
-
}, null, 8, ["name"]),
|
|
437
|
-
createElementVNode("view",
|
|
373
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
374
|
+
createElementVNode("view", _hoisted_4, toDisplayString(item.message), 1)
|
|
438
375
|
])) : createCommentVNode("", true),
|
|
439
|
-
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, mergeProps({ key:
|
|
376
|
+
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
440
377
|
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
441
378
|
class: "close",
|
|
442
379
|
name: _ctx.deleteIcon
|
|
443
380
|
}), null, 16, ["onClick", "name"])) : createCommentVNode("", true),
|
|
444
381
|
item.type.includes("image") && item.url ? (openBlock(), createElementBlock("img", {
|
|
445
|
-
key:
|
|
382
|
+
key: 2,
|
|
446
383
|
class: "nut-uploader__preview-img__c",
|
|
447
384
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
448
385
|
src: item.url
|
|
449
|
-
}, null, 8,
|
|
386
|
+
}, null, 8, _hoisted_5)) : (openBlock(), createElementBlock("view", _hoisted_6, [
|
|
450
387
|
createElementVNode("view", {
|
|
451
388
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
452
389
|
class: "nut-uploader__preview-img__file__name"
|
|
@@ -456,17 +393,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
456
393
|
name: "link"
|
|
457
394
|
}),
|
|
458
395
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
459
|
-
], 8,
|
|
396
|
+
], 8, _hoisted_7)
|
|
460
397
|
])),
|
|
461
|
-
createElementVNode("view",
|
|
462
|
-
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view",
|
|
398
|
+
createElementVNode("view", _hoisted_8, toDisplayString(item.name), 1)
|
|
399
|
+
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_9, [
|
|
463
400
|
createElementVNode("view", {
|
|
464
401
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
465
402
|
class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
|
|
466
403
|
}, [
|
|
467
404
|
createVNode(_component_nut_icon, { name: "link" }),
|
|
468
405
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
469
|
-
], 10,
|
|
406
|
+
], 10, _hoisted_10),
|
|
470
407
|
createVNode(_component_nut_icon, {
|
|
471
408
|
class: "nut-uploader__preview-img__file__del",
|
|
472
409
|
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
@@ -492,26 +429,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
492
429
|
color: "#808080",
|
|
493
430
|
name: _ctx.uploadIcon
|
|
494
431
|
}), null, 16, ["size", "name"]),
|
|
495
|
-
|
|
496
|
-
key: 0,
|
|
497
|
-
class: "nut-uploader__input",
|
|
498
|
-
type: "file",
|
|
499
|
-
capture: "camera",
|
|
500
|
-
accept: _ctx.accept,
|
|
501
|
-
multiple: _ctx.multiple,
|
|
502
|
-
name: _ctx.name,
|
|
503
|
-
disabled: _ctx.disabled,
|
|
504
|
-
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
505
|
-
}, null, 40, _hoisted_15)) : (openBlock(), createElementBlock("input", {
|
|
506
|
-
key: 1,
|
|
507
|
-
class: "nut-uploader__input",
|
|
508
|
-
type: "file",
|
|
509
|
-
accept: _ctx.accept,
|
|
510
|
-
multiple: _ctx.multiple,
|
|
511
|
-
name: _ctx.name,
|
|
512
|
-
disabled: _ctx.disabled,
|
|
513
|
-
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
514
|
-
}, null, 40, _hoisted_16))
|
|
432
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput), { onChange: _ctx.onChange }, null, 40, ["onChange"]))
|
|
515
433
|
], 2)) : createCommentVNode("", true)
|
|
516
434
|
], 2);
|
|
517
435
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.2 Fri Dec 02 2022 18:18:57 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -14,7 +14,7 @@ const funInterceptor = (interceptor, {
|
|
|
14
14
|
if (isPromise(returnVal)) {
|
|
15
15
|
returnVal.then((value) => {
|
|
16
16
|
if (value) {
|
|
17
|
-
done();
|
|
17
|
+
done(value);
|
|
18
18
|
} else if (canceled) {
|
|
19
19
|
canceled();
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.2 Fri Dec 02 2022 18:18:57 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -16,7 +16,7 @@ const CreateComponent = (options, component) => {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
const root = document.createElement("view");
|
|
19
|
-
const name = component.name
|
|
19
|
+
const name = component.name ? component.name + "-" : "";
|
|
20
20
|
const id1 = options.id || new Date().getTime();
|
|
21
21
|
root.id = name + id1;
|
|
22
22
|
let Wrapper = {};
|
package/dist/packages/_es/raf.js
CHANGED