@nutui/nutui 3.1.12-beta.1 → 3.1.14
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 +56 -0
- package/README.md +139 -37
- package/dist/nutui.d.ts +9 -2
- package/dist/nutui.es.js +4830 -2950
- package/dist/nutui.umd.js +4910 -2953
- package/dist/packages/_es/ActionSheet.js +12 -13
- package/dist/packages/_es/Address.js +64 -77
- package/dist/packages/_es/Avatar.js +5 -4
- package/dist/packages/_es/BackTop.js +109 -72
- package/dist/packages/_es/Badge.js +5 -4
- package/dist/packages/_es/Barrage.js +57 -63
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +18 -27
- package/dist/packages/_es/Card.js +8 -7
- package/dist/packages/_es/Cascader.js +547 -0
- package/dist/packages/_es/Cell.js +13 -5
- package/dist/packages/_es/CellGroup.js +14 -7
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +4 -9
- package/dist/packages/_es/CircleProgress.js +46 -142
- package/dist/packages/_es/Col.js +5 -4
- package/dist/packages/_es/Collapse.js +10 -35
- package/dist/packages/_es/CollapseItem.js +35 -80
- package/dist/packages/_es/CountDown.js +7 -10
- package/dist/packages/_es/CountUp.js +33 -34
- package/dist/packages/_es/DatePicker.js +219 -451
- package/dist/packages/_es/Dialog.js +98 -46
- package/dist/packages/_es/Divider.js +6 -5
- package/dist/packages/_es/Drag.js +50 -76
- package/dist/packages/_es/Elevator.js +53 -81
- package/dist/packages/_es/Empty.js +74 -0
- package/dist/packages/_es/FixedNav.js +9 -8
- package/dist/packages/_es/Form.js +23 -9
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +12 -0
- package/dist/packages/_es/GridItem.js +149 -0
- package/dist/packages/_es/Icon.js +40 -6
- package/dist/packages/_es/ImagePreview.js +158 -44
- package/dist/packages/_es/Indicator.js +66 -0
- package/dist/packages/_es/InfiniteLoading.js +109 -95
- package/dist/packages/_es/Input.js +21 -22
- package/dist/packages/_es/InputNumber.js +18 -24
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +14 -16
- package/dist/packages/_es/MenuItem.js +11 -9
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +31 -46
- package/dist/packages/_es/Notify.js +166 -30
- package/dist/packages/_es/NumberKeyboard.js +7 -9
- package/dist/packages/_es/OverLay.js +29 -22
- package/dist/packages/_es/Pagination.js +9 -8
- package/dist/packages/_es/Picker.js +447 -61
- package/dist/packages/_es/Popover.js +34 -161
- package/dist/packages/_es/Popup.js +77 -17
- package/dist/packages/_es/Price.js +7 -18
- package/dist/packages/_es/Progress.js +12 -23
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +31 -38
- package/dist/packages/_es/Rate.js +35 -17
- package/dist/packages/_es/Row.js +5 -4
- package/dist/packages/_es/SearchBar.js +5 -7
- package/dist/packages/_es/ShortPassword.js +59 -89
- package/dist/packages/_es/Signature.js +71 -70
- package/dist/packages/_es/Skeleton.js +138 -0
- package/dist/packages/_es/Sku.js +43 -53
- package/dist/packages/_es/Step.js +8 -10
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +28 -43
- package/dist/packages/_es/Swiper.js +418 -17
- package/dist/packages/_es/SwiperItem.js +39 -14
- package/dist/packages/_es/Switch.js +47 -16
- package/dist/packages/_es/TabPane.js +5 -4
- package/dist/packages/_es/Tabbar.js +5 -4
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Table.js +191 -0
- package/dist/packages/_es/Tabs.js +21 -23
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +12 -16
- package/dist/packages/_es/TimeDetail.js +5 -7
- package/dist/packages/_es/TimePannel.js +5 -7
- package/dist/packages/_es/TimeSelect.js +7 -12
- package/dist/packages/_es/Toast.js +178 -46
- package/dist/packages/_es/Uploader.js +149 -109
- package/dist/packages/_es/Video.js +405 -0
- package/dist/packages/_es/common.js +136 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +58 -43
- package/dist/packages/_es/index3.js +28 -411
- package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/util.js +1 -1
- package/dist/packages/cascader/index.scss +81 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- package/dist/packages/dialog/index.scss +17 -0
- package/dist/packages/drag/index.scss +4 -0
- package/dist/packages/empty/index.scss +33 -0
- package/dist/packages/fixednav/index.scss +6 -1
- package/dist/packages/formitem/index.scss +4 -1
- package/dist/packages/grid/index.scss +10 -0
- package/dist/packages/griditem/index.scss +92 -0
- package/dist/packages/icon/index.scss +2 -1
- package/dist/packages/indicator/index.scss +48 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/skeleton/index.scss +57 -0
- package/dist/packages/table/index.scss +81 -0
- package/dist/packages/tabs/index.scss +16 -0
- package/dist/packages/textarea/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +1 -2
- package/dist/packages/timeselect/index.scss +3 -0
- package/dist/packages/toast/index.scss +6 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +2 -1
- package/dist/styles/font/config.json +2 -1
- package/dist/styles/font/demo_index.html +26 -3
- package/dist/styles/font/iconfont.css +7 -3
- package/dist/styles/font/iconfont.js +31 -32
- package/dist/styles/font/iconfont.json +7 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +40 -33
- package/dist/styles/variables.scss +54 -1
- package/package.json +2 -3
- package/dist/packages/_es/commonProps.js +0 -30
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
- package/dist/packages/_es/use-lock-scroll.js +0 -23
|
@@ -17,21 +17,18 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
|
-
import Taro from "@tarojs/taro";
|
|
29
25
|
import { ref, computed, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, withModifiers, Fragment, renderList, renderSlot } from "vue";
|
|
30
26
|
import { c as createComponent } from "./component.js";
|
|
31
|
-
import { u as useTouch } from "./
|
|
32
|
-
import { u as
|
|
27
|
+
import { u as useTouch } from "./index2.js";
|
|
28
|
+
import { u as useRect } from "./index3.js";
|
|
29
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
33
30
|
const { componentName, create } = createComponent("range");
|
|
34
|
-
|
|
31
|
+
const _sfc_main = create({
|
|
35
32
|
props: {
|
|
36
33
|
range: {
|
|
37
34
|
type: Boolean,
|
|
@@ -141,13 +138,13 @@ var _sfc_main = create({
|
|
|
141
138
|
emit("change", value);
|
|
142
139
|
}
|
|
143
140
|
};
|
|
144
|
-
const onClick =
|
|
141
|
+
const onClick = (event) => {
|
|
145
142
|
if (props.disabled) {
|
|
146
143
|
return;
|
|
147
144
|
}
|
|
148
145
|
const { min, modelValue } = props;
|
|
149
|
-
const rect =
|
|
150
|
-
const delta = event.
|
|
146
|
+
const rect = useRect(root);
|
|
147
|
+
const delta = event.clientX - rect.left;
|
|
151
148
|
const total = rect.width;
|
|
152
149
|
const value = Number(min) + delta / total * scope.value;
|
|
153
150
|
if (isRange(modelValue)) {
|
|
@@ -175,7 +172,7 @@ var _sfc_main = create({
|
|
|
175
172
|
}
|
|
176
173
|
dragStatus.value = "start";
|
|
177
174
|
};
|
|
178
|
-
const onTouchMove =
|
|
175
|
+
const onTouchMove = (event) => {
|
|
179
176
|
if (props.disabled) {
|
|
180
177
|
return;
|
|
181
178
|
}
|
|
@@ -184,7 +181,7 @@ var _sfc_main = create({
|
|
|
184
181
|
}
|
|
185
182
|
touch.move(event);
|
|
186
183
|
dragStatus.value = "draging";
|
|
187
|
-
const rect =
|
|
184
|
+
const rect = useRect(root);
|
|
188
185
|
const delta = touch.deltaX.value;
|
|
189
186
|
const total = rect.width;
|
|
190
187
|
const diff = delta / total * scope.value;
|
|
@@ -211,7 +208,6 @@ var _sfc_main = create({
|
|
|
211
208
|
const value = typeof idx === "number" ? props.modelValue[idx] : props.modelValue;
|
|
212
209
|
return value;
|
|
213
210
|
};
|
|
214
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
215
211
|
return __spreadProps(__spreadValues({
|
|
216
212
|
root,
|
|
217
213
|
classes,
|
|
@@ -224,8 +220,7 @@ var _sfc_main = create({
|
|
|
224
220
|
}, toRefs(props)), {
|
|
225
221
|
barStyle,
|
|
226
222
|
curValue,
|
|
227
|
-
buttonIndex
|
|
228
|
-
refRandomId
|
|
223
|
+
buttonIndex
|
|
229
224
|
});
|
|
230
225
|
}
|
|
231
226
|
});
|
|
@@ -234,18 +229,17 @@ const _hoisted_2 = {
|
|
|
234
229
|
key: 0,
|
|
235
230
|
class: "min"
|
|
236
231
|
};
|
|
237
|
-
const _hoisted_3 = ["
|
|
238
|
-
const _hoisted_4 =
|
|
239
|
-
const _hoisted_5 = {
|
|
232
|
+
const _hoisted_3 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
|
|
233
|
+
const _hoisted_4 = {
|
|
240
234
|
key: 0,
|
|
241
235
|
class: "number"
|
|
242
236
|
};
|
|
243
|
-
const
|
|
244
|
-
const
|
|
237
|
+
const _hoisted_5 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
|
|
238
|
+
const _hoisted_6 = {
|
|
245
239
|
key: 0,
|
|
246
240
|
class: "number"
|
|
247
241
|
};
|
|
248
|
-
const
|
|
242
|
+
const _hoisted_7 = {
|
|
249
243
|
key: 1,
|
|
250
244
|
class: "max"
|
|
251
245
|
};
|
|
@@ -254,7 +248,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254
248
|
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(+_ctx.min), 1)) : createCommentVNode("", true),
|
|
255
249
|
createElementVNode("view", {
|
|
256
250
|
ref: "root",
|
|
257
|
-
id: "root-" + _ctx.refRandomId,
|
|
258
251
|
style: normalizeStyle(_ctx.wrapperStyle),
|
|
259
252
|
class: normalizeClass(_ctx.classes),
|
|
260
253
|
onClick: _cache[9] || (_cache[9] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
@@ -263,22 +256,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
263
256
|
class: "nut-range-bar",
|
|
264
257
|
style: normalizeStyle(_ctx.barStyle)
|
|
265
258
|
}, [
|
|
266
|
-
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (
|
|
259
|
+
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (index2) => {
|
|
267
260
|
return createElementVNode("view", {
|
|
268
|
-
key:
|
|
261
|
+
key: index2,
|
|
269
262
|
role: "slider",
|
|
270
263
|
class: normalizeClass({
|
|
271
|
-
"nut-range-button-wrapper-left":
|
|
272
|
-
"nut-range-button-wrapper-right":
|
|
264
|
+
"nut-range-button-wrapper-left": index2 == 0,
|
|
265
|
+
"nut-range-button-wrapper-right": index2 == 1
|
|
273
266
|
}),
|
|
274
267
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
275
268
|
"aria-valuemin": +_ctx.min,
|
|
276
|
-
"aria-valuenow": _ctx.curValue(
|
|
269
|
+
"aria-valuenow": _ctx.curValue(index2),
|
|
277
270
|
"aria-valuemax": +_ctx.max,
|
|
278
271
|
"aria-orientation": "horizontal",
|
|
279
272
|
onTouchstart: withModifiers((e) => {
|
|
280
|
-
if (typeof
|
|
281
|
-
_ctx.buttonIndex =
|
|
273
|
+
if (typeof index2 === "number") {
|
|
274
|
+
_ctx.buttonIndex = index2;
|
|
282
275
|
}
|
|
283
276
|
_ctx.onTouchStart(e);
|
|
284
277
|
}, ["stop", "prevent"]),
|
|
@@ -292,9 +285,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
292
285
|
class: "nut-range-button",
|
|
293
286
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
294
287
|
}, [
|
|
295
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
288
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.curValue(index2)), 1)) : createCommentVNode("", true)
|
|
296
289
|
], 4))
|
|
297
|
-
], 42,
|
|
290
|
+
], 42, _hoisted_3);
|
|
298
291
|
}), 64)) : (openBlock(), createElementBlock("view", {
|
|
299
292
|
key: 1,
|
|
300
293
|
role: "slider",
|
|
@@ -317,13 +310,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
317
310
|
class: "nut-range-button",
|
|
318
311
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
319
312
|
}, [
|
|
320
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
313
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.curValue(_ctx.index)), 1)) : createCommentVNode("", true)
|
|
321
314
|
], 4))
|
|
322
|
-
], 40,
|
|
315
|
+
], 40, _hoisted_5))
|
|
323
316
|
], 4)
|
|
324
|
-
],
|
|
325
|
-
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view",
|
|
317
|
+
], 6),
|
|
318
|
+
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(+_ctx.max), 1)) : createCommentVNode("", true)
|
|
326
319
|
]);
|
|
327
320
|
}
|
|
328
|
-
_sfc_main
|
|
329
|
-
export {
|
|
321
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
322
|
+
export { index as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createVNode, createBlock, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { componentName, create } = createComponent("rate");
|
|
10
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
12
13
|
count: {
|
|
13
14
|
type: [String, Number],
|
|
@@ -52,6 +53,14 @@ var _sfc_main = create({
|
|
|
52
53
|
spacing: {
|
|
53
54
|
type: [String, Number],
|
|
54
55
|
default: 14
|
|
56
|
+
},
|
|
57
|
+
classPrefix: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "nut-icon"
|
|
60
|
+
},
|
|
61
|
+
fontClassName: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "nutui-iconfont"
|
|
55
64
|
}
|
|
56
65
|
},
|
|
57
66
|
emits: ["update:modelValue", "change"],
|
|
@@ -62,16 +71,20 @@ var _sfc_main = create({
|
|
|
62
71
|
[prefixCls]: true
|
|
63
72
|
};
|
|
64
73
|
});
|
|
65
|
-
const onClick = (e,
|
|
74
|
+
const onClick = (e, index2) => {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
e.stopPropagation();
|
|
66
77
|
if (props.disabled || props.readonly)
|
|
67
78
|
return;
|
|
68
79
|
let value = 0;
|
|
69
|
-
if (
|
|
80
|
+
if (index2 === 1 && props.modelValue === index2)
|
|
70
81
|
;
|
|
71
82
|
else {
|
|
72
|
-
value =
|
|
73
|
-
if (props.allowHalf
|
|
74
|
-
|
|
83
|
+
value = index2;
|
|
84
|
+
if (props.allowHalf) {
|
|
85
|
+
if ((e == null ? void 0 : e.target).className.includes("__icon--half")) {
|
|
86
|
+
value -= 0.5;
|
|
87
|
+
}
|
|
75
88
|
}
|
|
76
89
|
}
|
|
77
90
|
emit("update:modelValue", value);
|
|
@@ -84,6 +97,7 @@ var _sfc_main = create({
|
|
|
84
97
|
};
|
|
85
98
|
}
|
|
86
99
|
});
|
|
100
|
+
const _hoisted_1 = ["onClick"];
|
|
87
101
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
88
102
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
89
103
|
return openBlock(), createElementBlock("view", {
|
|
@@ -93,33 +107,37 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
93
107
|
return openBlock(), createElementBlock("view", {
|
|
94
108
|
class: "nut-rate-item",
|
|
95
109
|
key: n,
|
|
110
|
+
onClick: ($event) => _ctx.onClick($event, n),
|
|
96
111
|
style: normalizeStyle({ marginRight: _ctx.pxCheck(_ctx.spacing) })
|
|
97
112
|
}, [
|
|
98
113
|
createVNode(_component_nut_icon, {
|
|
99
114
|
size: _ctx.iconSize,
|
|
100
115
|
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
101
|
-
|
|
116
|
+
"font-class-name": _ctx.fontClassName,
|
|
117
|
+
"class-prefix": _ctx.classPrefix,
|
|
102
118
|
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
103
119
|
name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
|
|
104
|
-
}, null, 8, ["size", "
|
|
120
|
+
}, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]),
|
|
105
121
|
_ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
106
122
|
key: 0,
|
|
107
123
|
class: "nut-rate-item__icon nut-rate-item__icon--half",
|
|
108
|
-
|
|
109
|
-
|
|
124
|
+
"font-class-name": _ctx.fontClassName,
|
|
125
|
+
"class-prefix": _ctx.classPrefix,
|
|
126
|
+
color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
110
127
|
size: _ctx.iconSize,
|
|
111
128
|
name: _ctx.checkedIcon
|
|
112
|
-
}, null, 8, ["
|
|
129
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
113
130
|
key: 1,
|
|
114
131
|
class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
|
|
115
|
-
|
|
132
|
+
"font-class-name": _ctx.fontClassName,
|
|
133
|
+
"class-prefix": _ctx.classPrefix,
|
|
116
134
|
color: _ctx.voidColor,
|
|
117
135
|
size: _ctx.iconSize,
|
|
118
136
|
name: _ctx.uncheckedIcon
|
|
119
|
-
}, null, 8, ["
|
|
120
|
-
],
|
|
137
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
138
|
+
], 12, _hoisted_1);
|
|
121
139
|
}), 128))
|
|
122
140
|
], 2);
|
|
123
141
|
}
|
|
124
|
-
_sfc_main
|
|
125
|
-
export {
|
|
142
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
143
|
+
export { index as default };
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("row");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
type: {
|
|
12
13
|
type: String,
|
|
@@ -56,5 +57,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
56
57
|
renderSlot(_ctx.$slots, "default")
|
|
57
58
|
], 2);
|
|
58
59
|
}
|
|
59
|
-
_sfc_main
|
|
60
|
-
export {
|
|
60
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
61
|
+
export { index as default };
|
|
@@ -17,18 +17,16 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeStyle, renderSlot, createCommentVNode, createElementVNode, withModifiers, withDirectives, createVNode, vShow } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
28
|
const { create } = createComponent("searchbar");
|
|
31
|
-
|
|
29
|
+
const _sfc_main = create({
|
|
32
30
|
props: {
|
|
33
31
|
modelValue: {
|
|
34
32
|
type: [String, Number],
|
|
@@ -192,5 +190,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
192
190
|
])) : createCommentVNode("", true)
|
|
193
191
|
], 4);
|
|
194
192
|
}
|
|
195
|
-
_sfc_main
|
|
196
|
-
export {
|
|
193
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
194
|
+
export { index as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, computed, watch,
|
|
6
|
+
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, withDirectives, normalizeStyle, vModelText, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
const { create } = createComponent("shortpassword");
|
|
10
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
12
12
|
title: {
|
|
13
13
|
type: String,
|
|
@@ -52,43 +52,18 @@ var _sfc_main = create({
|
|
|
52
52
|
const realpwd = ref();
|
|
53
53
|
const comLen = computed(() => range(Number(props.length)));
|
|
54
54
|
const show = ref(props.visible);
|
|
55
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
56
|
-
const randRef = ref(refRandomId);
|
|
57
|
-
const isWx = ref(false);
|
|
58
55
|
function sureClick() {
|
|
59
56
|
emit("ok", realInput.value);
|
|
60
57
|
}
|
|
61
58
|
function focus() {
|
|
62
|
-
|
|
63
|
-
console.log(123);
|
|
64
|
-
if (isWx.value) {
|
|
65
|
-
setTimeout(() => {
|
|
66
|
-
if (!document.getElementById("nut-input-real-taro-" + randRef.value))
|
|
67
|
-
return;
|
|
68
|
-
dom = document.getElementById("nut-input-real-taro-" + randRef.value);
|
|
69
|
-
if (!dom)
|
|
70
|
-
return;
|
|
71
|
-
dom.focus();
|
|
72
|
-
}, 150);
|
|
73
|
-
} else {
|
|
74
|
-
dom = document.getElementsByClassName("nut-input-real")[0];
|
|
75
|
-
let h = dom.children[0];
|
|
76
|
-
h.focus();
|
|
77
|
-
}
|
|
59
|
+
realpwd.value.focus();
|
|
78
60
|
}
|
|
79
61
|
watch(() => props.visible, (value) => {
|
|
80
62
|
show.value = value;
|
|
81
|
-
if (value) {
|
|
82
|
-
randRef.value = Math.random().toString(36).slice(-8);
|
|
83
|
-
if (Taro.getEnv() === "WEB") {
|
|
84
|
-
isWx.value = false;
|
|
85
|
-
} else {
|
|
86
|
-
isWx.value = true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
63
|
});
|
|
90
64
|
watch(() => props.modelValue, (value) => {
|
|
91
65
|
realInput.value = value;
|
|
66
|
+
console.log("watch", value);
|
|
92
67
|
});
|
|
93
68
|
function changeValue(e) {
|
|
94
69
|
const input = e.target;
|
|
@@ -117,46 +92,54 @@ var _sfc_main = create({
|
|
|
117
92
|
function onTips() {
|
|
118
93
|
emit("tips");
|
|
119
94
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
95
|
+
function systemStyle() {
|
|
96
|
+
let u = navigator.userAgent;
|
|
97
|
+
let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
|
|
98
|
+
let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
99
|
+
if (isIOS) {
|
|
100
|
+
return {
|
|
101
|
+
paddingRight: "1200px"
|
|
102
|
+
};
|
|
127
103
|
}
|
|
128
|
-
|
|
104
|
+
if (isAndroid) {
|
|
105
|
+
return {
|
|
106
|
+
opacity: 0,
|
|
107
|
+
zindex: 10
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
129
111
|
return {
|
|
130
112
|
comLen,
|
|
131
113
|
sureClick,
|
|
132
114
|
realInput,
|
|
133
115
|
realpwd,
|
|
116
|
+
focus,
|
|
134
117
|
range,
|
|
135
118
|
changeValue,
|
|
136
119
|
close,
|
|
137
120
|
onTips,
|
|
138
|
-
focus,
|
|
139
121
|
show,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
refRandomId,
|
|
143
|
-
randRef
|
|
122
|
+
systemStyle,
|
|
123
|
+
closeIcon
|
|
144
124
|
};
|
|
145
125
|
}
|
|
146
126
|
});
|
|
147
127
|
const _hoisted_1 = { class: "nut-shortpsd-title" };
|
|
148
|
-
const _hoisted_2 = { class: "nut-
|
|
149
|
-
const _hoisted_3 =
|
|
150
|
-
const _hoisted_4 = { class: "nut-input-
|
|
151
|
-
const _hoisted_5 =
|
|
152
|
-
const _hoisted_6 = {
|
|
128
|
+
const _hoisted_2 = { class: "nut-shortpsd-subtitle" };
|
|
129
|
+
const _hoisted_3 = { class: "nut-input-normalw" };
|
|
130
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "nut-input-site" }, null, -1);
|
|
131
|
+
const _hoisted_5 = {
|
|
153
132
|
key: 0,
|
|
154
133
|
class: "nut-shortpsd-icon"
|
|
155
134
|
};
|
|
156
|
-
const
|
|
157
|
-
const
|
|
135
|
+
const _hoisted_6 = { class: "nut-shortpsd-message" };
|
|
136
|
+
const _hoisted_7 = { class: "nut-shortpsd-error" };
|
|
137
|
+
const _hoisted_8 = {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "nut-shortpsd-forget"
|
|
140
|
+
};
|
|
158
141
|
const _hoisted_9 = {
|
|
159
|
-
key:
|
|
142
|
+
key: 0,
|
|
160
143
|
class: "nut-shortpsd-footer"
|
|
161
144
|
};
|
|
162
145
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -170,7 +153,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
170
153
|
textAlign: "center"
|
|
171
154
|
},
|
|
172
155
|
visible: _ctx.show,
|
|
173
|
-
"onUpdate:visible": _cache[
|
|
156
|
+
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
|
|
174
157
|
closeable: true,
|
|
175
158
|
onClickCloseIcon: _ctx.closeIcon,
|
|
176
159
|
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
@@ -179,67 +162,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
179
162
|
default: withCtx(() => [
|
|
180
163
|
createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title), 1),
|
|
181
164
|
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.desc), 1),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
class: "nut-input-real-taro",
|
|
185
|
-
id: "nut-input-real-taro-" + _ctx.randRef,
|
|
186
|
-
type: "number",
|
|
187
|
-
maxlength: _ctx.length,
|
|
188
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.realInput = $event),
|
|
189
|
-
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.changeValue && _ctx.changeValue(...args))
|
|
190
|
-
}, null, 40, _hoisted_3)), [
|
|
191
|
-
[vModelText, _ctx.realInput]
|
|
192
|
-
]) : createCommentVNode("", true),
|
|
193
|
-
createElementVNode("view", _hoisted_4, [
|
|
194
|
-
!_ctx.isWx ? withDirectives((openBlock(), createElementBlock("input", {
|
|
195
|
-
key: 0,
|
|
165
|
+
createElementVNode("div", _hoisted_3, [
|
|
166
|
+
withDirectives(createElementVNode("input", {
|
|
196
167
|
ref: "realpwd",
|
|
197
168
|
class: "nut-input-real",
|
|
198
169
|
type: "number",
|
|
199
170
|
maxlength: "6",
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
171
|
+
style: normalizeStyle(_ctx.systemStyle()),
|
|
172
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.realInput = $event),
|
|
173
|
+
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.changeValue && _ctx.changeValue(...args))
|
|
174
|
+
}, null, 36), [
|
|
203
175
|
[vModelText, _ctx.realInput]
|
|
204
|
-
])
|
|
205
|
-
|
|
176
|
+
]),
|
|
177
|
+
_hoisted_4,
|
|
206
178
|
createElementVNode("view", {
|
|
207
|
-
class: "nut-shortpsd-fake
|
|
208
|
-
onClick: _cache[
|
|
179
|
+
class: "nut-shortpsd-fake",
|
|
180
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
209
181
|
}, [
|
|
210
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen,
|
|
182
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index2) => {
|
|
211
183
|
return openBlock(), createElementBlock("view", {
|
|
212
184
|
class: "nut-shortpsd-li",
|
|
213
|
-
key:
|
|
185
|
+
key: index2
|
|
214
186
|
}, [
|
|
215
|
-
String(_ctx.realInput).length >
|
|
187
|
+
String(_ctx.realInput).length > index2 ? (openBlock(), createElementBlock("view", _hoisted_5)) : createCommentVNode("", true)
|
|
216
188
|
]);
|
|
217
189
|
}), 128))
|
|
218
190
|
])
|
|
219
191
|
]),
|
|
220
|
-
createElementVNode("view",
|
|
221
|
-
createElementVNode("view",
|
|
222
|
-
_ctx.tips ? (openBlock(), createElementBlock("view",
|
|
223
|
-
key: 0,
|
|
224
|
-
class: "nut-shortpsd-forget",
|
|
225
|
-
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.onTips && _ctx.onTips(...args))
|
|
226
|
-
}, [
|
|
192
|
+
createElementVNode("view", _hoisted_6, [
|
|
193
|
+
createElementVNode("view", _hoisted_7, toDisplayString(_ctx.errorMsg), 1),
|
|
194
|
+
_ctx.tips ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
227
195
|
createVNode(_component_nut_icon, {
|
|
228
196
|
class: "icon",
|
|
229
197
|
size: "11px",
|
|
230
198
|
name: "tips"
|
|
231
199
|
}),
|
|
232
|
-
createElementVNode("view",
|
|
200
|
+
createElementVNode("view", {
|
|
201
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onTips && _ctx.onTips(...args))
|
|
202
|
+
}, toDisplayString(_ctx.tips), 1)
|
|
233
203
|
])) : createCommentVNode("", true)
|
|
234
204
|
]),
|
|
235
205
|
!_ctx.noButton ? (openBlock(), createElementBlock("view", _hoisted_9, [
|
|
236
206
|
createElementVNode("view", {
|
|
237
207
|
class: "nut-shortpsd-cancle",
|
|
238
|
-
onClick: _cache[
|
|
208
|
+
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args))
|
|
239
209
|
}, "\u53D6\u6D88"),
|
|
240
210
|
createElementVNode("view", {
|
|
241
211
|
class: "nut-shortpsd-sure",
|
|
242
|
-
onClick: _cache[
|
|
212
|
+
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.sureClick && _ctx.sureClick(...args))
|
|
243
213
|
}, "\u786E\u8BA4")
|
|
244
214
|
])) : createCommentVNode("", true)
|
|
245
215
|
]),
|
|
@@ -247,5 +217,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
247
217
|
}, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay"])
|
|
248
218
|
]);
|
|
249
219
|
}
|
|
250
|
-
_sfc_main
|
|
251
|
-
export {
|
|
220
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
221
|
+
export { index as default };
|