@nutui/nutui 3.1.10-beta.1 → 3.1.11-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 +26 -0
- package/README.md +2 -2
- package/dist/nutui.d.ts +6 -6
- package/dist/nutui.es.js +1643 -1116
- package/dist/nutui.umd.js +1708 -1181
- package/dist/packages/_es/ActionSheet.js +10 -12
- package/dist/packages/_es/Address.js +31 -33
- package/dist/packages/_es/Avatar.js +5 -4
- package/dist/packages/_es/BackTop.js +5 -4
- package/dist/packages/_es/Badge.js +5 -4
- package/dist/packages/_es/Barrage.js +9 -8
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +14 -16
- package/dist/packages/_es/Cell.js +5 -4
- package/dist/packages/_es/CellGroup.js +8 -7
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +5 -4
- package/dist/packages/_es/Col.js +5 -4
- package/dist/packages/_es/Collapse.js +8 -7
- package/dist/packages/_es/CollapseItem.js +6 -8
- package/dist/packages/_es/CountDown.js +5 -7
- package/dist/packages/_es/CountUp.js +26 -28
- package/dist/packages/_es/DatePicker.js +11 -13
- package/dist/packages/_es/Dialog.js +14 -25
- package/dist/packages/_es/Divider.js +5 -4
- package/dist/packages/_es/Drag.js +5 -4
- package/dist/packages/_es/Elevator.js +19 -21
- package/dist/packages/_es/FixedNav.js +9 -8
- package/dist/packages/_es/Icon.js +40 -6
- package/dist/packages/_es/ImagePreview.js +12 -13
- package/dist/packages/_es/InfiniteLoading.js +5 -7
- package/dist/packages/_es/Input.js +10 -9
- package/dist/packages/_es/InputNumber.js +8 -15
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +203 -0
- package/dist/packages/_es/MenuItem.js +18 -171
- package/dist/packages/_es/Navbar.js +7 -6
- package/dist/packages/_es/NoticeBar.js +9 -11
- package/dist/packages/_es/Notify.js +10 -12
- package/dist/packages/_es/NumberKeyboard.js +5 -4
- package/dist/packages/_es/OverLay.js +5 -7
- package/dist/packages/_es/Pagination.js +7 -6
- package/dist/packages/_es/Picker.js +12 -14
- package/dist/packages/_es/Popover.js +10 -12
- package/dist/packages/_es/Popup.js +9 -11
- package/dist/packages/_es/Price.js +33 -14
- package/dist/packages/_es/Progress.js +5 -4
- package/dist/packages/_es/Radio.js +20 -7
- package/dist/packages/_es/RadioGroup.js +7 -3
- package/dist/packages/_es/Range.js +13 -15
- package/dist/packages/_es/Rate.js +8 -7
- package/dist/packages/_es/Row.js +5 -4
- package/dist/packages/_es/SearchBar.js +56 -55
- package/dist/packages/_es/ShortPassword.js +8 -7
- package/dist/packages/_es/Signature.js +5 -4
- package/dist/packages/_es/Sku.js +533 -0
- package/dist/packages/_es/Step.js +14 -11
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +5 -7
- package/dist/packages/_es/Swiper.js +12 -11
- package/dist/packages/_es/SwiperItem.js +5 -4
- package/dist/packages/_es/Switch.js +5 -4
- package/dist/packages/_es/TabPane.js +5 -4
- package/dist/packages/_es/Tabbar.js +5 -4
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Tabs.js +43 -18
- package/dist/packages/_es/Tag.js +16 -18
- package/dist/packages/_es/TextArea.js +6 -5
- package/dist/packages/_es/TimeDetail.js +5 -7
- package/dist/packages/_es/TimePannel.js +5 -7
- package/dist/packages/_es/TimeSelect.js +5 -4
- package/dist/packages/_es/Toast.js +10 -12
- package/dist/packages/_es/Uploader.js +165 -89
- package/dist/packages/_es/Video.js +5 -7
- 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/plugin-vue_export-helper.js +12 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +160 -0
- package/dist/packages/button/index.scss +3 -0
- package/dist/packages/checkbox/index.scss +2 -0
- package/dist/packages/dialog/index.scss +2 -1
- package/dist/packages/menu/index.scss +70 -4
- package/dist/packages/price/index.scss +40 -3
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/radio/index.scss +34 -4
- package/dist/packages/radiogroup/index.scss +20 -0
- package/dist/packages/searchbar/index.scss +35 -30
- package/dist/packages/sku/index.scss +147 -0
- package/dist/packages/tabs/index.scss +47 -19
- package/dist/packages/tag/index.scss +2 -1
- package/dist/packages/uploader/index.scss +94 -8
- package/dist/style.css +1 -1
- package/dist/style.es.js +2 -1
- package/dist/styles/mixins/index.scss +0 -4
- package/dist/styles/themes/default.scss +29 -30
- package/dist/styles/variables.scss +46 -6
- package/package.json +1 -1
- package/dist/packages/_es/Tab.js +0 -178
- package/dist/packages/_es/TabPanel.js +0 -29
- package/dist/packages/_es/index.vue_vue&type=script&lang.js +0 -44
- package/dist/packages/tab/index.scss +0 -182
- package/dist/packages/tabpanel/index.scss +0 -2
|
@@ -14,20 +14,18 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
18
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
-
};
|
|
20
17
|
var __publicField = (obj, key, value) => {
|
|
21
18
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
19
|
return value;
|
|
23
20
|
};
|
|
24
21
|
/*!
|
|
25
|
-
* @nutui/nutui v3.1.
|
|
22
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
26
23
|
* (c) 2021 @jdf2e.
|
|
27
24
|
* Released under the MIT License.
|
|
28
25
|
*/
|
|
29
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList,
|
|
26
|
+
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createVNode, createElementVNode, toDisplayString, createBlock, createTextVNode } from "vue";
|
|
30
27
|
import { c as createComponent } from "./component.js";
|
|
28
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
31
29
|
class UploadOptions {
|
|
32
30
|
constructor() {
|
|
33
31
|
__publicField(this, "url", "");
|
|
@@ -63,7 +61,7 @@ class Uploader {
|
|
|
63
61
|
xhr.onreadystatechange = () => {
|
|
64
62
|
var _a2, _b;
|
|
65
63
|
if (xhr.readyState === 4) {
|
|
66
|
-
if (xhr.status
|
|
64
|
+
if (xhr.status == options.xhrState) {
|
|
67
65
|
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, xhr.responseText, options);
|
|
68
66
|
} else {
|
|
69
67
|
(_b = options.onFailure) == null ? void 0 : _b.call(options, xhr.responseText, options);
|
|
@@ -94,7 +92,7 @@ class Uploader {
|
|
|
94
92
|
name: options.name,
|
|
95
93
|
success(response) {
|
|
96
94
|
var _a2, _b;
|
|
97
|
-
if (options.xhrState
|
|
95
|
+
if (options.xhrState == response.statusCode) {
|
|
98
96
|
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
99
97
|
} else {
|
|
100
98
|
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
@@ -116,26 +114,29 @@ const { componentName, create } = createComponent("uploader");
|
|
|
116
114
|
class FileItem {
|
|
117
115
|
constructor() {
|
|
118
116
|
__publicField(this, "status", "ready");
|
|
117
|
+
__publicField(this, "message", "\u51C6\u5907\u5B8C\u6210");
|
|
119
118
|
__publicField(this, "uid", new Date().getTime().toString());
|
|
120
119
|
__publicField(this, "name");
|
|
121
120
|
__publicField(this, "url");
|
|
122
121
|
__publicField(this, "type");
|
|
122
|
+
__publicField(this, "percentage", 0);
|
|
123
123
|
__publicField(this, "formData", new FormData());
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
const _sfc_main = create({
|
|
127
127
|
props: {
|
|
128
128
|
name: { type: String, default: "file" },
|
|
129
129
|
url: { type: String, default: "" },
|
|
130
130
|
timeout: { type: [Number, String], default: 1e3 * 30 },
|
|
131
131
|
fileList: { type: Array, default: () => [] },
|
|
132
132
|
isPreview: { type: Boolean, default: true },
|
|
133
|
+
listType: { type: String, default: "picture" },
|
|
133
134
|
isDeletable: { type: Boolean, default: true },
|
|
134
135
|
method: { type: String, default: "post" },
|
|
135
136
|
capture: { type: Boolean, default: false },
|
|
136
137
|
maximize: { type: [Number, String], default: Number.MAX_VALUE },
|
|
137
138
|
maximum: { type: [Number, String], default: 1 },
|
|
138
|
-
clearInput: { type: Boolean, default:
|
|
139
|
+
clearInput: { type: Boolean, default: true },
|
|
139
140
|
accept: { type: String, default: "*" },
|
|
140
141
|
headers: { type: Object, default: {} },
|
|
141
142
|
data: { type: Object, default: {} },
|
|
@@ -158,7 +159,17 @@ var _sfc_main = create({
|
|
|
158
159
|
},
|
|
159
160
|
onChange: { type: Function }
|
|
160
161
|
},
|
|
161
|
-
emits: [
|
|
162
|
+
emits: [
|
|
163
|
+
"start",
|
|
164
|
+
"progress",
|
|
165
|
+
"oversize",
|
|
166
|
+
"success",
|
|
167
|
+
"failure",
|
|
168
|
+
"change",
|
|
169
|
+
"delete",
|
|
170
|
+
"update:fileList",
|
|
171
|
+
"file-item-click"
|
|
172
|
+
],
|
|
162
173
|
setup(props, { emit }) {
|
|
163
174
|
const fileList = reactive(props.fileList);
|
|
164
175
|
let uploadQueue = [];
|
|
@@ -171,12 +182,12 @@ var _sfc_main = create({
|
|
|
171
182
|
const clearInput = (el) => {
|
|
172
183
|
el.value = "";
|
|
173
184
|
};
|
|
174
|
-
const
|
|
185
|
+
const fileItemClick = (fileItem) => {
|
|
186
|
+
emit("file-item-click", { fileItem });
|
|
187
|
+
};
|
|
188
|
+
const executeUpload = (fileItem, index2) => {
|
|
175
189
|
const uploadOption = new UploadOptions();
|
|
176
190
|
uploadOption.url = props.url;
|
|
177
|
-
for (const [key, value] of Object.entries(props.data)) {
|
|
178
|
-
fileItem.formData.append(key, value);
|
|
179
|
-
}
|
|
180
191
|
uploadOption.formData = fileItem.formData;
|
|
181
192
|
uploadOption.timeout = props.timeout * 1;
|
|
182
193
|
uploadOption.method = props.method;
|
|
@@ -185,26 +196,33 @@ var _sfc_main = create({
|
|
|
185
196
|
uploadOption.withCredentials = props.withCredentials;
|
|
186
197
|
uploadOption.onStart = (option) => {
|
|
187
198
|
fileItem.status = "ready";
|
|
188
|
-
|
|
199
|
+
fileItem.message = "\u51C6\u5907\u4E0A\u4F20";
|
|
200
|
+
clearUploadQueue(index2);
|
|
189
201
|
emit("start", option);
|
|
190
202
|
};
|
|
191
|
-
uploadOption.onProgress = (
|
|
203
|
+
uploadOption.onProgress = (event, option) => {
|
|
192
204
|
fileItem.status = "uploading";
|
|
193
|
-
|
|
205
|
+
fileItem.message = "\u4E0A\u4F20\u4E2D";
|
|
206
|
+
fileItem.percentage = (event.loaded / event.total * 100).toFixed(0);
|
|
207
|
+
emit("progress", { event, option, percentage: fileItem.percentage });
|
|
194
208
|
};
|
|
195
209
|
uploadOption.onSuccess = (responseText, option) => {
|
|
196
210
|
fileItem.status = "success";
|
|
211
|
+
fileItem.message = "\u4E0A\u4F20\u6210\u529F";
|
|
197
212
|
emit("success", {
|
|
198
213
|
responseText,
|
|
199
|
-
option
|
|
214
|
+
option,
|
|
215
|
+
fileItem
|
|
200
216
|
});
|
|
201
217
|
emit("update:fileList", fileList);
|
|
202
218
|
};
|
|
203
219
|
uploadOption.onFailure = (responseText, option) => {
|
|
204
220
|
fileItem.status = "error";
|
|
221
|
+
fileItem.message = "\u4E0A\u4F20\u5931\u8D25";
|
|
205
222
|
emit("failure", {
|
|
206
223
|
responseText,
|
|
207
|
-
option
|
|
224
|
+
option,
|
|
225
|
+
fileItem
|
|
208
226
|
});
|
|
209
227
|
};
|
|
210
228
|
let task = new Uploader(uploadOption);
|
|
@@ -216,9 +234,9 @@ var _sfc_main = create({
|
|
|
216
234
|
}));
|
|
217
235
|
}
|
|
218
236
|
};
|
|
219
|
-
const clearUploadQueue = (
|
|
220
|
-
if (
|
|
221
|
-
uploadQueue.splice(
|
|
237
|
+
const clearUploadQueue = (index2 = -1) => {
|
|
238
|
+
if (index2 > -1) {
|
|
239
|
+
uploadQueue.splice(index2, 1);
|
|
222
240
|
} else {
|
|
223
241
|
uploadQueue = [];
|
|
224
242
|
}
|
|
@@ -229,15 +247,18 @@ var _sfc_main = create({
|
|
|
229
247
|
});
|
|
230
248
|
};
|
|
231
249
|
const readFile = (files) => {
|
|
232
|
-
files.forEach((file,
|
|
250
|
+
files.forEach((file, index2) => {
|
|
233
251
|
const formData = new FormData();
|
|
252
|
+
for (const [key, value] of Object.entries(props.data)) {
|
|
253
|
+
formData.append(key, value);
|
|
254
|
+
}
|
|
234
255
|
formData.append(props.name, file);
|
|
235
256
|
const fileItem = reactive(new FileItem());
|
|
236
257
|
fileItem.name = file.name;
|
|
237
258
|
fileItem.status = "ready";
|
|
238
259
|
fileItem.type = file.type;
|
|
239
260
|
fileItem.formData = formData;
|
|
240
|
-
executeUpload(fileItem,
|
|
261
|
+
executeUpload(fileItem, index2);
|
|
241
262
|
if (props.isPreview && file.type.includes("image")) {
|
|
242
263
|
const reader = new FileReader();
|
|
243
264
|
reader.onload = (event) => {
|
|
@@ -270,10 +291,10 @@ var _sfc_main = create({
|
|
|
270
291
|
}
|
|
271
292
|
return files;
|
|
272
293
|
};
|
|
273
|
-
const onDelete = (file,
|
|
274
|
-
clearUploadQueue(
|
|
294
|
+
const onDelete = (file, index2) => {
|
|
295
|
+
clearUploadQueue(index2);
|
|
275
296
|
if (props.beforeDelete(file, fileList)) {
|
|
276
|
-
fileList.splice(
|
|
297
|
+
fileList.splice(index2, 1);
|
|
277
298
|
emit("delete", {
|
|
278
299
|
file,
|
|
279
300
|
fileList
|
|
@@ -310,6 +331,7 @@ var _sfc_main = create({
|
|
|
310
331
|
onDelete,
|
|
311
332
|
fileList,
|
|
312
333
|
classes,
|
|
334
|
+
fileItemClick,
|
|
313
335
|
clearUploadQueue,
|
|
314
336
|
submit
|
|
315
337
|
};
|
|
@@ -321,20 +343,32 @@ const _hoisted_1 = {
|
|
|
321
343
|
};
|
|
322
344
|
const _hoisted_2 = ["accept", "multiple", "name", "disabled"];
|
|
323
345
|
const _hoisted_3 = ["accept", "multiple", "name", "disabled"];
|
|
324
|
-
const _hoisted_4 = {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
key: 2,
|
|
328
|
-
class: "tips"
|
|
346
|
+
const _hoisted_4 = {
|
|
347
|
+
key: 0,
|
|
348
|
+
class: "nut-uploader__preview-img"
|
|
329
349
|
};
|
|
330
|
-
const
|
|
350
|
+
const _hoisted_5 = {
|
|
331
351
|
key: 0,
|
|
332
|
-
class: "nut-
|
|
352
|
+
class: "nut-uploader__preview__progress"
|
|
353
|
+
};
|
|
354
|
+
const _hoisted_6 = { class: "nut-uploader__preview__progress__msg" };
|
|
355
|
+
const _hoisted_7 = ["onClick", "src"];
|
|
356
|
+
const _hoisted_8 = {
|
|
357
|
+
key: 3,
|
|
358
|
+
class: "nut-uploader__preview-img__file"
|
|
333
359
|
};
|
|
334
|
-
const
|
|
335
|
-
const
|
|
360
|
+
const _hoisted_9 = ["onClick"];
|
|
361
|
+
const _hoisted_10 = { class: "tips" };
|
|
362
|
+
const _hoisted_11 = {
|
|
363
|
+
key: 1,
|
|
364
|
+
class: "nut-uploader__preview-list"
|
|
365
|
+
};
|
|
366
|
+
const _hoisted_12 = ["onClick"];
|
|
367
|
+
const _hoisted_13 = ["accept", "multiple", "name", "disabled"];
|
|
368
|
+
const _hoisted_14 = ["accept", "multiple", "name", "disabled"];
|
|
336
369
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
337
370
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
371
|
+
const _component_nut_progress = resolveComponent("nut-progress");
|
|
338
372
|
return openBlock(), createElementBlock("view", {
|
|
339
373
|
class: normalizeClass(_ctx.classes)
|
|
340
374
|
}, [
|
|
@@ -362,58 +396,100 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
362
396
|
onChange: _cache[1] || (_cache[1] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
363
397
|
}, null, 40, _hoisted_3))
|
|
364
398
|
], 64)) : createCommentVNode("", true)
|
|
365
|
-
])) : (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
color: "
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
])
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
399
|
+
])) : createCommentVNode("", true),
|
|
400
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item, index2) => {
|
|
401
|
+
return openBlock(), createElementBlock("view", {
|
|
402
|
+
class: normalizeClass(["nut-uploader__preview", [_ctx.listType]]),
|
|
403
|
+
key: item.uid
|
|
404
|
+
}, [
|
|
405
|
+
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
406
|
+
item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
407
|
+
createVNode(_component_nut_icon, {
|
|
408
|
+
color: "#fff",
|
|
409
|
+
name: item.status == "error" ? "failure" : "loading"
|
|
410
|
+
}, null, 8, ["name"]),
|
|
411
|
+
createElementVNode("view", _hoisted_6, toDisplayString(item.message), 1)
|
|
412
|
+
])) : createCommentVNode("", true),
|
|
413
|
+
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, {
|
|
414
|
+
key: 1,
|
|
415
|
+
color: "rgba(0,0,0,0.6)",
|
|
416
|
+
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
417
|
+
class: "close",
|
|
418
|
+
name: "failure"
|
|
419
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
420
|
+
item.type.includes("image") && item.url ? (openBlock(), createElementBlock("img", {
|
|
421
|
+
key: 2,
|
|
422
|
+
class: "nut-uploader__preview-img__c",
|
|
423
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
424
|
+
src: item.url
|
|
425
|
+
}, null, 8, _hoisted_7)) : (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
426
|
+
createElementVNode("view", {
|
|
427
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
428
|
+
class: "nut-uploader__preview-img__file__name"
|
|
429
|
+
}, [
|
|
430
|
+
createVNode(_component_nut_icon, {
|
|
431
|
+
color: "#808080",
|
|
432
|
+
name: "link"
|
|
433
|
+
}),
|
|
434
|
+
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
435
|
+
], 8, _hoisted_9)
|
|
436
|
+
])),
|
|
437
|
+
createElementVNode("view", _hoisted_10, toDisplayString(item.name), 1)
|
|
438
|
+
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_11, [
|
|
439
|
+
createElementVNode("view", {
|
|
440
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
441
|
+
class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
|
|
442
|
+
}, [
|
|
443
|
+
createVNode(_component_nut_icon, { name: "link" }),
|
|
444
|
+
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
445
|
+
], 10, _hoisted_12),
|
|
446
|
+
createVNode(_component_nut_icon, {
|
|
447
|
+
class: "nut-uploader__preview-img__file__del",
|
|
448
|
+
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
449
|
+
color: "#808080",
|
|
450
|
+
name: "del"
|
|
451
|
+
}, null, 8, ["onClick"]),
|
|
452
|
+
item.status == "uploading" ? (openBlock(), createBlock(_component_nut_progress, {
|
|
453
|
+
key: 0,
|
|
454
|
+
size: "small",
|
|
455
|
+
percentage: item.percentage,
|
|
456
|
+
"stroke-color": "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
|
|
457
|
+
"show-text": false
|
|
458
|
+
}, null, 8, ["percentage"])) : createCommentVNode("", true)
|
|
459
|
+
])) : createCommentVNode("", true)
|
|
460
|
+
], 2);
|
|
461
|
+
}), 128)),
|
|
462
|
+
_ctx.listType == "picture" && !_ctx.$slots.default && _ctx.maximum - _ctx.fileList.length ? (openBlock(), createElementBlock("view", {
|
|
463
|
+
key: 1,
|
|
464
|
+
class: normalizeClass(["nut-uploader__upload", [_ctx.listType]])
|
|
465
|
+
}, [
|
|
466
|
+
createVNode(_component_nut_icon, {
|
|
467
|
+
size: _ctx.uploadIconSize,
|
|
468
|
+
color: "#808080",
|
|
469
|
+
name: _ctx.uploadIcon
|
|
470
|
+
}, null, 8, ["size", "name"]),
|
|
471
|
+
_ctx.capture ? (openBlock(), createElementBlock("input", {
|
|
472
|
+
key: 0,
|
|
473
|
+
class: "nut-uploader__input",
|
|
474
|
+
type: "file",
|
|
475
|
+
capture: "camera",
|
|
476
|
+
accept: _ctx.accept,
|
|
477
|
+
multiple: _ctx.multiple,
|
|
478
|
+
name: _ctx.name,
|
|
479
|
+
disabled: _ctx.disabled,
|
|
480
|
+
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
481
|
+
}, null, 40, _hoisted_13)) : (openBlock(), createElementBlock("input", {
|
|
482
|
+
key: 1,
|
|
483
|
+
class: "nut-uploader__input",
|
|
484
|
+
type: "file",
|
|
485
|
+
accept: _ctx.accept,
|
|
486
|
+
multiple: _ctx.multiple,
|
|
487
|
+
name: _ctx.name,
|
|
488
|
+
disabled: _ctx.disabled,
|
|
489
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
490
|
+
}, null, 40, _hoisted_14))
|
|
491
|
+
], 2)) : createCommentVNode("", true)
|
|
416
492
|
], 2);
|
|
417
493
|
}
|
|
418
|
-
_sfc_main
|
|
419
|
-
export { FileItem,
|
|
494
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
495
|
+
export { FileItem, index as default };
|
|
@@ -17,16 +17,14 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
28
|
const throttle = (func, wait, type) => {
|
|
31
29
|
if (type === 1) {
|
|
32
30
|
var previous = 0;
|
|
@@ -53,7 +51,7 @@ const throttle = (func, wait, type) => {
|
|
|
53
51
|
};
|
|
54
52
|
};
|
|
55
53
|
const { create } = createComponent("video");
|
|
56
|
-
|
|
54
|
+
const _sfc_main = create({
|
|
57
55
|
props: {
|
|
58
56
|
source: {
|
|
59
57
|
type: Object,
|
|
@@ -403,5 +401,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
403
401
|
])
|
|
404
402
|
], 512);
|
|
405
403
|
}
|
|
406
|
-
_sfc_main
|
|
407
|
-
export {
|
|
404
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
405
|
+
export { index as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2021 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
var _export_sfc = (sfc, props) => {
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
sfc[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return sfc;
|
|
11
|
+
};
|
|
12
|
+
export { _export_sfc as _ };
|
package/dist/packages/_es/raf.js
CHANGED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
.nut-menu {
|
|
2
|
+
position: relative;
|
|
3
|
+
font-size: 14px;
|
|
4
|
+
color: #1a1a1a;
|
|
5
|
+
}
|
|
6
|
+
.nut-menu .title-list {
|
|
7
|
+
display: flex;
|
|
8
|
+
line-height: 46px;
|
|
9
|
+
align-items: center;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
border-bottom: 1px solid #eaf0fb;
|
|
12
|
+
}
|
|
13
|
+
.nut-menu .title-list .title {
|
|
14
|
+
flex: 1;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
.nut-menu .title-list .title.is-active {
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
}
|
|
20
|
+
.nut-menu .title-list .title.disabled {
|
|
21
|
+
color: #999;
|
|
22
|
+
}
|
|
23
|
+
.nut-menu .title-list .title [class*=nut-icon-arrow] {
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
margin-right: 2px;
|
|
26
|
+
}
|
|
27
|
+
.nut-menu .customer-item, .nut-menu .option-list {
|
|
28
|
+
position: absolute;
|
|
29
|
+
left: 0;
|
|
30
|
+
width: 100%;
|
|
31
|
+
padding-top: 12px;
|
|
32
|
+
padding-bottom: 12px;
|
|
33
|
+
border-radius: 0 0 12px 12px;
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
}
|
|
36
|
+
.nut-menu .option-list {
|
|
37
|
+
max-height: 214px;
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
}
|
|
40
|
+
.nut-menu .option-list ul {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
list-style: none;
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
.nut-menu .option-list li {
|
|
48
|
+
line-height: 38px;
|
|
49
|
+
padding-left: 24px;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
.nut-menu .option-list li .nut-icon-Check {
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
margin-right: 6px;
|
|
55
|
+
}
|
|
56
|
+
.nut-menu .customer-item {
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
padding-right: 24px;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
}.nut-menu-item[data-v-02edb907] {
|
|
61
|
+
flex: 1;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
padding: 0 5px;
|
|
67
|
+
}
|
|
68
|
+
.nut-menu-item.disabled[data-v-02edb907] {
|
|
69
|
+
color: #999;
|
|
70
|
+
}
|
|
71
|
+
.nut-menu-item.nut-menu-item-active .nut-menu-title[data-v-02edb907] {
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
}
|
|
74
|
+
.nut-menu-item.nut-menu-item-active .nut-menu-title .icon[data-v-02edb907] {
|
|
75
|
+
color: #1a1a1a;
|
|
76
|
+
transition: all ease 0.3s;
|
|
77
|
+
transform: rotate(-180deg);
|
|
78
|
+
background: url("https://img14.360buyimg.com/imagetools/jfs/t1/144044/16/20214/521/5fe5bb14Ebf213fe3/40f271b982f31898.png") no-repeat;
|
|
79
|
+
background-size: contain;
|
|
80
|
+
}
|
|
81
|
+
.nut-menu-item.nut-menu-item-active .nut-menu-panel[data-v-02edb907] {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
.nut-menu-title[data-v-02edb907] {
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
.nut-menu-title .title-name[data-v-02edb907] {
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
max-width: 100px;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
}
|
|
95
|
+
.nut-menu-title .icon[data-v-02edb907] {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
width: 6px;
|
|
98
|
+
height: 6px;
|
|
99
|
+
background: url("https://img13.360buyimg.com/imagetools/jfs/t1/152898/12/10149/452/5fd990b5Ec7c12d70/3bf06076b758bed1.png") no-repeat;
|
|
100
|
+
background-size: contain;
|
|
101
|
+
color: #909ca4;
|
|
102
|
+
transform: rotate(0deg);
|
|
103
|
+
transition: all ease 0.3s;
|
|
104
|
+
margin: 0 2px;
|
|
105
|
+
}
|
|
106
|
+
.nut-menu-panel[data-v-02edb907] {
|
|
107
|
+
display: none;
|
|
108
|
+
width: 100%;
|
|
109
|
+
position: absolute;
|
|
110
|
+
left: 0;
|
|
111
|
+
top: 46px;
|
|
112
|
+
color: #2d2d2d;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
background-color: #fff;
|
|
115
|
+
-webkit-box-sizing: border-box;
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
-webkit-overflow-scrolling: touch;
|
|
118
|
+
z-index: 9998;
|
|
119
|
+
border-top: 1px solid #f7f8fa;
|
|
120
|
+
border-radius: 0 0 15px 15px;
|
|
121
|
+
box-shadow: 0 4px 5px 0px rgba(236, 236, 236, 0.25);
|
|
122
|
+
overflow: auto;
|
|
123
|
+
}
|
|
124
|
+
.menu-list[data-v-02edb907] {
|
|
125
|
+
display: flex;
|
|
126
|
+
padding: 10px 15px;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
}
|
|
129
|
+
.menu-list.bubble-line[data-v-02edb907] {
|
|
130
|
+
flex-flow: wrap;
|
|
131
|
+
}
|
|
132
|
+
.menu-list.bubble-line .menu-option[data-v-02edb907] {
|
|
133
|
+
width: 50%;
|
|
134
|
+
}
|
|
135
|
+
.menu-list.three-line[data-v-02edb907] {
|
|
136
|
+
flex-flow: wrap;
|
|
137
|
+
}
|
|
138
|
+
.menu-list.three-line .menu-option[data-v-02edb907] {
|
|
139
|
+
width: 33%;
|
|
140
|
+
}
|
|
141
|
+
.menu-list .menu-option[data-v-02edb907] {
|
|
142
|
+
min-height: 24px;
|
|
143
|
+
line-height: 42px;
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
color: #1a1a1a;
|
|
146
|
+
width: 100%;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
padding: 0 5px;
|
|
151
|
+
}
|
|
152
|
+
.menu-list .menu-option.checked[data-v-02edb907] {
|
|
153
|
+
font-weight: bold;
|
|
154
|
+
}
|
|
155
|
+
.menu-list .check-icon[data-v-02edb907] {
|
|
156
|
+
width: 14px;
|
|
157
|
+
height: 14px;
|
|
158
|
+
margin-right: 5px;
|
|
159
|
+
color: #fa2c19;
|
|
160
|
+
}
|