@nutui/nutui 4.1.2 → 4.1.4
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 +30 -0
- package/LICENSE +1 -1
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +3334 -3293
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +5 -3
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/Calendar.js +3 -3
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/FixedNav.js +67 -73
- package/dist/packages/_es/FormItem.js +1 -3
- package/dist/packages/_es/ImagePreview.js +1 -1
- package/dist/packages/_es/Input.js +8 -5
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Noticebar.js +1 -1
- package/dist/packages/_es/Notify.js +2 -2
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Picker.js +93 -54
- package/dist/packages/_es/Popover.js +2 -2
- package/dist/packages/_es/Popup.js +3 -3
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/Skeleton.js +86 -91
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/TimeSelect.js +2 -2
- package/dist/packages/_es/Tour.js +1 -1
- package/dist/packages/_es/{index-3a5098e4.js → index-66fff386.js} +19 -13
- package/dist/packages/_es/{index-5ffbc437.js → index-7fe29a2f.js} +96 -101
- package/dist/packages/calendar/index.scss +5 -8
- package/dist/packages/formitem/index.scss +3 -1
- package/dist/smartips/web-types.json +12 -3
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +13 -13
- package/dist/types/__VUE/address/index.vue.d.ts +12 -12
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +12 -12
- package/dist/types/__VUE/dialog/index.vue.d.ts +13 -13
- package/dist/types/__VUE/fixednav/index.vue.d.ts +6 -4
- package/dist/types/__VUE/formitem/index.vue.d.ts +4 -3
- package/dist/types/__VUE/image/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/overlay/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/baseProps.d.ts +5 -1
- package/dist/types/__VUE/picker/common.d.ts +19 -7
- package/dist/types/__VUE/picker/doc.en.d.ts +4 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +14 -3
- package/dist/types/__VUE/picker/types.d.ts +6 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +7 -4
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popup/index.vue.d.ts +30 -21
- package/dist/types/__VUE/popup/props.d.ts +4 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +8 -6
- package/dist/types/__VUE/sku/index.vue.d.ts +15 -15
- package/dist/types/__VUE/swipe/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tag/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/__VUE/fixednav/common.d.ts +0 -53
- package/dist/types/__VUE/formitem/common.d.ts +0 -0
- package/dist/types/__VUE/popup/common.d.ts +0 -107
- package/dist/types/__VUE/skeleton/common.d.ts +0 -57
|
@@ -17,72 +17,91 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { reactive,
|
|
20
|
+
import { reactive, computed, ref, watch, toRefs, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, resolveComponent, renderSlot, createVNode } from "vue";
|
|
21
21
|
import { c as createComponent, d as preventDefault, e as clamp } from "./component-0fbad28e.js";
|
|
22
22
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
23
23
|
import { u as useTouch } from "./index-7a7385e4.js";
|
|
24
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
25
25
|
import "../locale/lang";
|
|
26
|
-
const
|
|
26
|
+
const DEFAULT_FILED_NAMES = {
|
|
27
|
+
text: "text",
|
|
28
|
+
value: "value",
|
|
29
|
+
children: "children"
|
|
30
|
+
};
|
|
27
31
|
const usePicker = (props, emit) => {
|
|
28
32
|
const state = reactive({
|
|
29
33
|
formattedColumns: props.columns
|
|
30
34
|
});
|
|
35
|
+
const columnFieldNames = computed(() => {
|
|
36
|
+
return __spreadValues(__spreadValues({}, DEFAULT_FILED_NAMES), props.fieldNames);
|
|
37
|
+
});
|
|
31
38
|
const defaultValues = ref([]);
|
|
39
|
+
const defaultIndexes = computed(() => {
|
|
40
|
+
const fields = columnFieldNames.value;
|
|
41
|
+
return columnsList.value.map((column2, index) => {
|
|
42
|
+
const targetIndex = column2.findIndex((item) => item[fields.value] === defaultValues.value[index]);
|
|
43
|
+
return targetIndex === -1 ? 0 : targetIndex;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
32
46
|
const pickerColumn = ref([]);
|
|
33
47
|
const swipeRef = (el) => {
|
|
34
48
|
if (el && pickerColumn.value.length < columnsList.value.length) {
|
|
35
49
|
pickerColumn.value.push(el);
|
|
36
50
|
}
|
|
37
51
|
};
|
|
38
|
-
const classes = computed(() => {
|
|
39
|
-
const prefixCls = componentName;
|
|
40
|
-
return {
|
|
41
|
-
[prefixCls]: true
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
52
|
const selectedOptions = computed(() => {
|
|
53
|
+
const fields = columnFieldNames.value;
|
|
45
54
|
return columnsList.value.map((column2, index) => {
|
|
46
|
-
return column2.find((item) => item.value === defaultValues.value[index]);
|
|
55
|
+
return column2.find((item) => item[fields.value] === defaultValues.value[index]) || column2[0];
|
|
47
56
|
});
|
|
48
57
|
});
|
|
49
58
|
const columnsType = computed(() => {
|
|
50
59
|
const firstColumn = state.formattedColumns[0];
|
|
60
|
+
const fields = columnFieldNames.value;
|
|
51
61
|
if (firstColumn) {
|
|
52
62
|
if (Array.isArray(firstColumn)) {
|
|
53
63
|
return "multiple";
|
|
54
64
|
}
|
|
55
|
-
if (
|
|
65
|
+
if (fields.children in firstColumn) {
|
|
56
66
|
return "cascade";
|
|
57
67
|
}
|
|
58
68
|
}
|
|
59
69
|
return "single";
|
|
60
70
|
});
|
|
61
71
|
const columnsList = computed(() => {
|
|
72
|
+
let result = [];
|
|
62
73
|
switch (columnsType.value) {
|
|
63
74
|
case "multiple":
|
|
64
|
-
|
|
75
|
+
result = state.formattedColumns;
|
|
76
|
+
break;
|
|
65
77
|
case "cascade":
|
|
66
|
-
|
|
78
|
+
result = formatCascade(
|
|
79
|
+
state.formattedColumns,
|
|
80
|
+
defaultValues.value ? defaultValues.value : []
|
|
81
|
+
);
|
|
82
|
+
break;
|
|
67
83
|
default:
|
|
68
|
-
|
|
84
|
+
result = [state.formattedColumns];
|
|
85
|
+
break;
|
|
69
86
|
}
|
|
87
|
+
return result;
|
|
70
88
|
});
|
|
71
89
|
const formatCascade = (columns, defaultValues2) => {
|
|
72
90
|
const formatted = [];
|
|
91
|
+
const fields = columnFieldNames.value;
|
|
73
92
|
let cursor = {
|
|
74
93
|
text: "",
|
|
75
94
|
value: "",
|
|
76
|
-
children: columns
|
|
95
|
+
[fields.children]: columns
|
|
77
96
|
};
|
|
78
97
|
let columnIndex = 0;
|
|
79
|
-
while (cursor && cursor.children) {
|
|
80
|
-
const options = cursor.children;
|
|
98
|
+
while (cursor && cursor[fields.children]) {
|
|
99
|
+
const options = cursor[fields.children];
|
|
81
100
|
const value = defaultValues2[columnIndex];
|
|
82
|
-
let index = options.findIndex((columnItem) => columnItem.value === value);
|
|
101
|
+
let index = options.findIndex((columnItem) => columnItem[fields.value] === value);
|
|
83
102
|
if (index === -1)
|
|
84
103
|
index = 0;
|
|
85
|
-
cursor = cursor.children[index];
|
|
104
|
+
cursor = cursor[fields.children][index];
|
|
86
105
|
columnIndex++;
|
|
87
106
|
formatted.push(options);
|
|
88
107
|
}
|
|
@@ -95,22 +114,24 @@ const usePicker = (props, emit) => {
|
|
|
95
114
|
});
|
|
96
115
|
};
|
|
97
116
|
const changeHandler = (columnIndex, option) => {
|
|
117
|
+
var _a;
|
|
118
|
+
const fields = columnFieldNames.value;
|
|
98
119
|
if (option && Object.keys(option).length) {
|
|
99
120
|
defaultValues.value = defaultValues.value ? defaultValues.value : [];
|
|
100
121
|
if (columnsType.value === "cascade") {
|
|
101
|
-
defaultValues.value[columnIndex] = option.value ?
|
|
122
|
+
defaultValues.value[columnIndex] = (_a = option[fields.value]) != null ? _a : "";
|
|
102
123
|
let index = columnIndex;
|
|
103
124
|
let cursor = option;
|
|
104
|
-
while (cursor && cursor.children && cursor.children[0]) {
|
|
105
|
-
defaultValues.value[index + 1] = cursor.children[0].value;
|
|
125
|
+
while (cursor && cursor[fields.children] && cursor[fields.children][0]) {
|
|
126
|
+
defaultValues.value[index + 1] = cursor[fields.children][0][fields.value];
|
|
106
127
|
index++;
|
|
107
|
-
cursor = cursor.children[0];
|
|
128
|
+
cursor = cursor[fields.children][0];
|
|
108
129
|
}
|
|
109
|
-
if (cursor && cursor.children && cursor.children.length === 0) {
|
|
130
|
+
if (cursor && cursor[fields.children] && cursor[fields.children].length === 0) {
|
|
110
131
|
defaultValues.value = defaultValues.value.slice(0, index + 1);
|
|
111
132
|
}
|
|
112
133
|
} else {
|
|
113
|
-
defaultValues.value[columnIndex] = Object.prototype.hasOwnProperty.call(option,
|
|
134
|
+
defaultValues.value[columnIndex] = Object.prototype.hasOwnProperty.call(option, fields.value) ? option[fields.value] : "";
|
|
114
135
|
}
|
|
115
136
|
emit("change", {
|
|
116
137
|
columnIndex,
|
|
@@ -120,9 +141,10 @@ const usePicker = (props, emit) => {
|
|
|
120
141
|
}
|
|
121
142
|
};
|
|
122
143
|
const confirm = () => {
|
|
144
|
+
const fields = columnFieldNames.value;
|
|
123
145
|
if (defaultValues.value && !defaultValues.value.length) {
|
|
124
146
|
columnsList.value.forEach((columns) => {
|
|
125
|
-
defaultValues.value.push(columns[0].value);
|
|
147
|
+
defaultValues.value.push(columns[0][fields.value]);
|
|
126
148
|
});
|
|
127
149
|
}
|
|
128
150
|
emit("confirm", {
|
|
@@ -156,15 +178,15 @@ const usePicker = (props, emit) => {
|
|
|
156
178
|
state.formattedColumns = val;
|
|
157
179
|
}
|
|
158
180
|
);
|
|
159
|
-
return __spreadProps(__spreadValues({
|
|
160
|
-
classes
|
|
161
|
-
}, toRefs(state)), {
|
|
181
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
162
182
|
columnsType,
|
|
163
183
|
columnsList,
|
|
184
|
+
columnFieldNames,
|
|
164
185
|
cancel,
|
|
165
186
|
changeHandler,
|
|
166
187
|
confirm,
|
|
167
188
|
defaultValues,
|
|
189
|
+
defaultIndexes,
|
|
168
190
|
pickerColumn,
|
|
169
191
|
swipeRef,
|
|
170
192
|
selectedOptions,
|
|
@@ -197,6 +219,15 @@ const _sfc_main$1 = create$1({
|
|
|
197
219
|
optionHeight: {
|
|
198
220
|
type: [Number, String],
|
|
199
221
|
default: 36
|
|
222
|
+
},
|
|
223
|
+
fieldNames: {
|
|
224
|
+
type: Object,
|
|
225
|
+
default: () => ({})
|
|
226
|
+
},
|
|
227
|
+
// 特殊环境判断
|
|
228
|
+
taro: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
defualt: false
|
|
200
231
|
}
|
|
201
232
|
},
|
|
202
233
|
emits: ["click", "change"],
|
|
@@ -249,8 +280,8 @@ const _sfc_main$1 = create$1({
|
|
|
249
280
|
});
|
|
250
281
|
const onTouchStart = (event) => {
|
|
251
282
|
touch.start(event);
|
|
252
|
-
if (moving.value) {
|
|
253
|
-
|
|
283
|
+
if (moving.value && !props.taro) {
|
|
284
|
+
const dom = roller.value;
|
|
254
285
|
const { transform } = window.getComputedStyle(dom);
|
|
255
286
|
if (props.threeDimensional) {
|
|
256
287
|
const circle = Math.floor(parseInt(touchDeg.value) / 360);
|
|
@@ -346,7 +377,7 @@ const _sfc_main$1 = create$1({
|
|
|
346
377
|
};
|
|
347
378
|
const modifyStatus = (type) => {
|
|
348
379
|
const { column: column2 } = props;
|
|
349
|
-
let index = column2.findIndex((columnItem) => columnItem.value === props.value);
|
|
380
|
+
let index = column2.findIndex((columnItem) => columnItem[props.fieldNames.value] === props.value);
|
|
350
381
|
state.currIndex = index === -1 ? 1 : index + 1;
|
|
351
382
|
let move = index === -1 ? 0 : index * +props.optionHeight;
|
|
352
383
|
type && setChooseValue();
|
|
@@ -412,19 +443,20 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
412
443
|
onTransitionend: _cache[0] || (_cache[0] = (...args) => _ctx.stopMomentum && _ctx.stopMomentum(...args))
|
|
413
444
|
}, [
|
|
414
445
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.column, (item, index) => {
|
|
446
|
+
var _a;
|
|
415
447
|
return openBlock(), createElementBlock(Fragment, {
|
|
416
|
-
key: item.value ?
|
|
448
|
+
key: (_a = item[_ctx.fieldNames.value]) != null ? _a : index
|
|
417
449
|
}, [
|
|
418
|
-
item && item.text && _ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
450
|
+
item && item[_ctx.fieldNames.text] && _ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
419
451
|
key: 0,
|
|
420
452
|
class: normalizeClass(["nut-picker-roller-item", { "nut-picker-roller-item-hidden": _ctx.isHidden(index + 1) }]),
|
|
421
453
|
style: normalizeStyle(_ctx.setRollerStyle(index + 1))
|
|
422
|
-
}, toDisplayString(item.text), 7)) : createCommentVNode("", true),
|
|
423
|
-
item && item.text && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
454
|
+
}, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true),
|
|
455
|
+
item && item[_ctx.fieldNames.text] && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
424
456
|
key: 1,
|
|
425
457
|
class: "nut-picker-roller-item-tile",
|
|
426
458
|
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.optionHeight), lineHeight: _ctx.pxCheck(_ctx.optionHeight) })
|
|
427
|
-
}, toDisplayString(item.text), 5)) : createCommentVNode("", true)
|
|
459
|
+
}, toDisplayString(item[_ctx.fieldNames.text]), 5)) : createCommentVNode("", true)
|
|
428
460
|
], 64);
|
|
429
461
|
}), 128))
|
|
430
462
|
], 36),
|
|
@@ -460,7 +492,7 @@ const baseProps = {
|
|
|
460
492
|
},
|
|
461
493
|
threeDimensional: {
|
|
462
494
|
type: Boolean,
|
|
463
|
-
default:
|
|
495
|
+
default: false
|
|
464
496
|
},
|
|
465
497
|
swipeDuration: {
|
|
466
498
|
type: [Number, String],
|
|
@@ -477,6 +509,10 @@ const baseProps = {
|
|
|
477
509
|
optionHeight: {
|
|
478
510
|
type: [Number, String],
|
|
479
511
|
default: 36
|
|
512
|
+
},
|
|
513
|
+
fieldNames: {
|
|
514
|
+
type: Object,
|
|
515
|
+
default: () => ({})
|
|
480
516
|
}
|
|
481
517
|
};
|
|
482
518
|
const { create, translate } = createComponent("picker");
|
|
@@ -487,7 +523,10 @@ const _sfc_main = create({
|
|
|
487
523
|
props: baseProps,
|
|
488
524
|
emits: ["cancel", "change", "confirm", "update:modelValue"],
|
|
489
525
|
setup(props, { emit }) {
|
|
490
|
-
const { changeHandler, confirm, defaultValues, columnsList, columnsType,
|
|
526
|
+
const { changeHandler, confirm, defaultValues, columnsList, columnsType, columnFieldNames, cancel } = usePicker(
|
|
527
|
+
props,
|
|
528
|
+
emit
|
|
529
|
+
);
|
|
491
530
|
const pickerColumn = ref([]);
|
|
492
531
|
const swipeRef = (el) => {
|
|
493
532
|
if (el && pickerColumn.value.length < columnsList.value.length) {
|
|
@@ -507,10 +546,10 @@ const _sfc_main = create({
|
|
|
507
546
|
confirm();
|
|
508
547
|
};
|
|
509
548
|
return {
|
|
510
|
-
classes,
|
|
511
549
|
column,
|
|
512
550
|
columnsType,
|
|
513
551
|
columnsList,
|
|
552
|
+
columnFieldNames,
|
|
514
553
|
cancel,
|
|
515
554
|
changeHandler,
|
|
516
555
|
confirmHandler,
|
|
@@ -522,25 +561,24 @@ const _sfc_main = create({
|
|
|
522
561
|
};
|
|
523
562
|
}
|
|
524
563
|
});
|
|
525
|
-
const _hoisted_1 = {
|
|
564
|
+
const _hoisted_1 = { class: "nut-picker" };
|
|
565
|
+
const _hoisted_2 = {
|
|
526
566
|
key: 0,
|
|
527
567
|
class: "nut-picker__bar"
|
|
528
568
|
};
|
|
529
|
-
const
|
|
569
|
+
const _hoisted_3 = { class: "nut-picker__title" };
|
|
530
570
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
531
571
|
const _component_nut_picker_column = resolveComponent("nut-picker-column");
|
|
532
|
-
return openBlock(), createElementBlock("div",
|
|
533
|
-
|
|
534
|
-
}, [
|
|
535
|
-
_ctx.showToolbar ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
572
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
573
|
+
_ctx.showToolbar ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
536
574
|
createElementVNode("view", {
|
|
537
575
|
class: "nut-picker__left",
|
|
538
576
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.cancel && _ctx.cancel(...args))
|
|
539
577
|
}, toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1),
|
|
540
|
-
createElementVNode("view",
|
|
578
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1),
|
|
541
579
|
createElementVNode("view", {
|
|
542
580
|
class: "nut-picker__right",
|
|
543
|
-
onClick: _cache[1] || (_cache[1] = (
|
|
581
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirmHandler && _ctx.confirmHandler(...args))
|
|
544
582
|
}, toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
|
|
545
583
|
])) : createCommentVNode("", true),
|
|
546
584
|
renderSlot(_ctx.$slots, "top"),
|
|
@@ -557,21 +595,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
557
595
|
ref_for: true,
|
|
558
596
|
ref: _ctx.swipeRef,
|
|
559
597
|
column: column2,
|
|
560
|
-
|
|
598
|
+
"columns-type": _ctx.columnsType,
|
|
599
|
+
"field-names": _ctx.columnFieldNames,
|
|
561
600
|
value: _ctx.defaultValues && _ctx.defaultValues[columnIndex],
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
601
|
+
"three-dimensional": _ctx.threeDimensional,
|
|
602
|
+
"swipe-duration": _ctx.swipeDuration,
|
|
603
|
+
"visible-option-num": _ctx.visibleOptionNum,
|
|
604
|
+
"option-height": _ctx.optionHeight,
|
|
566
605
|
onChange: (option) => {
|
|
567
606
|
_ctx.changeHandler(columnIndex, option);
|
|
568
607
|
}
|
|
569
|
-
}, null, 8, ["column", "
|
|
608
|
+
}, null, 8, ["column", "columns-type", "field-names", "value", "three-dimensional", "swipe-duration", "visible-option-num", "option-height", "onChange"])
|
|
570
609
|
]);
|
|
571
610
|
}), 128))
|
|
572
611
|
], 4),
|
|
573
612
|
renderSlot(_ctx.$slots, "default")
|
|
574
|
-
]
|
|
613
|
+
]);
|
|
575
614
|
}
|
|
576
615
|
const Picker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
577
616
|
export {
|
|
@@ -2,11 +2,11 @@ import { ref, computed, onMounted, watch, resolveComponent, openBlock, createEle
|
|
|
2
2
|
import { i as isArray, c as createComponent } from "./component-0fbad28e.js";
|
|
3
3
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
4
4
|
import { u as useRect } from "./index-29892cda.js";
|
|
5
|
-
import { P as Popup } from "./index-
|
|
5
|
+
import { P as Popup } from "./index-7fe29a2f.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
8
|
-
import "./Overlay.js";
|
|
9
8
|
import "@nutui/icons-vue";
|
|
9
|
+
import "./Overlay.js";
|
|
10
10
|
const { create } = createComponent("popover");
|
|
11
11
|
const _sfc_main = create({
|
|
12
12
|
components: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { P } from "./index-
|
|
1
|
+
import { P } from "./index-7fe29a2f.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
|
+
import "@nutui/icons-vue";
|
|
5
|
+
import "./Overlay.js";
|
|
4
6
|
import "./component-0fbad28e.js";
|
|
5
7
|
import "../locale/lang";
|
|
6
|
-
import "./Overlay.js";
|
|
7
|
-
import "@nutui/icons-vue";
|
|
8
8
|
export {
|
|
9
9
|
P as default
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
-
import { P as Popup } from "./index-
|
|
3
|
+
import { P as Popup } from "./index-7fe29a2f.js";
|
|
4
4
|
import { Tips } from "@nutui/icons-vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
6
|
import "../locale/lang";
|
|
@@ -3,103 +3,98 @@ import { toRefs, computed, resolveComponent, openBlock, createElementBlock, rend
|
|
|
3
3
|
import Avatar from "./Avatar.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
height: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "15px"
|
|
19
|
-
},
|
|
20
|
-
//是否显示动画
|
|
21
|
-
animated: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
},
|
|
25
|
-
//头像
|
|
26
|
-
avatar: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false
|
|
29
|
-
},
|
|
30
|
-
//头像形状:正方形/圆形
|
|
31
|
-
avatarShape: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "round"
|
|
34
|
-
},
|
|
35
|
-
//头像大小
|
|
36
|
-
avatarSize: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "50px"
|
|
39
|
-
},
|
|
40
|
-
//是否显示骨架屏
|
|
41
|
-
loading: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: true
|
|
44
|
-
},
|
|
45
|
-
//标题/段落 圆角风格
|
|
46
|
-
round: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
},
|
|
50
|
-
//显示段落行数
|
|
51
|
-
row: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "1"
|
|
54
|
-
},
|
|
55
|
-
//是否显示段落标题
|
|
56
|
-
title: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: true
|
|
59
|
-
}
|
|
6
|
+
const { create } = createComponent("skeleton");
|
|
7
|
+
const _sfc_main = create({
|
|
8
|
+
components: {
|
|
9
|
+
[Avatar.name]: Avatar
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
//每行宽度
|
|
13
|
+
width: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "100px"
|
|
60
16
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
17
|
+
//每行高度
|
|
18
|
+
height: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "15px"
|
|
21
|
+
},
|
|
22
|
+
//是否显示动画
|
|
23
|
+
animated: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
//头像
|
|
28
|
+
avatar: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
//头像形状:正方形/圆形
|
|
33
|
+
avatarShape: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "round"
|
|
36
|
+
},
|
|
37
|
+
//头像大小
|
|
38
|
+
avatarSize: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "50px"
|
|
41
|
+
},
|
|
42
|
+
//是否显示骨架屏
|
|
43
|
+
loading: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
//标题/段落 圆角风格
|
|
48
|
+
round: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
//显示段落行数
|
|
53
|
+
row: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "1"
|
|
56
|
+
},
|
|
57
|
+
//是否显示段落标题
|
|
58
|
+
title: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
setup(props) {
|
|
64
|
+
const { avatarShape, round, avatarSize } = toRefs(props);
|
|
65
|
+
const avatarClass = computed(() => {
|
|
66
|
+
const prefixCls = "avatarClass";
|
|
67
|
+
return {
|
|
68
|
+
[prefixCls]: true,
|
|
69
|
+
[`${prefixCls}--${avatarShape.value}`]: avatarShape.value
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const getBlockClass = (prefixCls) => {
|
|
73
|
+
return {
|
|
74
|
+
[prefixCls]: true,
|
|
75
|
+
[`${prefixCls}--round`]: round.value
|
|
75
76
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
width: avatarSize.value,
|
|
80
|
-
height: avatarSize.value
|
|
81
|
-
};
|
|
82
|
-
}
|
|
77
|
+
};
|
|
78
|
+
const getStyle = () => {
|
|
79
|
+
if (avatarSize.value) {
|
|
83
80
|
return {
|
|
84
|
-
width:
|
|
85
|
-
height:
|
|
81
|
+
width: avatarSize.value,
|
|
82
|
+
height: avatarSize.value
|
|
86
83
|
};
|
|
87
|
-
}
|
|
84
|
+
}
|
|
88
85
|
return {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
getBlockClass,
|
|
92
|
-
getStyle
|
|
86
|
+
width: "50px",
|
|
87
|
+
height: "50px"
|
|
93
88
|
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
);
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
avatarShape,
|
|
92
|
+
avatarClass,
|
|
93
|
+
getBlockClass,
|
|
94
|
+
getStyle
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
103
98
|
const _hoisted_1 = { key: 0 };
|
|
104
99
|
const _hoisted_2 = {
|
|
105
100
|
key: 1,
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -22,7 +22,7 @@ import Price from "./Price.js";
|
|
|
22
22
|
import { c as createComponent, T as TypeOfFun } from "./component-0fbad28e.js";
|
|
23
23
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
24
24
|
import InputNumber from "./InputNumber.js";
|
|
25
|
-
import { p as popupProps, P as Popup } from "./index-
|
|
25
|
+
import { p as popupProps, P as Popup } from "./index-7fe29a2f.js";
|
|
26
26
|
import "../locale/lang";
|
|
27
27
|
import "./pxCheck-c6b9f6b7.js";
|
|
28
28
|
import "@nutui/icons-vue";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-0fbad28e.js";
|
|
3
|
-
import { P as Popup } from "./index-
|
|
3
|
+
import { P as Popup } from "./index-7fe29a2f.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
import "./Overlay.js";
|
|
7
6
|
import "@nutui/icons-vue";
|
|
7
|
+
import "./Overlay.js";
|
|
8
8
|
const { componentName, create, translate } = createComponent("time-select");
|
|
9
9
|
const _sfc_main = create({
|
|
10
10
|
components: {
|
|
@@ -25,7 +25,7 @@ import Popover from "./Popover.js";
|
|
|
25
25
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
26
26
|
import "../locale/lang";
|
|
27
27
|
import "./renderIcon-3d0fd47c.js";
|
|
28
|
-
import "./index-
|
|
28
|
+
import "./index-7fe29a2f.js";
|
|
29
29
|
import "./Overlay.js";
|
|
30
30
|
const { create } = createComponent("tour");
|
|
31
31
|
const _sfc_main = create({
|