@nutui/nutui 4.0.0-beta.19 → 4.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +3 -3
- package/dist/packages/_es/ActionSheet.js +1 -6
- package/dist/packages/_es/AddressList.js +30 -54
- package/dist/packages/_es/Card.js +7 -14
- package/dist/packages/_es/Comment.js +4 -4
- package/dist/packages/_es/Countup.js +10 -5
- package/dist/packages/_es/Input.js +28 -29
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Picker.js +2 -1
- package/dist/packages/_es/Progress.js +11 -7
- package/dist/packages/_es/PullRefresh.js +5 -5
- package/dist/packages/_es/Rate.js +17 -16
- package/dist/packages/_es/Searchbar.js +3 -3
- package/dist/packages/_es/ShortPassword.js +10 -10
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Tour.js +5 -5
- package/dist/packages/addresslist/index.scss +14 -3
- package/dist/packages/avatar/index.scss +1 -0
- package/dist/packages/badge/index.scss +2 -2
- package/dist/packages/cell/index.scss +2 -0
- package/dist/packages/comment/index.scss +1 -1
- package/dist/packages/indicator/index.scss +4 -4
- package/dist/packages/input/index.scss +6 -2
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/pullrefresh/index.scss +1 -1
- package/dist/packages/rate/index.scss +4 -4
- package/dist/packages/searchbar/index.scss +4 -8
- package/dist/packages/tabbaritem/index.scss +4 -0
- package/dist/packages/textarea/index.scss +7 -1
- package/dist/packages/uploader/index.scss +1 -1
- package/dist/smartips/web-types.json +68 -122
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jddkh.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +3 -3
- package/dist/styles/variables-jddkh.scss +3 -3
- package/dist/styles/variables-jdt.scss +3 -3
- package/dist/styles/variables.scss +3 -3
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +0 -9
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +3 -3
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +2 -2
- package/dist/types/__VUE/addresslist/index.vue.d.ts +5 -5
- package/dist/types/__VUE/card/index.vue.d.ts +0 -21
- package/dist/types/__VUE/input/index.vue.d.ts +6 -39
- package/dist/types/__VUE/progress/index.vue.d.ts +1 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +15 -9
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tour/index.vue.d.ts +8 -8
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -45,10 +45,6 @@ const _sfc_main = create({
|
|
|
45
45
|
type: Array,
|
|
46
46
|
default: () => []
|
|
47
47
|
},
|
|
48
|
-
isWrapTeleport: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: true
|
|
51
|
-
},
|
|
52
48
|
closeAbled: {
|
|
53
49
|
type: Boolean,
|
|
54
50
|
default: true
|
|
@@ -111,7 +107,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
111
107
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
112
108
|
return openBlock(), createBlock(_component_nut_popup, {
|
|
113
109
|
visible: _ctx.visible,
|
|
114
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
115
110
|
position: "bottom",
|
|
116
111
|
round: "",
|
|
117
112
|
onClickOverlay: _ctx.close,
|
|
@@ -153,7 +148,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
148
|
], 2)
|
|
154
149
|
]),
|
|
155
150
|
_: 3
|
|
156
|
-
}, 8, ["visible", "
|
|
151
|
+
}, 8, ["visible", "onClickOverlay", "closeOnClickOverlay"]);
|
|
157
152
|
}
|
|
158
153
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
159
154
|
export {
|
|
@@ -16,7 +16,7 @@ const _sfc_main$2 = create$2({
|
|
|
16
16
|
default: {}
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
emits: ["delIcon", "editIcon", "
|
|
19
|
+
emits: ["delIcon", "editIcon", "clickItem"],
|
|
20
20
|
setup(props, { emit }) {
|
|
21
21
|
const delClick = (event) => {
|
|
22
22
|
emit("delIcon", event, props.item);
|
|
@@ -27,7 +27,7 @@ const _sfc_main$2 = create$2({
|
|
|
27
27
|
event.stopPropagation();
|
|
28
28
|
};
|
|
29
29
|
const contentsClick = (event) => {
|
|
30
|
-
emit("
|
|
30
|
+
emit("clickItem", event, props.item);
|
|
31
31
|
event.stopPropagation();
|
|
32
32
|
};
|
|
33
33
|
return {
|
|
@@ -40,14 +40,14 @@ const _sfc_main$2 = create$2({
|
|
|
40
40
|
});
|
|
41
41
|
const _hoisted_1$1 = { class: "nut-address-list-item__info" };
|
|
42
42
|
const _hoisted_2$1 = { class: "nut-address-list-item__info-contact" };
|
|
43
|
-
const _hoisted_3
|
|
44
|
-
const _hoisted_4
|
|
45
|
-
const _hoisted_5
|
|
43
|
+
const _hoisted_3 = { class: "nut-address-list-item__info-contact-name" };
|
|
44
|
+
const _hoisted_4 = { class: "nut-address-list-item__info-contact-tel" };
|
|
45
|
+
const _hoisted_5 = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "nut-address-list-item__info-contact-default"
|
|
48
48
|
};
|
|
49
|
-
const _hoisted_6
|
|
50
|
-
const _hoisted_7
|
|
49
|
+
const _hoisted_6 = { class: "nut-address-list-item__info-handle" };
|
|
50
|
+
const _hoisted_7 = { class: "nut-address-list-item__addr" };
|
|
51
51
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
52
52
|
const _component_Del = resolveComponent("Del");
|
|
53
53
|
const _component_Edit = resolveComponent("Edit");
|
|
@@ -58,12 +58,12 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
58
58
|
createElementVNode("div", _hoisted_1$1, [
|
|
59
59
|
createElementVNode("div", _hoisted_2$1, [
|
|
60
60
|
renderSlot(_ctx.$slots, "contentTop", {}, () => [
|
|
61
|
-
createElementVNode("div", _hoisted_3
|
|
62
|
-
createElementVNode("div", _hoisted_4
|
|
63
|
-
_ctx.item.defaultAddress ? (openBlock(), createElementBlock("div", _hoisted_5
|
|
61
|
+
createElementVNode("div", _hoisted_3, toDisplayString(_ctx.item.addressName), 1),
|
|
62
|
+
createElementVNode("div", _hoisted_4, toDisplayString(_ctx.item.phone), 1),
|
|
63
|
+
_ctx.item.defaultAddress ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(_ctx.translate("default")), 1)) : createCommentVNode("", true)
|
|
64
64
|
])
|
|
65
65
|
]),
|
|
66
|
-
createElementVNode("div", _hoisted_6
|
|
66
|
+
createElementVNode("div", _hoisted_6, [
|
|
67
67
|
renderSlot(_ctx.$slots, "contentIcon", {}, () => [
|
|
68
68
|
createVNode(_component_Del, {
|
|
69
69
|
name: "del",
|
|
@@ -78,7 +78,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
78
|
])
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
|
-
createElementVNode("div", _hoisted_7
|
|
81
|
+
createElementVNode("div", _hoisted_7, [
|
|
82
82
|
renderSlot(_ctx.$slots, "contentAddr", {}, () => [
|
|
83
83
|
createTextVNode(toDisplayString(_ctx.item.fullAddress), 1)
|
|
84
84
|
])
|
|
@@ -102,7 +102,7 @@ const _sfc_main$1 = create$1({
|
|
|
102
102
|
default: false
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
emits: ["delIcon", "editIcon", "
|
|
105
|
+
emits: ["delIcon", "editIcon", "clickItem", "longDown", "longCopy", "longSet", "longDel", "swipeDel"],
|
|
106
106
|
components: {
|
|
107
107
|
ItemContents,
|
|
108
108
|
[Button.name]: Button,
|
|
@@ -118,8 +118,8 @@ const _sfc_main$1 = create$1({
|
|
|
118
118
|
onEditIcon(event) {
|
|
119
119
|
editClick(event);
|
|
120
120
|
},
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
onClickItem(event) {
|
|
122
|
+
clickItem(event);
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
};
|
|
@@ -134,10 +134,10 @@ const _sfc_main$1 = create$1({
|
|
|
134
134
|
emit("editIcon", event, props.item);
|
|
135
135
|
event.stopPropagation();
|
|
136
136
|
};
|
|
137
|
-
const
|
|
137
|
+
const clickItem = (event) => {
|
|
138
138
|
if (moveRef.value)
|
|
139
139
|
return;
|
|
140
|
-
emit("
|
|
140
|
+
emit("clickItem", event, props.item);
|
|
141
141
|
event.stopPropagation();
|
|
142
142
|
};
|
|
143
143
|
const delLongClick = (event) => {
|
|
@@ -191,7 +191,7 @@ const _sfc_main$1 = create$1({
|
|
|
191
191
|
return {
|
|
192
192
|
renderCompontent,
|
|
193
193
|
showMaskRef,
|
|
194
|
-
|
|
194
|
+
clickItem,
|
|
195
195
|
editClick,
|
|
196
196
|
delClick,
|
|
197
197
|
delLongClick,
|
|
@@ -212,31 +212,7 @@ const _hoisted_1 = {
|
|
|
212
212
|
key: 0,
|
|
213
213
|
class: "nut-address-list-general"
|
|
214
214
|
};
|
|
215
|
-
const _hoisted_2 =
|
|
216
|
-
/* @__PURE__ */ createTextVNode(" 复制"),
|
|
217
|
-
/* @__PURE__ */ createElementVNode("br"),
|
|
218
|
-
/* @__PURE__ */ createTextVNode("地址 ")
|
|
219
|
-
], -1);
|
|
220
|
-
const _hoisted_3 = [
|
|
221
|
-
_hoisted_2
|
|
222
|
-
];
|
|
223
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "nut-address-list-mask-contain" }, [
|
|
224
|
-
/* @__PURE__ */ createTextVNode(" 设置"),
|
|
225
|
-
/* @__PURE__ */ createElementVNode("br"),
|
|
226
|
-
/* @__PURE__ */ createTextVNode("默认 ")
|
|
227
|
-
], -1);
|
|
228
|
-
const _hoisted_5 = [
|
|
229
|
-
_hoisted_4
|
|
230
|
-
];
|
|
231
|
-
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "nut-address-list-mask-contain" }, [
|
|
232
|
-
/* @__PURE__ */ createTextVNode(" 删除"),
|
|
233
|
-
/* @__PURE__ */ createElementVNode("br"),
|
|
234
|
-
/* @__PURE__ */ createTextVNode("地址 ")
|
|
235
|
-
], -1);
|
|
236
|
-
const _hoisted_7 = [
|
|
237
|
-
_hoisted_6
|
|
238
|
-
];
|
|
239
|
-
const _hoisted_8 = { class: "nut-address-list-swipe" };
|
|
215
|
+
const _hoisted_2 = { class: "nut-address-list-swipe" };
|
|
240
216
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
241
217
|
const _component_nut_button = resolveComponent("nut-button");
|
|
242
218
|
const _component_nut_swipe = resolveComponent("nut-swipe");
|
|
@@ -266,15 +242,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
266
242
|
createElementVNode("div", {
|
|
267
243
|
class: "nut-address-list-general__mask-copy",
|
|
268
244
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.copyCLick && _ctx.copyCLick(...args))
|
|
269
|
-
},
|
|
245
|
+
}, " 复制地址 "),
|
|
270
246
|
createElementVNode("div", {
|
|
271
247
|
class: "nut-address-list-general__mask-set",
|
|
272
248
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.setDefault && _ctx.setDefault(...args))
|
|
273
|
-
},
|
|
249
|
+
}, " 设置默认 "),
|
|
274
250
|
createElementVNode("div", {
|
|
275
251
|
class: "nut-address-list-general__mask-del",
|
|
276
252
|
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.delLongClick && _ctx.delLongClick(...args))
|
|
277
|
-
},
|
|
253
|
+
}, " 删除地址 ")
|
|
278
254
|
])
|
|
279
255
|
])) : createCommentVNode("", true),
|
|
280
256
|
_ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
|
|
@@ -299,7 +275,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
299
275
|
])
|
|
300
276
|
]),
|
|
301
277
|
default: withCtx(() => [
|
|
302
|
-
createElementVNode("div",
|
|
278
|
+
createElementVNode("div", _hoisted_2, [
|
|
303
279
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderCompontent()), {
|
|
304
280
|
onTouchmove: _ctx.swipemove,
|
|
305
281
|
onTouchstart: _ctx.swipestart
|
|
@@ -340,7 +316,7 @@ const _sfc_main = create({
|
|
|
340
316
|
type: Boolean,
|
|
341
317
|
default: true
|
|
342
318
|
},
|
|
343
|
-
|
|
319
|
+
dataOptions: {
|
|
344
320
|
type: Object,
|
|
345
321
|
default: {}
|
|
346
322
|
}
|
|
@@ -349,7 +325,7 @@ const _sfc_main = create({
|
|
|
349
325
|
GeneralShell,
|
|
350
326
|
[Button.name]: Button
|
|
351
327
|
},
|
|
352
|
-
emits: ["delIcon", "editIcon", "
|
|
328
|
+
emits: ["delIcon", "editIcon", "clickItem", "longCopy", "longSet", "longDel", "swipeDel", "add"],
|
|
353
329
|
setup(props, { emit }) {
|
|
354
330
|
const dataArray = ref([]);
|
|
355
331
|
const dataInfo = reactive({
|
|
@@ -366,9 +342,9 @@ const _sfc_main = create({
|
|
|
366
342
|
};
|
|
367
343
|
});
|
|
368
344
|
const trowelData = () => {
|
|
369
|
-
if (Object.keys(props.
|
|
345
|
+
if (Object.keys(props.dataOptions).length > 0) {
|
|
370
346
|
dataArray.value = props.data.map((item) => {
|
|
371
|
-
return floatData(dataInfo, item, props.
|
|
347
|
+
return floatData(dataInfo, item, props.dataOptions);
|
|
372
348
|
});
|
|
373
349
|
}
|
|
374
350
|
};
|
|
@@ -386,7 +362,7 @@ const _sfc_main = create({
|
|
|
386
362
|
event.stopPropagation();
|
|
387
363
|
};
|
|
388
364
|
const clickContentItem = (event, item) => {
|
|
389
|
-
emit("
|
|
365
|
+
emit("clickItem", event, item);
|
|
390
366
|
event.stopPropagation();
|
|
391
367
|
};
|
|
392
368
|
const clickLongCopy = (event, item) => {
|
|
@@ -441,7 +417,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
441
417
|
swipeEdition: _ctx.swipeEdition,
|
|
442
418
|
onDelIcon: _ctx.clickDelIcon,
|
|
443
419
|
onEditIcon: _ctx.clickEditIcon,
|
|
444
|
-
|
|
420
|
+
onClickItem: _ctx.clickContentItem,
|
|
445
421
|
onSwipeDel: _ctx.clickSwipeDel,
|
|
446
422
|
onLongCopy: _ctx.clickLongCopy,
|
|
447
423
|
onLongSet: _ctx.clickLongSet,
|
|
@@ -472,7 +448,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
472
448
|
]),
|
|
473
449
|
key: "1"
|
|
474
450
|
} : void 0
|
|
475
|
-
]), 1032, ["item", "longPress", "swipeEdition", "onDelIcon", "onEditIcon", "
|
|
451
|
+
]), 1032, ["item", "longPress", "swipeEdition", "onDelIcon", "onEditIcon", "onClickItem", "onSwipeDel", "onLongCopy", "onLongSet", "onLongDel"]);
|
|
476
452
|
}), 128)),
|
|
477
453
|
_ctx.showBottomButton ? (openBlock(), createElementBlock("div", {
|
|
478
454
|
key: 0,
|
|
@@ -13,32 +13,25 @@ const _sfc_main = create({
|
|
|
13
13
|
},
|
|
14
14
|
props: {
|
|
15
15
|
imgUrl: {
|
|
16
|
-
type: String
|
|
17
|
-
default: ""
|
|
16
|
+
type: String
|
|
18
17
|
},
|
|
19
18
|
title: {
|
|
20
|
-
type: String
|
|
21
|
-
default: ""
|
|
19
|
+
type: String
|
|
22
20
|
},
|
|
23
21
|
price: {
|
|
24
|
-
type: String
|
|
25
|
-
default: ""
|
|
22
|
+
type: String
|
|
26
23
|
},
|
|
27
24
|
vipPrice: {
|
|
28
|
-
type: String
|
|
29
|
-
default: ""
|
|
25
|
+
type: String
|
|
30
26
|
},
|
|
31
27
|
shopDesc: {
|
|
32
|
-
type: String
|
|
33
|
-
default: ""
|
|
28
|
+
type: String
|
|
34
29
|
},
|
|
35
30
|
delivery: {
|
|
36
|
-
type: String
|
|
37
|
-
default: ""
|
|
31
|
+
type: String
|
|
38
32
|
},
|
|
39
33
|
shopName: {
|
|
40
|
-
type: String
|
|
41
|
-
default: ""
|
|
34
|
+
type: String
|
|
42
35
|
},
|
|
43
36
|
isNeedPrice: {
|
|
44
37
|
type: Boolean,
|
|
@@ -73,10 +73,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
73
|
createVNode(_component_nut_rate, {
|
|
74
74
|
modelValue: _ctx.info.score,
|
|
75
75
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.info.score = $event),
|
|
76
|
-
|
|
76
|
+
size: "15",
|
|
77
77
|
spacing: "5",
|
|
78
78
|
readonly: "",
|
|
79
|
-
|
|
79
|
+
touchable: false,
|
|
80
80
|
onChange: _ctx.handleClick
|
|
81
81
|
}, null, 8, ["modelValue", "onChange"])
|
|
82
82
|
])
|
|
@@ -99,10 +99,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
99
|
createVNode(_component_nut_rate, {
|
|
100
100
|
modelValue: _ctx.info.score,
|
|
101
101
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.info.score = $event),
|
|
102
|
-
|
|
102
|
+
size: "15",
|
|
103
103
|
spacing: "3",
|
|
104
104
|
readonly: "",
|
|
105
|
-
|
|
105
|
+
touchable: false
|
|
106
106
|
}, null, 8, ["modelValue"]),
|
|
107
107
|
createElementVNode("i", {
|
|
108
108
|
class: normalizeClass([`nut-comment-header__${_ctx.type}-score-i`])
|
|
@@ -347,11 +347,7 @@ const _sfc_main = create({
|
|
|
347
347
|
timeOut && clearTimeout(timeOut);
|
|
348
348
|
el.style.transition = "none";
|
|
349
349
|
el.style.top = "0";
|
|
350
|
-
|
|
351
|
-
if (el.previousSibling) {
|
|
352
|
-
runStep(el.previousSibling);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
350
|
+
reset(el, turningNum);
|
|
355
351
|
}, 0.975 * props.during);
|
|
356
352
|
} else {
|
|
357
353
|
el.style.top = `-${data.sortFlag == "add" ? turningNum * 100 : (10 - turningNum) * 100}%`;
|
|
@@ -360,6 +356,15 @@ const _sfc_main = create({
|
|
|
360
356
|
runStep(el.previousSibling);
|
|
361
357
|
}
|
|
362
358
|
};
|
|
359
|
+
const reset = (el, turningNum) => {
|
|
360
|
+
setTimeout(() => {
|
|
361
|
+
if (turningNum == 10) {
|
|
362
|
+
if (el.previousSibling) {
|
|
363
|
+
runStep(el.previousSibling);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}, 200);
|
|
367
|
+
};
|
|
363
368
|
const imgNumberScroll = () => {
|
|
364
369
|
if (data.pointNum != 0) {
|
|
365
370
|
Math.pow(10, data.pointNum);
|
|
@@ -30,10 +30,6 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
30
30
|
const { componentName, create } = createComponent("input");
|
|
31
31
|
const _sfc_main = create({
|
|
32
32
|
props: {
|
|
33
|
-
ref: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: ""
|
|
36
|
-
},
|
|
37
33
|
type: {
|
|
38
34
|
type: String,
|
|
39
35
|
default: "text"
|
|
@@ -50,10 +46,6 @@ const _sfc_main = create({
|
|
|
50
46
|
type: String,
|
|
51
47
|
default: "left"
|
|
52
48
|
},
|
|
53
|
-
center: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false
|
|
56
|
-
},
|
|
57
49
|
required: {
|
|
58
50
|
type: Boolean,
|
|
59
51
|
default: false
|
|
@@ -68,7 +60,7 @@ const _sfc_main = create({
|
|
|
68
60
|
},
|
|
69
61
|
maxLength: {
|
|
70
62
|
type: [String, Number],
|
|
71
|
-
default: "
|
|
63
|
+
default: ""
|
|
72
64
|
},
|
|
73
65
|
clearable: {
|
|
74
66
|
type: Boolean,
|
|
@@ -90,14 +82,6 @@ const _sfc_main = create({
|
|
|
90
82
|
type: Function,
|
|
91
83
|
default: null
|
|
92
84
|
},
|
|
93
|
-
rules: {
|
|
94
|
-
type: Array,
|
|
95
|
-
default: []
|
|
96
|
-
},
|
|
97
|
-
rows: {
|
|
98
|
-
type: [String, Number],
|
|
99
|
-
default: null
|
|
100
|
-
},
|
|
101
85
|
showWordLimit: {
|
|
102
86
|
type: Boolean,
|
|
103
87
|
default: false
|
|
@@ -116,7 +100,7 @@ const _sfc_main = create({
|
|
|
116
100
|
}
|
|
117
101
|
},
|
|
118
102
|
components: { MaskClose },
|
|
119
|
-
emits: ["update:modelValue", "
|
|
103
|
+
emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click-input"],
|
|
120
104
|
setup(props, { emit, slots }) {
|
|
121
105
|
const active = ref(false);
|
|
122
106
|
const inputRef = ref();
|
|
@@ -138,7 +122,6 @@ const _sfc_main = create({
|
|
|
138
122
|
const prefixCls = componentName;
|
|
139
123
|
return {
|
|
140
124
|
[prefixCls]: true,
|
|
141
|
-
center: props.center,
|
|
142
125
|
[`${prefixCls}--disabled`]: props.disabled,
|
|
143
126
|
[`${prefixCls}--required`]: props.required,
|
|
144
127
|
[`${prefixCls}--error`]: props.error,
|
|
@@ -160,12 +143,14 @@ const _sfc_main = create({
|
|
|
160
143
|
}
|
|
161
144
|
};
|
|
162
145
|
const onInput = (event) => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
146
|
+
if (!event.target.composing) {
|
|
147
|
+
const input = event.target;
|
|
148
|
+
let value = input.value;
|
|
149
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
150
|
+
value = value.slice(0, Number(props.maxLength));
|
|
151
|
+
}
|
|
152
|
+
updateValue(value);
|
|
167
153
|
}
|
|
168
|
-
updateValue(value);
|
|
169
154
|
};
|
|
170
155
|
const updateValue = (value, trigger = "onChange") => {
|
|
171
156
|
var _a;
|
|
@@ -183,7 +168,6 @@ const _sfc_main = create({
|
|
|
183
168
|
}
|
|
184
169
|
if (value !== props.modelValue) {
|
|
185
170
|
emit("update:modelValue", value);
|
|
186
|
-
emit("change", value);
|
|
187
171
|
}
|
|
188
172
|
};
|
|
189
173
|
const onFocus = (event) => {
|
|
@@ -217,7 +201,6 @@ const _sfc_main = create({
|
|
|
217
201
|
if (props.disabled)
|
|
218
202
|
return;
|
|
219
203
|
emit("update:modelValue", "", event);
|
|
220
|
-
emit("change", "", event);
|
|
221
204
|
emit("clear", "", event);
|
|
222
205
|
};
|
|
223
206
|
const resetValidation = () => {
|
|
@@ -232,6 +215,15 @@ const _sfc_main = create({
|
|
|
232
215
|
}
|
|
233
216
|
emit("click-input", event);
|
|
234
217
|
};
|
|
218
|
+
const startComposing = ({ target }) => {
|
|
219
|
+
target.composing = true;
|
|
220
|
+
};
|
|
221
|
+
const endComposing = ({ target }) => {
|
|
222
|
+
if (target.composing) {
|
|
223
|
+
target.composing = false;
|
|
224
|
+
target.dispatchEvent(new Event("input"));
|
|
225
|
+
}
|
|
226
|
+
};
|
|
235
227
|
watch(
|
|
236
228
|
() => props.modelValue,
|
|
237
229
|
() => {
|
|
@@ -253,6 +245,8 @@ const _sfc_main = create({
|
|
|
253
245
|
onFocus,
|
|
254
246
|
onBlur,
|
|
255
247
|
clear,
|
|
248
|
+
startComposing,
|
|
249
|
+
endComposing,
|
|
256
250
|
onClickInput
|
|
257
251
|
};
|
|
258
252
|
}
|
|
@@ -292,8 +286,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
292
286
|
onInput: _ctx.onInput,
|
|
293
287
|
onFocus: _ctx.onFocus,
|
|
294
288
|
onBlur: _ctx.onBlur,
|
|
295
|
-
onClick: _ctx.onClickInput
|
|
296
|
-
|
|
289
|
+
onClick: _ctx.onClickInput,
|
|
290
|
+
onChange: _ctx.endComposing,
|
|
291
|
+
onCompositionend: _ctx.endComposing,
|
|
292
|
+
onCompositionstart: _ctx.startComposing
|
|
293
|
+
}, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
|
|
297
294
|
_ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
298
295
|
createElementVNode("span", _hoisted_5, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
|
|
299
296
|
createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
|
|
@@ -303,8 +300,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
303
300
|
renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
304
301
|
createVNode(_component_MaskClose, mergeProps({ class: "nut-input-clear" }, _ctx.$attrs, {
|
|
305
302
|
size: _ctx.clearSize,
|
|
303
|
+
width: _ctx.clearSize,
|
|
304
|
+
height: _ctx.clearSize,
|
|
306
305
|
onClick: _ctx.clear
|
|
307
|
-
}), null, 16, ["size", "onClick"])
|
|
306
|
+
}), null, 16, ["size", "width", "height", "onClick"])
|
|
308
307
|
])
|
|
309
308
|
], 512)), [
|
|
310
309
|
[vShow, _ctx.active && _ctx.modelValue.length > 0]
|
|
@@ -126,9 +126,9 @@ const _sfc_main = create({
|
|
|
126
126
|
(value) => {
|
|
127
127
|
show.value = value;
|
|
128
128
|
if (value) {
|
|
129
|
-
window.addEventListener("touchstart", clickAway,
|
|
129
|
+
window.addEventListener("touchstart", clickAway, false);
|
|
130
130
|
} else {
|
|
131
|
-
window.removeEventListener("touchstart", clickAway,
|
|
131
|
+
window.removeEventListener("touchstart", clickAway, false);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
);
|
|
@@ -238,7 +238,7 @@ const _sfc_main$1 = create$1({
|
|
|
238
238
|
let dom = roller.value;
|
|
239
239
|
const { transform } = window.getComputedStyle(dom);
|
|
240
240
|
if (props.threeDimensional) {
|
|
241
|
-
const circle = Math.floor(touchDeg.value / 360);
|
|
241
|
+
const circle = Math.floor(parseInt(touchDeg.value) / 360);
|
|
242
242
|
const cos = +transform.split(", ")[5];
|
|
243
243
|
const sin = +transform.split(", ")[6] < 0 ? 180 : 0;
|
|
244
244
|
const endDeg = circle * 360 + Math.acos(cos) / Math.PI * 180 + sin;
|
|
@@ -247,6 +247,7 @@ const _sfc_main$1 = create$1({
|
|
|
247
247
|
state.scrollDistance = +transform.slice(7, transform.length - 1).split(", ")[5];
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
+
preventDefault(event, true);
|
|
250
251
|
state.touchParams.startY = touch.deltaY.value;
|
|
251
252
|
state.touchParams.startTime = Date.now();
|
|
252
253
|
state.transformY = state.scrollDistance;
|
|
@@ -54,9 +54,12 @@ const _sfc_main = create({
|
|
|
54
54
|
const height = ref(props.strokeWidth + "px");
|
|
55
55
|
const progressOuter = ref();
|
|
56
56
|
const insideText = ref();
|
|
57
|
+
const percentage = computed(() => {
|
|
58
|
+
return props.percentage >= 100 ? 100 : props.percentage;
|
|
59
|
+
});
|
|
57
60
|
const bgStyle = computed(() => {
|
|
58
61
|
return {
|
|
59
|
-
width:
|
|
62
|
+
width: percentage.value + "%",
|
|
60
63
|
background: props.strokeColor || ""
|
|
61
64
|
};
|
|
62
65
|
});
|
|
@@ -69,6 +72,7 @@ const _sfc_main = create({
|
|
|
69
72
|
});
|
|
70
73
|
return {
|
|
71
74
|
height,
|
|
75
|
+
percentage,
|
|
72
76
|
bgStyle,
|
|
73
77
|
textStyle,
|
|
74
78
|
progressOuter,
|
|
@@ -78,6 +82,10 @@ const _sfc_main = create({
|
|
|
78
82
|
}
|
|
79
83
|
});
|
|
80
84
|
const _hoisted_1 = { class: "nut-progress" };
|
|
85
|
+
const _hoisted_2 = {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "nut-progress-text"
|
|
88
|
+
};
|
|
81
89
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
90
|
const _component_Checked = resolveComponent("Checked");
|
|
83
91
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -119,11 +127,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
119
127
|
], 4)) : createCommentVNode("", true)
|
|
120
128
|
], 6)
|
|
121
129
|
], 6),
|
|
122
|
-
_ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div",
|
|
123
|
-
key: 0,
|
|
124
|
-
class: "nut-progress-text",
|
|
125
|
-
style: normalizeStyle({ lineHeight: _ctx.height })
|
|
126
|
-
}, [
|
|
130
|
+
_ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
127
131
|
_ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
|
|
128
132
|
key: 0,
|
|
129
133
|
style: normalizeStyle(_ctx.textStyle)
|
|
@@ -134,7 +138,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
134
138
|
color: "#439422"
|
|
135
139
|
})
|
|
136
140
|
]) : createCommentVNode("", true)
|
|
137
|
-
]
|
|
141
|
+
])) : createCommentVNode("", true)
|
|
138
142
|
]);
|
|
139
143
|
}
|
|
140
144
|
const Progress = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -6,7 +6,7 @@ import { u as useScrollParent } from "./index-43c34ac6.js";
|
|
|
6
6
|
import { Loading } from "@nutui/icons-vue";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
8
8
|
import "../locale/lang";
|
|
9
|
-
const { componentName, create, translate } = createComponent("
|
|
9
|
+
const { componentName, create, translate } = createComponent("pull-refresh");
|
|
10
10
|
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: {
|
|
@@ -177,7 +177,7 @@ const _sfc_main = create({
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
-
const _hoisted_1 = { class: "nut-
|
|
180
|
+
const _hoisted_1 = { class: "nut-pull-refresh-container-topbox-text" };
|
|
181
181
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
182
182
|
const _component_Loading = resolveComponent("Loading");
|
|
183
183
|
return openBlock(), createElementBlock("div", {
|
|
@@ -188,16 +188,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
188
188
|
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
|
|
189
189
|
}, [
|
|
190
190
|
createElementVNode("div", {
|
|
191
|
-
class: "nut-
|
|
191
|
+
class: "nut-pull-refresh-container",
|
|
192
192
|
style: normalizeStyle(_ctx.getStyle)
|
|
193
193
|
}, [
|
|
194
194
|
createElementVNode("div", {
|
|
195
|
-
class: "nut-
|
|
195
|
+
class: "nut-pull-refresh-container-topbox",
|
|
196
196
|
style: normalizeStyle(_ctx.getHeightStyle)
|
|
197
197
|
}, [
|
|
198
198
|
_ctx.status == "loading" && !_ctx.slots.loading ? (openBlock(), createBlock(_component_Loading, {
|
|
199
199
|
key: 0,
|
|
200
|
-
class: "nut-icon-loading nut-
|
|
200
|
+
class: "nut-icon-loading nut-pull-refresh-container-topbox-icon"
|
|
201
201
|
})) : createCommentVNode("", true),
|
|
202
202
|
createElementVNode("div", _hoisted_1, toDisplayString(_ctx.getPullStatus), 1),
|
|
203
203
|
_ctx.status == "pulling" ? renderSlot(_ctx.$slots, "pulling", { key: 1 }) : createCommentVNode("", true),
|