@nutui/nutui 4.0.1 → 4.0.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/CHANGELOG.md +32 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +2 -2
- package/dist/packages/_es/Address.js +25 -6
- package/dist/packages/_es/Audio.js +0 -6
- package/dist/packages/_es/AudioOperate.js +0 -1
- package/dist/packages/_es/Avatar.js +0 -2
- package/dist/packages/_es/AvatarGroup.js +0 -1
- package/dist/packages/_es/Barrage.js +3 -3
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Cascader.js +0 -2
- package/dist/packages/_es/Category.js +0 -2
- package/dist/packages/_es/CategoryPane.js +0 -3
- package/dist/packages/_es/Cell.js +0 -1
- package/dist/packages/_es/Checkbox.js +0 -1
- package/dist/packages/_es/CollapseItem.js +0 -1
- package/dist/packages/_es/Comment.js +0 -5
- package/dist/packages/_es/Countdown.js +0 -8
- package/dist/packages/_es/Countup.js +0 -10
- package/dist/packages/_es/DatePicker.js +0 -2
- package/dist/packages/_es/Dialog.js +0 -3
- package/dist/packages/_es/Ellipsis.js +0 -2
- package/dist/packages/_es/Empty.js +0 -3
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -2
- package/dist/packages/_es/ImagePreview.js +0 -2
- package/dist/packages/_es/Input.js +5 -3
- package/dist/packages/_es/Invoice.js +3 -5
- package/dist/packages/_es/List.js +164 -26
- package/dist/packages/_es/Navbar.js +0 -6
- package/dist/packages/_es/Noticebar.js +1 -2
- package/dist/packages/_es/Notify.js +0 -3
- package/dist/packages/_es/Picker.js +0 -2
- package/dist/packages/_es/PullRefresh.js +0 -5
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Searchbar.js +0 -1
- package/dist/packages/_es/ShortPassword.js +0 -1
- package/dist/packages/_es/Signature.js +0 -1
- package/dist/packages/_es/Skeleton.js +0 -10
- package/dist/packages/_es/Sku.js +0 -14
- package/dist/packages/_es/Swiper.js +0 -1
- package/dist/packages/_es/TabbarItem.js +0 -5
- package/dist/packages/_es/Tabs.js +1 -3
- package/dist/packages/_es/Textarea.js +0 -1
- package/dist/packages/_es/Toast.js +0 -8
- package/dist/packages/_es/Tour.js +0 -1
- package/dist/packages/_es/Uploader.js +0 -2
- package/dist/packages/_es/Video.js +0 -18
- package/dist/packages/_es/{common-0c815463.js → common-05c67d9a.js} +0 -8
- package/dist/packages/_es/{index-0432a798.js → index-c4bbec14.js} +0 -37
- package/dist/packages/_es/{index.vue_vue_type_script_lang-9c679f64.js → index.vue_vue_type_script_lang-8b9f3de5.js} +0 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-0725f0ae.js → index.vue_vue_type_script_lang-ee936659.js} +0 -1
- package/dist/packages/address/index.scss +1 -1
- package/dist/packages/input/index.scss +5 -3
- package/dist/packages/list/index.scss +8 -8
- package/dist/packages/menuitem/index.scss +2 -2
- package/dist/packages/noticebar/index.scss +8 -2
- package/dist/packages/shortpassword/index.scss +16 -0
- package/dist/smartips/web-types.json +43 -7
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +51 -51
- package/dist/styles/themes/jdb.scss +51 -51
- package/dist/styles/themes/jddkh.scss +51 -51
- package/dist/styles/themes/jdt.scss +51 -51
- package/dist/types/__VUE/address/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +9 -0
- package/dist/types/__VUE/list/index.vue.d.ts +42 -13
- package/dist/types/__VUE/list/type.d.ts +13 -0
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,72 @@
|
|
|
1
1
|
import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
3
|
+
import { u as useRect } from "./index-29892cda.js";
|
|
3
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
5
|
import "../locale/lang";
|
|
6
|
+
var CompareResult = /* @__PURE__ */ ((CompareResult2) => {
|
|
7
|
+
CompareResult2[CompareResult2["eq"] = 1] = "eq";
|
|
8
|
+
CompareResult2[CompareResult2["lt"] = 2] = "lt";
|
|
9
|
+
CompareResult2[CompareResult2["gt"] = 3] = "gt";
|
|
10
|
+
return CompareResult2;
|
|
11
|
+
})(CompareResult || {});
|
|
12
|
+
function binarySearch(list, value, compareFunc) {
|
|
13
|
+
let start = 0;
|
|
14
|
+
let end = list.length - 1;
|
|
15
|
+
let tempIndex = null;
|
|
16
|
+
while (start <= end) {
|
|
17
|
+
tempIndex = Math.floor((start + end) / 2);
|
|
18
|
+
const midValue = list[tempIndex];
|
|
19
|
+
const compareRes = compareFunc(midValue, value);
|
|
20
|
+
if (compareRes === 1) {
|
|
21
|
+
return tempIndex;
|
|
22
|
+
}
|
|
23
|
+
if (compareRes === 2) {
|
|
24
|
+
start = tempIndex + 1;
|
|
25
|
+
} else if (compareRes === 3) {
|
|
26
|
+
end = tempIndex - 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return tempIndex;
|
|
30
|
+
}
|
|
5
31
|
const { componentName, create } = createComponent("list");
|
|
6
32
|
const clientHeight = document.documentElement.clientHeight || document.body.clientHeight || 667;
|
|
7
33
|
const _sfc_main = create({
|
|
8
34
|
props: {
|
|
9
|
-
height: {
|
|
10
|
-
type: [Number],
|
|
11
|
-
default: 50
|
|
12
|
-
},
|
|
13
35
|
listData: {
|
|
14
36
|
type: Array,
|
|
15
37
|
default: () => {
|
|
16
38
|
return [];
|
|
17
39
|
}
|
|
18
40
|
},
|
|
41
|
+
bufferSize: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 5
|
|
44
|
+
},
|
|
19
45
|
containerHeight: {
|
|
20
46
|
type: [Number],
|
|
21
47
|
default: clientHeight
|
|
48
|
+
},
|
|
49
|
+
height: {
|
|
50
|
+
type: Number,
|
|
51
|
+
default: 80
|
|
52
|
+
},
|
|
53
|
+
margin: {
|
|
54
|
+
type: Number,
|
|
55
|
+
default: 10
|
|
22
56
|
}
|
|
23
57
|
},
|
|
24
|
-
emits: ["scroll", "scroll-bottom"],
|
|
58
|
+
emits: ["scroll-up", "scroll-down", "scroll-bottom"],
|
|
25
59
|
setup(props, { emit }) {
|
|
26
60
|
const list = ref(null);
|
|
61
|
+
const phantom = ref(null);
|
|
62
|
+
const actualContent = ref(null);
|
|
27
63
|
const state = reactive({
|
|
28
|
-
startOffset: 0,
|
|
29
64
|
start: 0,
|
|
30
|
-
|
|
65
|
+
originStartIndex: 0,
|
|
66
|
+
scrollTop: 0,
|
|
67
|
+
list: props.listData.slice(),
|
|
68
|
+
cachePositions: [],
|
|
69
|
+
phantomHeight: props.height * props.listData.length
|
|
31
70
|
});
|
|
32
71
|
const getContainerHeight = computed(() => {
|
|
33
72
|
return Math.min(props.containerHeight, clientHeight);
|
|
@@ -36,10 +75,7 @@ const _sfc_main = create({
|
|
|
36
75
|
return Math.ceil(getContainerHeight.value / props.height);
|
|
37
76
|
});
|
|
38
77
|
const end = computed(() => {
|
|
39
|
-
return state.
|
|
40
|
-
});
|
|
41
|
-
const getTransform = computed(() => {
|
|
42
|
-
return `translate3d(0, ${state.startOffset}px, 0)`;
|
|
78
|
+
return Math.min(state.originStartIndex + visibleCount.value + props.bufferSize, state.list.length - 1);
|
|
43
79
|
});
|
|
44
80
|
const classes = computed(() => {
|
|
45
81
|
const prefixCls = componentName;
|
|
@@ -47,32 +83,133 @@ const _sfc_main = create({
|
|
|
47
83
|
[prefixCls]: true
|
|
48
84
|
};
|
|
49
85
|
});
|
|
50
|
-
const listHeight = computed(() => {
|
|
51
|
-
return state.list.length * props.height;
|
|
52
|
-
});
|
|
53
86
|
const visibleData = computed(() => {
|
|
54
|
-
return state.list.slice(state.start,
|
|
87
|
+
return state.list.slice(state.start, end.value);
|
|
55
88
|
});
|
|
89
|
+
const getTransform = () => {
|
|
90
|
+
if (actualContent.value) {
|
|
91
|
+
return `translate3d(0, ${state.start >= 1 ? state.cachePositions[state.start - 1].bottom : 0}px, 0)`;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const initCachedPosition = () => {
|
|
95
|
+
state.cachePositions = [];
|
|
96
|
+
for (let i = 0; i < state.list.length; ++i) {
|
|
97
|
+
state.cachePositions[i] = {
|
|
98
|
+
index: i,
|
|
99
|
+
height: props.height,
|
|
100
|
+
top: i * props.height,
|
|
101
|
+
bottom: (i + 1) * (props.height + props.margin),
|
|
102
|
+
dValue: 0
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const updateCachedPosition = () => {
|
|
107
|
+
let nodes = actualContent.value.childNodes;
|
|
108
|
+
nodes = Array.from(nodes).filter((node) => node.nodeType === 1);
|
|
109
|
+
const start = nodes[0];
|
|
110
|
+
nodes.forEach((node, index2) => {
|
|
111
|
+
if (!node)
|
|
112
|
+
return;
|
|
113
|
+
const rect = useRect(node);
|
|
114
|
+
const { height: height2 } = rect;
|
|
115
|
+
const oldHeight = state.cachePositions[index2 + state.start].height;
|
|
116
|
+
const dValue = oldHeight - height2;
|
|
117
|
+
if (dValue) {
|
|
118
|
+
state.cachePositions[index2 + state.start].bottom -= dValue;
|
|
119
|
+
state.cachePositions[index2 + state.start].height = height2;
|
|
120
|
+
state.cachePositions[index2 + state.start].dValue = dValue;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
let startIndex = 0;
|
|
124
|
+
if (start) {
|
|
125
|
+
startIndex = state.start;
|
|
126
|
+
}
|
|
127
|
+
const cachedPositionsLen = state.cachePositions.length;
|
|
128
|
+
let cumulativeDiffHeight = state.cachePositions[startIndex].dValue;
|
|
129
|
+
state.cachePositions[startIndex].dValue = 0;
|
|
130
|
+
for (let i = startIndex + 1; i < cachedPositionsLen; ++i) {
|
|
131
|
+
const item = state.cachePositions[i];
|
|
132
|
+
state.cachePositions[i].top = state.cachePositions[i - 1].bottom;
|
|
133
|
+
state.cachePositions[i].bottom = state.cachePositions[i].bottom - cumulativeDiffHeight;
|
|
134
|
+
if (item.dValue !== 0) {
|
|
135
|
+
cumulativeDiffHeight += item.dValue;
|
|
136
|
+
item.dValue = 0;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const height = state.cachePositions[cachedPositionsLen - 1].bottom;
|
|
140
|
+
state.phantomHeight = height;
|
|
141
|
+
};
|
|
142
|
+
const getStartIndex = (scrollTop = 0) => {
|
|
143
|
+
let idx = binarySearch(
|
|
144
|
+
state.cachePositions,
|
|
145
|
+
scrollTop,
|
|
146
|
+
(currentValue, targetValue) => {
|
|
147
|
+
const currentCompareValue = currentValue.bottom;
|
|
148
|
+
if (currentCompareValue === targetValue) {
|
|
149
|
+
return CompareResult.eq;
|
|
150
|
+
}
|
|
151
|
+
if (currentCompareValue < targetValue) {
|
|
152
|
+
return CompareResult.lt;
|
|
153
|
+
}
|
|
154
|
+
return CompareResult.gt;
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
const targetItem = state.cachePositions[idx];
|
|
158
|
+
if (targetItem.bottom < scrollTop) {
|
|
159
|
+
idx += 1;
|
|
160
|
+
}
|
|
161
|
+
return idx;
|
|
162
|
+
};
|
|
163
|
+
const resetAllVirtualParam = () => {
|
|
164
|
+
state.originStartIndex = 0;
|
|
165
|
+
state.start = 0;
|
|
166
|
+
state.scrollTop = 0;
|
|
167
|
+
list.value.scrollTop = 0;
|
|
168
|
+
initCachedPosition();
|
|
169
|
+
state.phantomHeight = props.height * state.list.length;
|
|
170
|
+
};
|
|
56
171
|
const handleScrollEvent = () => {
|
|
57
172
|
var _a;
|
|
58
173
|
const scrollTop = (_a = list.value) == null ? void 0 : _a.scrollTop;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
174
|
+
const { originStartIndex } = state;
|
|
175
|
+
const currentIndex = getStartIndex(scrollTop);
|
|
176
|
+
if (currentIndex !== originStartIndex) {
|
|
177
|
+
state.originStartIndex = currentIndex;
|
|
178
|
+
state.start = Math.max(state.originStartIndex - props.bufferSize, 0);
|
|
179
|
+
if (end.value >= state.list.length - 1) {
|
|
180
|
+
emit("scroll-bottom");
|
|
181
|
+
}
|
|
62
182
|
}
|
|
63
|
-
state.
|
|
183
|
+
emit(scrollTop > state.scrollTop ? "scroll-up" : "scroll-down", scrollTop);
|
|
184
|
+
state.scrollTop = scrollTop;
|
|
64
185
|
};
|
|
65
186
|
watch(
|
|
66
187
|
() => props.listData,
|
|
188
|
+
(val) => {
|
|
189
|
+
state.list = val.slice();
|
|
190
|
+
if (state.list.length === val.length) {
|
|
191
|
+
initCachedPosition();
|
|
192
|
+
updateCachedPosition();
|
|
193
|
+
} else {
|
|
194
|
+
resetAllVirtualParam();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
watch(
|
|
200
|
+
() => state.start,
|
|
67
201
|
() => {
|
|
68
|
-
state.list
|
|
202
|
+
if (actualContent.value && state.list.length > 0) {
|
|
203
|
+
updateCachedPosition();
|
|
204
|
+
}
|
|
69
205
|
}
|
|
70
206
|
);
|
|
71
207
|
return {
|
|
72
208
|
...toRefs(state),
|
|
73
209
|
list,
|
|
210
|
+
phantom,
|
|
211
|
+
actualContent,
|
|
74
212
|
getTransform,
|
|
75
|
-
listHeight,
|
|
76
213
|
visibleData,
|
|
77
214
|
classes,
|
|
78
215
|
getContainerHeight,
|
|
@@ -89,23 +226,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
226
|
}, [
|
|
90
227
|
createElementVNode("div", {
|
|
91
228
|
class: "nut-list-phantom",
|
|
92
|
-
style: normalizeStyle({ height: _ctx.
|
|
229
|
+
style: normalizeStyle({ height: _ctx.phantomHeight + "px" }),
|
|
230
|
+
ref: "phantom"
|
|
93
231
|
}, null, 4),
|
|
94
232
|
createElementVNode("div", {
|
|
95
233
|
class: "nut-list-container",
|
|
96
|
-
style: normalizeStyle({ transform: _ctx.getTransform })
|
|
234
|
+
style: normalizeStyle({ transform: _ctx.getTransform() }),
|
|
235
|
+
ref: "actualContent"
|
|
97
236
|
}, [
|
|
98
237
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleData, (item, index2) => {
|
|
99
238
|
return openBlock(), createElementBlock("div", {
|
|
100
239
|
class: "nut-list-item",
|
|
101
|
-
style: normalizeStyle({ height: _ctx.height + "px" }),
|
|
102
240
|
key: item
|
|
103
241
|
}, [
|
|
104
242
|
renderSlot(_ctx.$slots, "default", {
|
|
105
243
|
item,
|
|
106
|
-
index: index2
|
|
244
|
+
index: index2 + _ctx.start
|
|
107
245
|
})
|
|
108
|
-
]
|
|
246
|
+
]);
|
|
109
247
|
}), 128))
|
|
110
248
|
], 4)
|
|
111
249
|
], 38);
|
|
@@ -8,15 +8,10 @@ const _sfc_main = create({
|
|
|
8
8
|
components: { Left },
|
|
9
9
|
props: {
|
|
10
10
|
leftShow: { type: Boolean, default: false },
|
|
11
|
-
//左侧 是否显示返回icon
|
|
12
11
|
title: { type: String, default: "" },
|
|
13
|
-
//中间 文字标题
|
|
14
12
|
titleIcon: { type: Boolean, default: false },
|
|
15
|
-
//中间
|
|
16
13
|
leftText: { type: String, default: "" },
|
|
17
|
-
//左侧文字
|
|
18
14
|
desc: { type: String, default: "" },
|
|
19
|
-
//右侧 按钮文字
|
|
20
15
|
fixed: {
|
|
21
16
|
type: Boolean,
|
|
22
17
|
default: false
|
|
@@ -30,7 +25,6 @@ const _sfc_main = create({
|
|
|
30
25
|
default: false
|
|
31
26
|
},
|
|
32
27
|
placeholder: {
|
|
33
|
-
// 生成一个等高的占位元素
|
|
34
28
|
type: Boolean,
|
|
35
29
|
default: true
|
|
36
30
|
},
|
|
@@ -7,7 +7,6 @@ import "../locale/lang";
|
|
|
7
7
|
const { componentName, create } = createComponent("noticebar");
|
|
8
8
|
const _sfc_main = create({
|
|
9
9
|
props: {
|
|
10
|
-
// 滚动方向 across 横向 vertical 纵向
|
|
11
10
|
direction: {
|
|
12
11
|
type: String,
|
|
13
12
|
default: "across"
|
|
@@ -391,7 +390,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
391
390
|
return openBlock(), createElementBlock("li", {
|
|
392
391
|
class: "nut-noticebar__vertical-item",
|
|
393
392
|
key: index2,
|
|
394
|
-
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height) }),
|
|
393
|
+
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height), lineHeight: _ctx.pxCheck(_ctx.height) }),
|
|
395
394
|
onClick: ($event) => _ctx.go(item)
|
|
396
395
|
}, toDisplayString(item), 13, _hoisted_5);
|
|
397
396
|
}), 128))
|
|
@@ -159,14 +159,12 @@ const usePicker = (props, emit) => {
|
|
|
159
159
|
const { create: create$1 } = createComponent("picker-column");
|
|
160
160
|
const _sfc_main$1 = create$1({
|
|
161
161
|
props: {
|
|
162
|
-
// 当前选中项
|
|
163
162
|
value: [String, Number],
|
|
164
163
|
columnsType: String,
|
|
165
164
|
column: {
|
|
166
165
|
type: Array,
|
|
167
166
|
default: () => []
|
|
168
167
|
},
|
|
169
|
-
// 是否开启3D效果
|
|
170
168
|
threeDimensional: {
|
|
171
169
|
type: Boolean,
|
|
172
170
|
default: true
|
|
@@ -25,10 +25,6 @@ const _sfc_main = create({
|
|
|
25
25
|
type: String,
|
|
26
26
|
default: translate("loading")
|
|
27
27
|
},
|
|
28
|
-
// completeTxt: {
|
|
29
|
-
// type: String,
|
|
30
|
-
// default: ''
|
|
31
|
-
// },
|
|
32
28
|
headHeight: {
|
|
33
29
|
type: [String, Number],
|
|
34
30
|
default: 50
|
|
@@ -153,7 +149,6 @@ const _sfc_main = create({
|
|
|
153
149
|
watch(
|
|
154
150
|
() => props.modelValue,
|
|
155
151
|
(val) => {
|
|
156
|
-
console.log("监听", val);
|
|
157
152
|
if (val) {
|
|
158
153
|
setPullStatus(+props.headHeight, true);
|
|
159
154
|
nextTick(() => emit("refresh"));
|
|
@@ -126,7 +126,6 @@ const _sfc_main = create({
|
|
|
126
126
|
const _canvas = isCanvasBlank(canvas2) ? "请绘制签名" : canvas2;
|
|
127
127
|
const _filePath = isCanvasBlank(canvas2) ? "" : dataurl;
|
|
128
128
|
emit("confirm", _canvas, _filePath);
|
|
129
|
-
clear();
|
|
130
129
|
};
|
|
131
130
|
onMounted(() => {
|
|
132
131
|
if (isCanvasSupported()) {
|
|
@@ -7,52 +7,42 @@ const component = (components) => {
|
|
|
7
7
|
return {
|
|
8
8
|
components,
|
|
9
9
|
props: {
|
|
10
|
-
//每行宽度
|
|
11
10
|
width: {
|
|
12
11
|
type: String,
|
|
13
12
|
default: "100px"
|
|
14
13
|
},
|
|
15
|
-
//每行高度
|
|
16
14
|
height: {
|
|
17
15
|
type: String,
|
|
18
16
|
default: "15px"
|
|
19
17
|
},
|
|
20
|
-
//是否显示动画
|
|
21
18
|
animated: {
|
|
22
19
|
type: Boolean,
|
|
23
20
|
default: false
|
|
24
21
|
},
|
|
25
|
-
//头像
|
|
26
22
|
avatar: {
|
|
27
23
|
type: Boolean,
|
|
28
24
|
default: false
|
|
29
25
|
},
|
|
30
|
-
//头像形状:正方形/圆形
|
|
31
26
|
avatarShape: {
|
|
32
27
|
type: String,
|
|
33
28
|
default: "round"
|
|
34
29
|
},
|
|
35
|
-
//头像大小
|
|
36
30
|
avatarSize: {
|
|
37
31
|
type: String,
|
|
38
32
|
default: "50px"
|
|
39
33
|
},
|
|
40
|
-
//是否显示骨架屏
|
|
41
34
|
loading: {
|
|
42
35
|
type: Boolean,
|
|
43
36
|
default: true
|
|
44
37
|
},
|
|
45
|
-
//标题/段落 圆角风格
|
|
46
38
|
round: {
|
|
47
39
|
type: Boolean,
|
|
48
40
|
default: false
|
|
49
41
|
},
|
|
50
|
-
//显示段落行数
|
|
51
42
|
row: {
|
|
52
43
|
type: String,
|
|
53
44
|
default: "1"
|
|
54
45
|
},
|
|
55
|
-
//是否显示段落标题
|
|
56
46
|
title: {
|
|
57
47
|
type: Boolean,
|
|
58
48
|
default: true
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -124,7 +124,6 @@ const SkuSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_rend
|
|
|
124
124
|
const { componentName: componentName$2, create: create$2 } = createComponent("sku-stepper");
|
|
125
125
|
const _sfc_main$2 = create$2({
|
|
126
126
|
props: {
|
|
127
|
-
// 购买数量最大值
|
|
128
127
|
stepperMax: {
|
|
129
128
|
type: [Number, String],
|
|
130
129
|
default: 99999
|
|
@@ -133,12 +132,10 @@ const _sfc_main$2 = create$2({
|
|
|
133
132
|
type: [Number, String],
|
|
134
133
|
default: 1
|
|
135
134
|
},
|
|
136
|
-
// stepper 前文案提示
|
|
137
135
|
stepperExtraText: {
|
|
138
136
|
type: [Function, Boolean],
|
|
139
137
|
default: false
|
|
140
138
|
},
|
|
141
|
-
// 数量选择左侧文案
|
|
142
139
|
stepperTitle: {
|
|
143
140
|
type: String,
|
|
144
141
|
default: "购买数量"
|
|
@@ -217,7 +214,6 @@ const SkuStepper = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_ren
|
|
|
217
214
|
const { componentName: componentName$1, create: create$1 } = createComponent("sku-operate");
|
|
218
215
|
const _sfc_main$1 = create$1({
|
|
219
216
|
props: {
|
|
220
|
-
// 底部按钮配置 confirm cart buy
|
|
221
217
|
btnOptions: {
|
|
222
218
|
type: Array,
|
|
223
219
|
default: () => ["confirm"]
|
|
@@ -226,12 +222,10 @@ const _sfc_main$1 = create$1({
|
|
|
226
222
|
type: String,
|
|
227
223
|
default: ""
|
|
228
224
|
},
|
|
229
|
-
// 立即购买文案
|
|
230
225
|
buyText: {
|
|
231
226
|
type: String,
|
|
232
227
|
default: "立即购买"
|
|
233
228
|
},
|
|
234
|
-
// 加入购物车文案
|
|
235
229
|
addCartText: {
|
|
236
230
|
type: String,
|
|
237
231
|
default: "加入购物车"
|
|
@@ -303,27 +297,22 @@ const _sfc_main = create({
|
|
|
303
297
|
type: Object,
|
|
304
298
|
default: {}
|
|
305
299
|
},
|
|
306
|
-
// stepper 最大值
|
|
307
300
|
stepperMax: {
|
|
308
301
|
type: [Number, String],
|
|
309
302
|
default: 99999
|
|
310
303
|
},
|
|
311
|
-
// stepper 最小值
|
|
312
304
|
stepperMin: {
|
|
313
305
|
type: [Number, String],
|
|
314
306
|
default: 1
|
|
315
307
|
},
|
|
316
|
-
// 底部按钮配置 confirm cart buy
|
|
317
308
|
btnOptions: {
|
|
318
309
|
type: Array,
|
|
319
310
|
default: () => ["confirm"]
|
|
320
311
|
},
|
|
321
|
-
// 数量选择左侧文案
|
|
322
312
|
stepperTitle: {
|
|
323
313
|
type: String,
|
|
324
314
|
default: ""
|
|
325
315
|
},
|
|
326
|
-
// stepper 前面文案
|
|
327
316
|
stepperExtraText: {
|
|
328
317
|
type: [Function, Boolean],
|
|
329
318
|
default: false
|
|
@@ -332,17 +321,14 @@ const _sfc_main = create({
|
|
|
332
321
|
type: String,
|
|
333
322
|
default: ""
|
|
334
323
|
},
|
|
335
|
-
// 立即购买文案
|
|
336
324
|
buyText: {
|
|
337
325
|
type: String,
|
|
338
326
|
default: ""
|
|
339
327
|
},
|
|
340
|
-
// 加入购物车文案
|
|
341
328
|
addCartText: {
|
|
342
329
|
type: String,
|
|
343
330
|
default: ""
|
|
344
331
|
},
|
|
345
|
-
// 确定文案
|
|
346
332
|
confirmText: {
|
|
347
333
|
type: String,
|
|
348
334
|
default: ""
|
|
@@ -10,7 +10,6 @@ const _sfc_main = create({
|
|
|
10
10
|
components: { [Badge.name]: Badge },
|
|
11
11
|
props: {
|
|
12
12
|
tabTitle: {
|
|
13
|
-
// 标签页的标题
|
|
14
13
|
type: String,
|
|
15
14
|
default: ""
|
|
16
15
|
},
|
|
@@ -18,11 +17,9 @@ const _sfc_main = create({
|
|
|
18
17
|
type: String
|
|
19
18
|
},
|
|
20
19
|
icon: {
|
|
21
|
-
// 标签页显示的icon
|
|
22
20
|
type: Object
|
|
23
21
|
},
|
|
24
22
|
href: {
|
|
25
|
-
// 标签页的跳转链接
|
|
26
23
|
type: String,
|
|
27
24
|
default: ""
|
|
28
25
|
},
|
|
@@ -35,9 +32,7 @@ const _sfc_main = create({
|
|
|
35
32
|
const parent = inject("parent");
|
|
36
33
|
const state = reactive({
|
|
37
34
|
unactiveColor: parent.unactiveColor,
|
|
38
|
-
// 未选中的颜色
|
|
39
35
|
activeColor: parent.activeColor,
|
|
40
|
-
// 选中的颜色
|
|
41
36
|
index: 0
|
|
42
37
|
});
|
|
43
38
|
const router = useRouter();
|
|
@@ -36,7 +36,6 @@ const _sfc_main = create({
|
|
|
36
36
|
direction: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: "horizontal"
|
|
39
|
-
//vertical
|
|
40
39
|
},
|
|
41
40
|
size: {
|
|
42
41
|
type: String,
|
|
@@ -45,7 +44,6 @@ const _sfc_main = create({
|
|
|
45
44
|
type: {
|
|
46
45
|
type: String,
|
|
47
46
|
default: "line"
|
|
48
|
-
//card、line、smile
|
|
49
47
|
},
|
|
50
48
|
titleScroll: {
|
|
51
49
|
type: Boolean,
|
|
@@ -216,7 +214,7 @@ const _sfc_main = create({
|
|
|
216
214
|
const methods = {
|
|
217
215
|
tabChange: (item, index) => {
|
|
218
216
|
emit("click", item);
|
|
219
|
-
if (item.disabled) {
|
|
217
|
+
if (item.disabled || currentIndex.value == index) {
|
|
220
218
|
return;
|
|
221
219
|
}
|
|
222
220
|
currentIndex.value = index;
|
|
@@ -196,9 +196,7 @@ const defaultOptions = {
|
|
|
196
196
|
msg: "",
|
|
197
197
|
id: "",
|
|
198
198
|
duration: 2e3,
|
|
199
|
-
//显示时间(毫秒)
|
|
200
199
|
center: true,
|
|
201
|
-
// 未实现
|
|
202
200
|
type: "text",
|
|
203
201
|
title: "",
|
|
204
202
|
customClass: "",
|
|
@@ -207,19 +205,13 @@ const defaultOptions = {
|
|
|
207
205
|
iconSize: "20",
|
|
208
206
|
icon: null,
|
|
209
207
|
textAlignCenter: true,
|
|
210
|
-
// 未实现
|
|
211
208
|
loadingRotate: true,
|
|
212
|
-
// 未实现
|
|
213
209
|
bgColor: "",
|
|
214
210
|
onClose: null,
|
|
215
|
-
// 未实现
|
|
216
211
|
unmount: null,
|
|
217
212
|
cover: false,
|
|
218
|
-
//透明遮罩层 // 未实现
|
|
219
213
|
coverColor: "",
|
|
220
|
-
// 未实现
|
|
221
214
|
closeOnClickOverlay: false
|
|
222
|
-
// 未实现
|
|
223
215
|
};
|
|
224
216
|
let idsMap = [];
|
|
225
217
|
let optsMap = [];
|
|
@@ -103,11 +103,9 @@ const _sfc_main = create({
|
|
|
103
103
|
props: {
|
|
104
104
|
name: { type: String, default: "file" },
|
|
105
105
|
url: { type: String, default: "" },
|
|
106
|
-
// defaultFileList: { type: Array, default: () => new Array<FileItem>() },
|
|
107
106
|
timeout: { type: [Number, String], default: 1e3 * 30 },
|
|
108
107
|
fileList: { type: Array, default: () => [] },
|
|
109
108
|
isPreview: { type: Boolean, default: true },
|
|
110
|
-
// picture、list
|
|
111
109
|
listType: { type: String, default: "picture" },
|
|
112
110
|
isDeletable: { type: Boolean, default: true },
|
|
113
111
|
method: { type: String, default: "post" },
|