@nutui/nutui 3.1.10-beta.3 → 3.1.12-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 +43 -0
- package/dist/nutui.d.ts +2 -1
- package/dist/nutui.es.js +1642 -926
- package/dist/nutui.umd.js +1648 -931
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/Avatar.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/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 +2 -2
- 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/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 +3 -12
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +3 -2
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +83 -167
- package/dist/packages/_es/MenuItem.js +154 -15
- 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 +52 -13
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/Radio.js +18 -5
- package/dist/packages/_es/RadioGroup.js +6 -2
- package/dist/packages/_es/Range.js +3 -31
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +52 -49
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Sku.js +533 -0
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -2
- 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/Tabs.js +2 -2
- 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 +3 -3
- package/dist/packages/_es/Uploader.js +159 -73
- package/dist/packages/_es/Video.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 +31 -8
- package/dist/packages/_es/index3.js +13 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +4 -3
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/button/index.scss +3 -0
- package/dist/packages/menu/index.scss +32 -60
- package/dist/packages/menuitem/index.scss +36 -99
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/radio/index.scss +32 -4
- package/dist/packages/radiogroup/index.scss +20 -0
- package/dist/packages/searchbar/index.scss +25 -29
- package/dist/packages/sku/index.scss +147 -0
- package/dist/packages/uploader/index.scss +95 -8
- package/dist/style.css +1 -1
- package/dist/styles/mixins/index.scss +0 -4
- package/dist/styles/themes/default.scss +31 -30
- package/dist/styles/variables.scss +40 -3
- package/package.json +2 -1
- package/dist/packages/_es/style.css +0 -160
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -306,8 +306,8 @@ const ToastFunction = {
|
|
|
306
306
|
type: "loading"
|
|
307
307
|
}));
|
|
308
308
|
},
|
|
309
|
-
hide() {
|
|
310
|
-
clearToast();
|
|
309
|
+
hide(id) {
|
|
310
|
+
clearToast(id);
|
|
311
311
|
},
|
|
312
312
|
install(app) {
|
|
313
313
|
app.use(Toast);
|
|
@@ -19,11 +19,11 @@ var __publicField = (obj, key, value) => {
|
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
21
|
/*!
|
|
22
|
-
* @nutui/nutui v3.1.
|
|
22
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2021 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
|
26
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode,
|
|
26
|
+
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode } from "vue";
|
|
27
27
|
import { c as createComponent } from "./component.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
29
|
class UploadOptions {
|
|
@@ -61,7 +61,7 @@ class Uploader {
|
|
|
61
61
|
xhr.onreadystatechange = () => {
|
|
62
62
|
var _a2, _b;
|
|
63
63
|
if (xhr.readyState === 4) {
|
|
64
|
-
if (xhr.status
|
|
64
|
+
if (xhr.status == options.xhrState) {
|
|
65
65
|
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, xhr.responseText, options);
|
|
66
66
|
} else {
|
|
67
67
|
(_b = options.onFailure) == null ? void 0 : _b.call(options, xhr.responseText, options);
|
|
@@ -92,7 +92,7 @@ class Uploader {
|
|
|
92
92
|
name: options.name,
|
|
93
93
|
success(response) {
|
|
94
94
|
var _a2, _b;
|
|
95
|
-
if (options.xhrState
|
|
95
|
+
if (options.xhrState == response.statusCode) {
|
|
96
96
|
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
97
97
|
} else {
|
|
98
98
|
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
@@ -114,10 +114,12 @@ const { componentName, create } = createComponent("uploader");
|
|
|
114
114
|
class FileItem {
|
|
115
115
|
constructor() {
|
|
116
116
|
__publicField(this, "status", "ready");
|
|
117
|
+
__publicField(this, "message", "\u51C6\u5907\u5B8C\u6210");
|
|
117
118
|
__publicField(this, "uid", new Date().getTime().toString());
|
|
118
119
|
__publicField(this, "name");
|
|
119
120
|
__publicField(this, "url");
|
|
120
121
|
__publicField(this, "type");
|
|
122
|
+
__publicField(this, "percentage", 0);
|
|
121
123
|
__publicField(this, "formData", new FormData());
|
|
122
124
|
}
|
|
123
125
|
}
|
|
@@ -128,12 +130,13 @@ const _sfc_main = create({
|
|
|
128
130
|
timeout: { type: [Number, String], default: 1e3 * 30 },
|
|
129
131
|
fileList: { type: Array, default: () => [] },
|
|
130
132
|
isPreview: { type: Boolean, default: true },
|
|
133
|
+
listType: { type: String, default: "picture" },
|
|
131
134
|
isDeletable: { type: Boolean, default: true },
|
|
132
135
|
method: { type: String, default: "post" },
|
|
133
136
|
capture: { type: Boolean, default: false },
|
|
134
137
|
maximize: { type: [Number, String], default: Number.MAX_VALUE },
|
|
135
138
|
maximum: { type: [Number, String], default: 1 },
|
|
136
|
-
clearInput: { type: Boolean, default:
|
|
139
|
+
clearInput: { type: Boolean, default: true },
|
|
137
140
|
accept: { type: String, default: "*" },
|
|
138
141
|
headers: { type: Object, default: {} },
|
|
139
142
|
data: { type: Object, default: {} },
|
|
@@ -156,7 +159,17 @@ const _sfc_main = create({
|
|
|
156
159
|
},
|
|
157
160
|
onChange: { type: Function }
|
|
158
161
|
},
|
|
159
|
-
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
|
+
],
|
|
160
173
|
setup(props, { emit }) {
|
|
161
174
|
const fileList = reactive(props.fileList);
|
|
162
175
|
let uploadQueue = [];
|
|
@@ -169,12 +182,12 @@ const _sfc_main = create({
|
|
|
169
182
|
const clearInput = (el) => {
|
|
170
183
|
el.value = "";
|
|
171
184
|
};
|
|
185
|
+
const fileItemClick = (fileItem) => {
|
|
186
|
+
emit("file-item-click", { fileItem });
|
|
187
|
+
};
|
|
172
188
|
const executeUpload = (fileItem, index2) => {
|
|
173
189
|
const uploadOption = new UploadOptions();
|
|
174
190
|
uploadOption.url = props.url;
|
|
175
|
-
for (const [key, value] of Object.entries(props.data)) {
|
|
176
|
-
fileItem.formData.append(key, value);
|
|
177
|
-
}
|
|
178
191
|
uploadOption.formData = fileItem.formData;
|
|
179
192
|
uploadOption.timeout = props.timeout * 1;
|
|
180
193
|
uploadOption.method = props.method;
|
|
@@ -183,26 +196,33 @@ const _sfc_main = create({
|
|
|
183
196
|
uploadOption.withCredentials = props.withCredentials;
|
|
184
197
|
uploadOption.onStart = (option) => {
|
|
185
198
|
fileItem.status = "ready";
|
|
199
|
+
fileItem.message = "\u51C6\u5907\u4E0A\u4F20";
|
|
186
200
|
clearUploadQueue(index2);
|
|
187
201
|
emit("start", option);
|
|
188
202
|
};
|
|
189
|
-
uploadOption.onProgress = (
|
|
203
|
+
uploadOption.onProgress = (event, option) => {
|
|
190
204
|
fileItem.status = "uploading";
|
|
191
|
-
|
|
205
|
+
fileItem.message = "\u4E0A\u4F20\u4E2D";
|
|
206
|
+
fileItem.percentage = (event.loaded / event.total * 100).toFixed(0);
|
|
207
|
+
emit("progress", { event, option, percentage: fileItem.percentage });
|
|
192
208
|
};
|
|
193
209
|
uploadOption.onSuccess = (responseText, option) => {
|
|
194
210
|
fileItem.status = "success";
|
|
211
|
+
fileItem.message = "\u4E0A\u4F20\u6210\u529F";
|
|
195
212
|
emit("success", {
|
|
196
213
|
responseText,
|
|
197
|
-
option
|
|
214
|
+
option,
|
|
215
|
+
fileItem
|
|
198
216
|
});
|
|
199
217
|
emit("update:fileList", fileList);
|
|
200
218
|
};
|
|
201
219
|
uploadOption.onFailure = (responseText, option) => {
|
|
202
220
|
fileItem.status = "error";
|
|
221
|
+
fileItem.message = "\u4E0A\u4F20\u5931\u8D25";
|
|
203
222
|
emit("failure", {
|
|
204
223
|
responseText,
|
|
205
|
-
option
|
|
224
|
+
option,
|
|
225
|
+
fileItem
|
|
206
226
|
});
|
|
207
227
|
};
|
|
208
228
|
let task = new Uploader(uploadOption);
|
|
@@ -229,12 +249,16 @@ const _sfc_main = create({
|
|
|
229
249
|
const readFile = (files) => {
|
|
230
250
|
files.forEach((file, index2) => {
|
|
231
251
|
const formData = new FormData();
|
|
252
|
+
for (const [key, value] of Object.entries(props.data)) {
|
|
253
|
+
formData.append(key, value);
|
|
254
|
+
}
|
|
232
255
|
formData.append(props.name, file);
|
|
233
256
|
const fileItem = reactive(new FileItem());
|
|
234
257
|
fileItem.name = file.name;
|
|
235
258
|
fileItem.status = "ready";
|
|
236
259
|
fileItem.type = file.type;
|
|
237
260
|
fileItem.formData = formData;
|
|
261
|
+
fileItem.message = "\u7B49\u5F85\u4E0A\u4F20";
|
|
238
262
|
executeUpload(fileItem, index2);
|
|
239
263
|
if (props.isPreview && file.type.includes("image")) {
|
|
240
264
|
const reader = new FileReader();
|
|
@@ -308,6 +332,7 @@ const _sfc_main = create({
|
|
|
308
332
|
onDelete,
|
|
309
333
|
fileList,
|
|
310
334
|
classes,
|
|
335
|
+
fileItemClick,
|
|
311
336
|
clearUploadQueue,
|
|
312
337
|
submit
|
|
313
338
|
};
|
|
@@ -319,20 +344,37 @@ const _hoisted_1 = {
|
|
|
319
344
|
};
|
|
320
345
|
const _hoisted_2 = ["accept", "multiple", "name", "disabled"];
|
|
321
346
|
const _hoisted_3 = ["accept", "multiple", "name", "disabled"];
|
|
322
|
-
const _hoisted_4 = {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
key: 2,
|
|
326
|
-
class: "tips"
|
|
347
|
+
const _hoisted_4 = {
|
|
348
|
+
key: 0,
|
|
349
|
+
class: "nut-uploader__preview-img"
|
|
327
350
|
};
|
|
328
|
-
const
|
|
351
|
+
const _hoisted_5 = {
|
|
329
352
|
key: 0,
|
|
330
|
-
class: "nut-
|
|
353
|
+
class: "nut-uploader__preview__progress"
|
|
354
|
+
};
|
|
355
|
+
const _hoisted_6 = { class: "nut-uploader__preview__progress__msg" };
|
|
356
|
+
const _hoisted_7 = {
|
|
357
|
+
key: 1,
|
|
358
|
+
class: "nut-uploader__preview__progress"
|
|
331
359
|
};
|
|
332
|
-
const _hoisted_8 =
|
|
333
|
-
const _hoisted_9 = ["
|
|
360
|
+
const _hoisted_8 = { class: "nut-uploader__preview__progress__msg" };
|
|
361
|
+
const _hoisted_9 = ["onClick", "src"];
|
|
362
|
+
const _hoisted_10 = {
|
|
363
|
+
key: 4,
|
|
364
|
+
class: "nut-uploader__preview-img__file"
|
|
365
|
+
};
|
|
366
|
+
const _hoisted_11 = ["onClick"];
|
|
367
|
+
const _hoisted_12 = { class: "tips" };
|
|
368
|
+
const _hoisted_13 = {
|
|
369
|
+
key: 1,
|
|
370
|
+
class: "nut-uploader__preview-list"
|
|
371
|
+
};
|
|
372
|
+
const _hoisted_14 = ["onClick"];
|
|
373
|
+
const _hoisted_15 = ["accept", "multiple", "name", "disabled"];
|
|
374
|
+
const _hoisted_16 = ["accept", "multiple", "name", "disabled"];
|
|
334
375
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
335
376
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
377
|
+
const _component_nut_progress = resolveComponent("nut-progress");
|
|
336
378
|
return openBlock(), createElementBlock("view", {
|
|
337
379
|
class: normalizeClass(_ctx.classes)
|
|
338
380
|
}, [
|
|
@@ -360,57 +402,101 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
360
402
|
onChange: _cache[1] || (_cache[1] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
361
403
|
}, null, 40, _hoisted_3))
|
|
362
404
|
], 64)) : createCommentVNode("", true)
|
|
363
|
-
])) : (
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
name: "
|
|
376
|
-
}, null, 8, ["
|
|
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
|
-
|
|
405
|
+
])) : createCommentVNode("", true),
|
|
406
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item, index2) => {
|
|
407
|
+
return openBlock(), createElementBlock("view", {
|
|
408
|
+
class: normalizeClass(["nut-uploader__preview", [_ctx.listType]]),
|
|
409
|
+
key: item.uid
|
|
410
|
+
}, [
|
|
411
|
+
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
412
|
+
item.status == "ready" ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
413
|
+
createElementVNode("view", _hoisted_6, toDisplayString(item.message), 1)
|
|
414
|
+
])) : item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
415
|
+
createVNode(_component_nut_icon, {
|
|
416
|
+
color: "#fff",
|
|
417
|
+
name: item.status == "error" ? "failure" : "loading"
|
|
418
|
+
}, null, 8, ["name"]),
|
|
419
|
+
createElementVNode("view", _hoisted_8, toDisplayString(item.message), 1)
|
|
420
|
+
])) : createCommentVNode("", true),
|
|
421
|
+
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, {
|
|
422
|
+
key: 2,
|
|
423
|
+
color: "rgba(0,0,0,0.6)",
|
|
424
|
+
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
425
|
+
class: "close",
|
|
426
|
+
name: "failure"
|
|
427
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
428
|
+
item.type.includes("image") && item.url ? (openBlock(), createElementBlock("img", {
|
|
429
|
+
key: 3,
|
|
430
|
+
class: "nut-uploader__preview-img__c",
|
|
431
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
432
|
+
src: item.url
|
|
433
|
+
}, null, 8, _hoisted_9)) : (openBlock(), createElementBlock("view", _hoisted_10, [
|
|
434
|
+
createElementVNode("view", {
|
|
435
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
436
|
+
class: "nut-uploader__preview-img__file__name"
|
|
437
|
+
}, [
|
|
438
|
+
createVNode(_component_nut_icon, {
|
|
439
|
+
color: "#808080",
|
|
440
|
+
name: "link"
|
|
441
|
+
}),
|
|
442
|
+
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
443
|
+
], 8, _hoisted_11)
|
|
444
|
+
])),
|
|
445
|
+
createElementVNode("view", _hoisted_12, toDisplayString(item.name), 1)
|
|
446
|
+
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_13, [
|
|
447
|
+
createElementVNode("view", {
|
|
448
|
+
onClick: ($event) => _ctx.fileItemClick(item),
|
|
449
|
+
class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
|
|
450
|
+
}, [
|
|
451
|
+
createVNode(_component_nut_icon, { name: "link" }),
|
|
452
|
+
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
453
|
+
], 10, _hoisted_14),
|
|
454
|
+
createVNode(_component_nut_icon, {
|
|
455
|
+
class: "nut-uploader__preview-img__file__del",
|
|
456
|
+
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
457
|
+
color: "#808080",
|
|
458
|
+
name: "del"
|
|
459
|
+
}, null, 8, ["onClick"]),
|
|
460
|
+
item.status == "uploading" ? (openBlock(), createBlock(_component_nut_progress, {
|
|
461
|
+
key: 0,
|
|
462
|
+
size: "small",
|
|
463
|
+
percentage: item.percentage,
|
|
464
|
+
"stroke-color": "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
|
|
465
|
+
"show-text": false
|
|
466
|
+
}, null, 8, ["percentage"])) : createCommentVNode("", true)
|
|
467
|
+
])) : createCommentVNode("", true)
|
|
468
|
+
], 2);
|
|
469
|
+
}), 128)),
|
|
470
|
+
_ctx.listType == "picture" && !_ctx.$slots.default && _ctx.maximum - _ctx.fileList.length ? (openBlock(), createElementBlock("view", {
|
|
471
|
+
key: 1,
|
|
472
|
+
class: normalizeClass(["nut-uploader__upload", [_ctx.listType]])
|
|
473
|
+
}, [
|
|
474
|
+
createVNode(_component_nut_icon, {
|
|
475
|
+
size: _ctx.uploadIconSize,
|
|
476
|
+
color: "#808080",
|
|
477
|
+
name: _ctx.uploadIcon
|
|
478
|
+
}, null, 8, ["size", "name"]),
|
|
479
|
+
_ctx.capture ? (openBlock(), createElementBlock("input", {
|
|
480
|
+
key: 0,
|
|
481
|
+
class: "nut-uploader__input",
|
|
482
|
+
type: "file",
|
|
483
|
+
capture: "camera",
|
|
484
|
+
accept: _ctx.accept,
|
|
485
|
+
multiple: _ctx.multiple,
|
|
486
|
+
name: _ctx.name,
|
|
487
|
+
disabled: _ctx.disabled,
|
|
488
|
+
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
489
|
+
}, null, 40, _hoisted_15)) : (openBlock(), createElementBlock("input", {
|
|
490
|
+
key: 1,
|
|
491
|
+
class: "nut-uploader__input",
|
|
492
|
+
type: "file",
|
|
493
|
+
accept: _ctx.accept,
|
|
494
|
+
multiple: _ctx.multiple,
|
|
495
|
+
name: _ctx.name,
|
|
496
|
+
disabled: _ctx.disabled,
|
|
497
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
498
|
+
}, null, 40, _hoisted_16))
|
|
499
|
+
], 2)) : createCommentVNode("", true)
|
|
414
500
|
], 2);
|
|
415
501
|
}
|
|
416
502
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
if (instance) {
|
|
10
|
-
Object.assign(instance.proxy, apis);
|
|
11
|
-
}
|
|
6
|
+
import { unref } from "vue";
|
|
7
|
+
function isWindow(val) {
|
|
8
|
+
return val === window;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
const useRect = (elementRef) => {
|
|
11
|
+
const element = unref(elementRef);
|
|
12
|
+
if (isWindow(element)) {
|
|
13
|
+
const width = element.innerWidth;
|
|
14
|
+
const height = element.innerHeight;
|
|
15
|
+
return {
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
right: width,
|
|
19
|
+
bottom: height,
|
|
20
|
+
width,
|
|
21
|
+
height
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (element && element.getBoundingClientRect) {
|
|
25
|
+
return element.getBoundingClientRect();
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
top: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
bottom: 0,
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export { useRect as u };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2021 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { getCurrentInstance } from "vue";
|
|
7
|
+
function useExpose(apis) {
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
if (instance) {
|
|
10
|
+
Object.assign(instance.proxy, apis);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export { useExpose as u };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
var _export_sfc = (sfc, props) => {
|
|
7
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
8
|
for (const [key, val] of props) {
|
|
8
|
-
|
|
9
|
+
target[key] = val;
|
|
9
10
|
}
|
|
10
|
-
return
|
|
11
|
+
return target;
|
|
11
12
|
};
|
|
12
13
|
export { _export_sfc as _ };
|
package/dist/packages/_es/raf.js
CHANGED
|
@@ -1,73 +1,45 @@
|
|
|
1
|
-
.nut-
|
|
1
|
+
.nut-menu__bar {
|
|
2
2
|
position: relative;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
display: flex;
|
|
4
|
+
line-height: $nut-menu-bar-line-height;
|
|
5
|
+
background-color: $white;
|
|
6
|
+
border-bottom: 1px solid $nut-menu-bar-border-bottom-color;
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
line-height: 46px;
|
|
9
|
-
align-items: center;
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
border-bottom: 1px solid #eaf0fb;
|
|
12
|
-
|
|
13
|
-
.title {
|
|
14
|
-
flex: 1;
|
|
15
|
-
text-align: center;
|
|
16
|
-
|
|
17
|
-
&.is-active {
|
|
18
|
-
font-weight: 600;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.disabled {
|
|
22
|
-
color: #999;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[class*='nut-icon-arrow'] {
|
|
26
|
-
vertical-align: middle;
|
|
27
|
-
margin-right: 2px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
8
|
+
&.opened {
|
|
9
|
+
z-index: $nut-menu-bar-opened-z-index;
|
|
30
10
|
}
|
|
31
11
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
border-radius: 0 0 12px 12px;
|
|
39
|
-
background-color: #fff;
|
|
40
|
-
}
|
|
12
|
+
.nut-menu__item {
|
|
13
|
+
flex: 1;
|
|
14
|
+
text-align: center;
|
|
15
|
+
font-size: $font-size-2;
|
|
16
|
+
color: $title-color;
|
|
17
|
+
min-width: 0;
|
|
41
18
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
overflow-y: auto;
|
|
19
|
+
&.disabled {
|
|
20
|
+
color: $nut-menu-item-disabled-color;
|
|
21
|
+
}
|
|
46
22
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
flex-wrap: wrap;
|
|
50
|
-
list-style: none;
|
|
51
|
-
margin: 0;
|
|
52
|
-
padding: 0;
|
|
23
|
+
.nut-menu__title-icon {
|
|
24
|
+
transition: all 0.2s linear;
|
|
53
25
|
}
|
|
54
26
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
27
|
+
.nut-menu__title {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
max-width: 100%;
|
|
32
|
+
|
|
33
|
+
.nut-menu__title-text {
|
|
34
|
+
@include text-ellipsis;
|
|
35
|
+
display: block;
|
|
36
|
+
padding-left: $nut-menu-title-text-padding-left;
|
|
37
|
+
padding-right: $nut-menu-title-text-padding-right;
|
|
38
|
+
}
|
|
59
39
|
|
|
60
|
-
.nut-icon
|
|
61
|
-
|
|
62
|
-
margin-right: 6px;
|
|
40
|
+
&.active .nut-menu__title-icon {
|
|
41
|
+
transform: rotate(180deg);
|
|
63
42
|
}
|
|
64
43
|
}
|
|
65
44
|
}
|
|
66
|
-
|
|
67
|
-
.customer-item {
|
|
68
|
-
@extend %itemCommon;
|
|
69
|
-
padding-left: 24px;
|
|
70
|
-
padding-right: 24px;
|
|
71
|
-
box-sizing: border-box;
|
|
72
|
-
}
|
|
73
45
|
}
|