@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,140 +17,25 @@ 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 {
|
|
25
|
+
import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, withModifiers, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import "./
|
|
27
|
+
import Popup, { popupProps } from "./Popup.js";
|
|
28
|
+
import Button from "./Button.js";
|
|
29
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
|
+
import "./OverLay.js";
|
|
31
|
+
import "./Icon.js";
|
|
34
32
|
import "./pxCheck.js";
|
|
35
|
-
const { componentName: componentName$1, create: create$1 } = createComponent("button");
|
|
36
|
-
var _sfc_main$1 = create$1({
|
|
37
|
-
components: {
|
|
38
|
-
[_sfc_main$2.name]: _sfc_main$2
|
|
39
|
-
},
|
|
40
|
-
props: {
|
|
41
|
-
color: String,
|
|
42
|
-
shape: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "round"
|
|
45
|
-
},
|
|
46
|
-
plain: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
},
|
|
50
|
-
loading: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
},
|
|
54
|
-
disabled: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
type: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: "default"
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "normal"
|
|
65
|
-
},
|
|
66
|
-
block: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: false
|
|
69
|
-
},
|
|
70
|
-
icon: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: ""
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
emits: ["click"],
|
|
76
|
-
setup(props, { emit, slots }) {
|
|
77
|
-
const { type, size, shape, disabled, loading, color, plain, block } = toRefs(props);
|
|
78
|
-
const handleClick = (event) => {
|
|
79
|
-
if (!loading.value && !disabled.value) {
|
|
80
|
-
emit("click", event);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const classes = computed(() => {
|
|
84
|
-
const prefixCls = componentName$1;
|
|
85
|
-
return {
|
|
86
|
-
[prefixCls]: true,
|
|
87
|
-
[`${prefixCls}--${type.value}`]: type.value,
|
|
88
|
-
[`${prefixCls}--${size.value}`]: size.value,
|
|
89
|
-
[`${prefixCls}--${shape.value}`]: shape.value,
|
|
90
|
-
[`${prefixCls}--plain`]: plain.value,
|
|
91
|
-
[`${prefixCls}--block`]: block.value,
|
|
92
|
-
[`${prefixCls}--disabled`]: disabled.value,
|
|
93
|
-
[`${prefixCls}--loading`]: loading.value
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
const getStyle = computed(() => {
|
|
97
|
-
var _a;
|
|
98
|
-
const style = {};
|
|
99
|
-
if (color == null ? void 0 : color.value) {
|
|
100
|
-
if (plain.value) {
|
|
101
|
-
style.color = color.value;
|
|
102
|
-
style.background = "#fff";
|
|
103
|
-
if (!((_a = color.value) == null ? void 0 : _a.includes("gradient"))) {
|
|
104
|
-
style.borderColor = color.value;
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
style.color = "#fff";
|
|
108
|
-
style.background = color.value;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return style;
|
|
112
|
-
});
|
|
113
|
-
return {
|
|
114
|
-
handleClick,
|
|
115
|
-
classes,
|
|
116
|
-
getStyle
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
const _hoisted_1$1 = { class: "nut-button__warp" };
|
|
121
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
122
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
123
|
-
return openBlock(), createElementBlock("view", {
|
|
124
|
-
class: normalizeClass(_ctx.classes),
|
|
125
|
-
style: normalizeStyle(_ctx.getStyle),
|
|
126
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
127
|
-
}, [
|
|
128
|
-
createElementVNode("view", _hoisted_1$1, [
|
|
129
|
-
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
130
|
-
key: 0,
|
|
131
|
-
class: "nut-icon-loading"
|
|
132
|
-
})) : createCommentVNode("", true),
|
|
133
|
-
_ctx.icon && !_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
134
|
-
key: 1,
|
|
135
|
-
class: normalizeClass(_ctx.icon),
|
|
136
|
-
name: _ctx.icon
|
|
137
|
-
}, null, 8, ["class", "name"])) : createCommentVNode("", true),
|
|
138
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("view", {
|
|
139
|
-
key: 2,
|
|
140
|
-
class: normalizeClass({ text: _ctx.icon || _ctx.loading })
|
|
141
|
-
}, [
|
|
142
|
-
renderSlot(_ctx.$slots, "default")
|
|
143
|
-
], 2)) : createCommentVNode("", true)
|
|
144
|
-
])
|
|
145
|
-
], 6);
|
|
146
|
-
}
|
|
147
|
-
_sfc_main$1.render = _sfc_render$1;
|
|
148
33
|
const { componentName, create } = createComponent("popover");
|
|
149
|
-
|
|
34
|
+
const _sfc_main = create({
|
|
150
35
|
inheritAttrs: false,
|
|
151
36
|
components: {
|
|
152
|
-
[
|
|
153
|
-
[
|
|
37
|
+
[Popup.name]: Popup,
|
|
38
|
+
[Button.name]: Button
|
|
154
39
|
},
|
|
155
40
|
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
156
41
|
list: {
|
|
@@ -196,15 +81,15 @@ var _sfc_main = create({
|
|
|
196
81
|
[`${prefixCls}--${location.value}`]: location.value
|
|
197
82
|
};
|
|
198
83
|
});
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
state.
|
|
202
|
-
|
|
203
|
-
};
|
|
84
|
+
function getReference() {
|
|
85
|
+
state.elWidth = reference.value.offsetWidth;
|
|
86
|
+
state.elHeight = reference.value.offsetHeight;
|
|
87
|
+
}
|
|
204
88
|
const getStyle = computed(() => {
|
|
205
89
|
const style = {};
|
|
206
90
|
if (location.value == "top") {
|
|
207
|
-
style.bottom = state.elHeight +
|
|
91
|
+
style.bottom = state.elHeight + 20 + "px";
|
|
92
|
+
style.left = 0 + "px";
|
|
208
93
|
} else if (location.value == "right") {
|
|
209
94
|
style.top = 0 + "px";
|
|
210
95
|
style.right = -state.elWidth + "px";
|
|
@@ -212,7 +97,8 @@ var _sfc_main = create({
|
|
|
212
97
|
style.top = 0 + "px";
|
|
213
98
|
style.left = -state.elWidth + "px";
|
|
214
99
|
} else {
|
|
215
|
-
style.top = state.elHeight +
|
|
100
|
+
style.top = state.elHeight + 20 + "px";
|
|
101
|
+
style.left = 0 + "px";
|
|
216
102
|
}
|
|
217
103
|
return style;
|
|
218
104
|
});
|
|
@@ -234,9 +120,7 @@ var _sfc_main = create({
|
|
|
234
120
|
return style;
|
|
235
121
|
});
|
|
236
122
|
onMounted(() => {
|
|
237
|
-
|
|
238
|
-
getReference();
|
|
239
|
-
}, 200);
|
|
123
|
+
getReference();
|
|
240
124
|
});
|
|
241
125
|
watch(() => props.visible, (value) => {
|
|
242
126
|
showPopup.value = value;
|
|
@@ -245,24 +129,17 @@ var _sfc_main = create({
|
|
|
245
129
|
emit("update", val);
|
|
246
130
|
emit("update:visible", val);
|
|
247
131
|
};
|
|
248
|
-
const openPopover = (
|
|
249
|
-
event.stopPropagation();
|
|
250
|
-
event.preventDefault();
|
|
132
|
+
const openPopover = () => {
|
|
251
133
|
update(!props.visible);
|
|
252
134
|
emit("open");
|
|
253
135
|
};
|
|
254
|
-
const closePopover = (
|
|
255
|
-
event.stopPropagation();
|
|
256
|
-
event.preventDefault();
|
|
136
|
+
const closePopover = () => {
|
|
257
137
|
emit("close");
|
|
258
138
|
emit("update:visible", false);
|
|
259
139
|
};
|
|
260
|
-
const chooseItem = (
|
|
261
|
-
|
|
262
|
-
event.preventDefault();
|
|
263
|
-
emit("choose");
|
|
140
|
+
const chooseItem = (item, index2) => {
|
|
141
|
+
emit("choose", item, index2);
|
|
264
142
|
};
|
|
265
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
266
143
|
return {
|
|
267
144
|
classes,
|
|
268
145
|
showPopup,
|
|
@@ -274,30 +151,26 @@ var _sfc_main = create({
|
|
|
274
151
|
getReference,
|
|
275
152
|
reference,
|
|
276
153
|
getStyle,
|
|
277
|
-
getArrowStyle
|
|
278
|
-
refRandomId
|
|
154
|
+
getArrowStyle
|
|
279
155
|
};
|
|
280
156
|
}
|
|
281
157
|
});
|
|
282
|
-
const _hoisted_1 =
|
|
158
|
+
const _hoisted_1 = { ref: "reference" };
|
|
283
159
|
const _hoisted_2 = ["onClick"];
|
|
284
160
|
const _hoisted_3 = { class: "title-name" };
|
|
285
161
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
286
162
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
287
163
|
return openBlock(), createElementBlock("view", {
|
|
288
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
|
|
164
|
+
onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.openPopover && _ctx.openPopover(...args), ["stop"])),
|
|
289
165
|
class: normalizeClass(_ctx.classes)
|
|
290
166
|
}, [
|
|
291
|
-
createElementVNode("div",
|
|
292
|
-
ref: "reference",
|
|
293
|
-
id: "reference-" + _ctx.refRandomId
|
|
294
|
-
}, [
|
|
167
|
+
createElementVNode("div", _hoisted_1, [
|
|
295
168
|
renderSlot(_ctx.$slots, "reference")
|
|
296
|
-
],
|
|
169
|
+
], 512),
|
|
297
170
|
_ctx.showPopup ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
298
171
|
createElementVNode("view", {
|
|
299
172
|
class: "more-background",
|
|
300
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closePopover && _ctx.closePopover(...args))
|
|
173
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.closePopover && _ctx.closePopover(...args), ["stop"]))
|
|
301
174
|
}),
|
|
302
175
|
createElementVNode("view", {
|
|
303
176
|
class: normalizeClass(_ctx.popoverContent),
|
|
@@ -308,11 +181,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
308
181
|
style: normalizeStyle(_ctx.getArrowStyle)
|
|
309
182
|
}, null, 6),
|
|
310
183
|
renderSlot(_ctx.$slots, "content"),
|
|
311
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
|
|
184
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
312
185
|
return openBlock(), createElementBlock("view", {
|
|
313
|
-
key:
|
|
186
|
+
key: index2,
|
|
314
187
|
class: normalizeClass({ "title-item": true, disabled: item.disabled }),
|
|
315
|
-
onClick: ($event) => _ctx.chooseItem(
|
|
188
|
+
onClick: withModifiers(($event) => _ctx.chooseItem(item, index2), ["stop"])
|
|
316
189
|
}, [
|
|
317
190
|
item.icon ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
318
191
|
createVNode(_component_nut_icon, {
|
|
@@ -327,5 +200,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
327
200
|
], 64)) : createCommentVNode("", true)
|
|
328
201
|
], 2);
|
|
329
202
|
}
|
|
330
|
-
_sfc_main
|
|
331
|
-
export {
|
|
203
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
204
|
+
export { index as default };
|
|
@@ -17,20 +17,34 @@ 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 {
|
|
29
|
-
import {
|
|
30
|
-
import _sfc_main$1
|
|
31
|
-
import { _ as _sfc_main$2 } from "./index.taro.vue_vue&type=script&lang.js";
|
|
25
|
+
import { reactive, computed, onMounted, onBeforeUnmount, onBeforeMount, onActivated, onDeactivated, watch, toRefs, resolveComponent, openBlock, createBlock, Teleport, normalizeClass, normalizeStyle, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, renderSlot, createElementBlock, vShow } from "vue";
|
|
26
|
+
import overlay, { overlayProps } from "./OverLay.js";
|
|
27
|
+
import _sfc_main$1 from "./Icon.js";
|
|
32
28
|
import { c as createComponent } from "./component.js";
|
|
29
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
33
30
|
import "./pxCheck.js";
|
|
31
|
+
let count = 0;
|
|
32
|
+
const CLSNAME = "nut-overflow-hidden";
|
|
33
|
+
const useLockScroll = (isLock) => {
|
|
34
|
+
const lock = () => {
|
|
35
|
+
if (isLock()) {
|
|
36
|
+
!count && document.body.classList.add(CLSNAME);
|
|
37
|
+
count++;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const unlock = () => {
|
|
41
|
+
if (isLock() && count) {
|
|
42
|
+
count--;
|
|
43
|
+
!count && document.body.classList.remove(CLSNAME);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return [lock, unlock];
|
|
47
|
+
};
|
|
34
48
|
const { componentName, create } = createComponent("popup");
|
|
35
49
|
let _zIndex = 2e3;
|
|
36
50
|
const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
@@ -73,18 +87,20 @@ const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
|
73
87
|
round: {
|
|
74
88
|
type: Boolean,
|
|
75
89
|
default: false
|
|
90
|
+
},
|
|
91
|
+
isWrapTeleport: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: true
|
|
76
94
|
}
|
|
77
95
|
});
|
|
78
|
-
|
|
79
|
-
children: [_sfc_main$1],
|
|
96
|
+
const _sfc_main = create({
|
|
80
97
|
components: {
|
|
81
|
-
[
|
|
82
|
-
[_sfc_main$
|
|
98
|
+
[overlay.name]: overlay,
|
|
99
|
+
[_sfc_main$1.name]: _sfc_main$1
|
|
83
100
|
},
|
|
84
101
|
props: __spreadValues({}, popupProps),
|
|
85
102
|
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
86
103
|
setup(props, { emit }) {
|
|
87
|
-
getCurrentInstance();
|
|
88
104
|
const state = reactive({
|
|
89
105
|
zIndex: props.zIndex ? props.zIndex : _zIndex,
|
|
90
106
|
showSlot: true,
|
|
@@ -198,10 +214,14 @@ var _sfc_main = create({
|
|
|
198
214
|
});
|
|
199
215
|
}
|
|
200
216
|
});
|
|
217
|
+
const _hoisted_1 = { key: 1 };
|
|
201
218
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
202
219
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
203
220
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
204
|
-
return openBlock(),
|
|
221
|
+
return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
|
|
222
|
+
key: 0,
|
|
223
|
+
to: _ctx.teleport
|
|
224
|
+
}, [
|
|
205
225
|
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
206
226
|
key: 0,
|
|
207
227
|
visible: _ctx.visible,
|
|
@@ -241,7 +261,47 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
241
261
|
]),
|
|
242
262
|
_: 3
|
|
243
263
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
244
|
-
])
|
|
264
|
+
], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
265
|
+
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
266
|
+
key: 0,
|
|
267
|
+
visible: _ctx.visible,
|
|
268
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
269
|
+
class: normalizeClass(_ctx.overlayClass),
|
|
270
|
+
style: normalizeStyle(_ctx.overlayStyle),
|
|
271
|
+
"z-index": _ctx.zIndex,
|
|
272
|
+
"lock-scroll": _ctx.lockScroll,
|
|
273
|
+
duration: _ctx.duration,
|
|
274
|
+
onClick: _ctx.onClickOverlay
|
|
275
|
+
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
276
|
+
createVNode(Transition, {
|
|
277
|
+
name: _ctx.transitionName,
|
|
278
|
+
onAfterEnter: _ctx.onOpened,
|
|
279
|
+
onAfterLeave: _ctx.onClosed
|
|
280
|
+
}, {
|
|
281
|
+
default: withCtx(() => [
|
|
282
|
+
withDirectives(createElementVNode("view", {
|
|
283
|
+
class: normalizeClass(_ctx.classes),
|
|
284
|
+
style: normalizeStyle(_ctx.popStyle),
|
|
285
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
286
|
+
}, [
|
|
287
|
+
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
288
|
+
_ctx.closeable ? (openBlock(), createElementBlock("view", {
|
|
289
|
+
key: 1,
|
|
290
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
291
|
+
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
292
|
+
}, [
|
|
293
|
+
createVNode(_component_nut_icon, {
|
|
294
|
+
name: _ctx.closeIcon,
|
|
295
|
+
size: "12px"
|
|
296
|
+
}, null, 8, ["name"])
|
|
297
|
+
], 2)) : createCommentVNode("", true)
|
|
298
|
+
], 6), [
|
|
299
|
+
[vShow, _ctx.visible]
|
|
300
|
+
])
|
|
301
|
+
]),
|
|
302
|
+
_: 3
|
|
303
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
304
|
+
]));
|
|
245
305
|
}
|
|
246
|
-
_sfc_main
|
|
247
|
-
export {
|
|
306
|
+
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
307
|
+
export { Popup as default, popupProps };
|
|
@@ -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 { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } 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("price");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
price: {
|
|
12
13
|
type: [Number, String],
|
|
@@ -43,17 +44,8 @@ var _sfc_main = create({
|
|
|
43
44
|
[componentName]: true
|
|
44
45
|
};
|
|
45
46
|
});
|
|
46
|
-
const replaceSpecialChar = (url) => {
|
|
47
|
-
url = url.replace(/"/g, '"');
|
|
48
|
-
url = url.replace(/&/g, "&");
|
|
49
|
-
url = url.replace(/</g, "<");
|
|
50
|
-
url = url.replace(/>/g, ">");
|
|
51
|
-
url = url.replace(/ /g, " ");
|
|
52
|
-
url = url.replace(/¥/g, "\uFFE5");
|
|
53
|
-
return url;
|
|
54
|
-
};
|
|
55
47
|
const showSymbol = computed(() => {
|
|
56
|
-
const symbol = props.needSymbol ?
|
|
48
|
+
const symbol = props.needSymbol ? props.symbol : "";
|
|
57
49
|
return symbol;
|
|
58
50
|
});
|
|
59
51
|
const checkPoint = (price) => {
|
|
@@ -94,8 +86,7 @@ var _sfc_main = create({
|
|
|
94
86
|
showSymbol,
|
|
95
87
|
checkPoint,
|
|
96
88
|
formatThousands,
|
|
97
|
-
formatDecimal
|
|
98
|
-
replaceSpecialChar
|
|
89
|
+
formatDecimal
|
|
99
90
|
};
|
|
100
91
|
}
|
|
101
92
|
});
|
|
@@ -108,7 +99,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
108
99
|
_ctx.needSymbol && _ctx.position == "before" ? (openBlock(), createElementBlock("view", {
|
|
109
100
|
key: 0,
|
|
110
101
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
111
|
-
decode: "true",
|
|
112
102
|
innerHTML: _ctx.showSymbol
|
|
113
103
|
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
114
104
|
createElementVNode("view", {
|
|
@@ -124,10 +114,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
124
114
|
_ctx.needSymbol && _ctx.position == "after" ? (openBlock(), createElementBlock("view", {
|
|
125
115
|
key: 2,
|
|
126
116
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
127
|
-
decode: "true",
|
|
128
117
|
innerHTML: _ctx.showSymbol
|
|
129
118
|
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
130
119
|
], 2);
|
|
131
120
|
}
|
|
132
|
-
_sfc_main
|
|
133
|
-
export {
|
|
121
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
122
|
+
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
6
|
import { ref, computed, watch, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createBlock } 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("progress");
|
|
10
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
12
12
|
percentage: {
|
|
13
13
|
type: [Number, String],
|
|
@@ -20,7 +20,7 @@ var _sfc_main = create({
|
|
|
20
20
|
},
|
|
21
21
|
status: {
|
|
22
22
|
type: String,
|
|
23
|
-
default: "
|
|
23
|
+
default: ""
|
|
24
24
|
},
|
|
25
25
|
strokeWidth: {
|
|
26
26
|
type: [Number, String],
|
|
@@ -66,24 +66,13 @@ var _sfc_main = create({
|
|
|
66
66
|
color: props.textColor || ""
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
|
-
const slideLeft = async (values) => {
|
|
70
|
-
if (Taro.getEnv() === "WEB") {
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 4 + "px";
|
|
73
|
-
}, 200);
|
|
74
|
-
} else {
|
|
75
|
-
setTimeout(() => {
|
|
76
|
-
const query = Taro.createSelectorQuery();
|
|
77
|
-
query.select(".nut-progress-outer").boundingClientRect((rec) => {
|
|
78
|
-
left.value = rec.width * Number(values) * 0.01 - 4 + "px";
|
|
79
|
-
}).exec();
|
|
80
|
-
}, 200);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
69
|
watch(() => props.percentage, (values) => {
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
console.log("progressOuter.value.offsetWidth", progressOuter.value.offsetWidth);
|
|
71
|
+
console.log("values", values);
|
|
72
|
+
left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 5 + "px";
|
|
73
|
+
});
|
|
86
74
|
onMounted(() => {
|
|
75
|
+
left.value = progressOuter.value.offsetWidth * Number(props.percentage) * 0.01 - 5 + "px";
|
|
87
76
|
});
|
|
88
77
|
return {
|
|
89
78
|
height,
|
|
@@ -126,7 +115,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
126
115
|
class: "nut-progress-text",
|
|
127
116
|
style: normalizeStyle({ lineHeight: _ctx.height })
|
|
128
117
|
}, [
|
|
129
|
-
_ctx.status == "
|
|
118
|
+
_ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
|
|
130
119
|
key: 0,
|
|
131
120
|
style: normalizeStyle(_ctx.textStyle)
|
|
132
121
|
}, toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
@@ -138,5 +127,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
138
127
|
], 4)) : createCommentVNode("", true)
|
|
139
128
|
]);
|
|
140
129
|
}
|
|
141
|
-
_sfc_main
|
|
142
|
-
export {
|
|
130
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
131
|
+
export { index as default };
|
|
@@ -1,14 +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 { inject, computed, h } from "vue";
|
|
7
|
-
import { _ as _sfc_main$1 } from "./index.taro.vue_vue&type=script&lang.js";
|
|
8
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import _sfc_main$1 from "./Icon.js";
|
|
9
9
|
import "./pxCheck.js";
|
|
10
10
|
const { componentName, create } = createComponent("radio");
|
|
11
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
12
12
|
props: {
|
|
13
13
|
disabled: {
|
|
14
14
|
type: Boolean,
|
|
@@ -1,12 +1,12 @@
|
|
|
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, readonly, computed, watch, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
const { componentName, create } = createComponent("radiogroup");
|
|
9
|
-
|
|
9
|
+
const _sfc_main = create({
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: {
|
|
12
12
|
type: [Number, String, Boolean],
|