@nutui/nutui 3.1.16 → 3.1.17-beta.0
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.d.ts +3 -1
- package/dist/nutui.es.js +1757 -687
- package/dist/nutui.umd.js +1763 -688
- package/dist/packages/_es/ActionSheet.js +2 -2
- package/dist/packages/_es/Address.js +60 -7
- package/dist/packages/_es/Audio.js +289 -0
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +13 -4
- package/dist/packages/_es/Calendar.js +428 -209
- package/dist/packages/_es/Card.js +1 -2
- package/dist/packages/_es/Cascader.js +2 -2
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +2 -2
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -2
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +10 -5
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +1 -3
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +7 -2
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -4
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -2
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +24 -11
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +3 -3
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +5 -2
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +8 -6
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +143 -0
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +2 -2
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +3 -8
- package/dist/packages/_es/Switch.js +2 -2
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +2 -2
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +1 -1
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +1 -55
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +28 -56
- package/dist/packages/_es/index3.js +56 -28
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- 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/address/index.scss +8 -0
- package/dist/packages/audio/index.scss +66 -0
- package/dist/packages/audiooperate/index.scss +13 -0
- package/dist/packages/calendar/index.scss +47 -41
- package/dist/packages/calendaritem/index.scss +57 -42
- package/dist/packages/elevator/index.scss +3 -0
- package/dist/packages/infiniteloading/index.scss +1 -1
- package/dist/packages/input/index.scss +4 -2
- package/dist/packages/range/index.scss +4 -4
- package/dist/packages/row/index.scss +3 -0
- package/dist/packages/sticky/index.scss +5 -0
- package/dist/packages/tabbar/index.scss +4 -2
- package/dist/style.css +1 -1
- package/dist/styles/font/config.json +6 -1
- package/dist/styles/font/demo_index.html +118 -3
- package/dist/styles/font/iconfont.css +23 -3
- package/dist/styles/font/iconfont.js +25 -24
- package/dist/styles/font/iconfont.json +35 -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 +43 -40
- package/dist/styles/variables.scss +34 -31
- package/package.json +12 -13
package/dist/nutui.es.js
CHANGED
|
@@ -35,11 +35,11 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
return value;
|
|
36
36
|
};
|
|
37
37
|
/*!
|
|
38
|
-
* @nutui/nutui v3.1.16
|
|
38
|
+
* @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:32 GMT+0800 (GMT+08:00)
|
|
39
39
|
* (c) 2021 @jdf2e.
|
|
40
40
|
* Released under the MIT License.
|
|
41
41
|
*/
|
|
42
|
-
import { defineComponent, toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createVNode, renderSlot, createCommentVNode, h, createElementVNode, createBlock, Fragment, toDisplayString, createTextVNode, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, Transition, withCtx, withDirectives, withModifiers, vShow, inject, provide, reactive, onBeforeMount, Teleport, ref, nextTick, getCurrentInstance, renderList, render, onUnmounted,
|
|
42
|
+
import { defineComponent, toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createVNode, renderSlot, createCommentVNode, h, createElementVNode, createBlock, Fragment, toDisplayString, createTextVNode, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, Transition, withCtx, withDirectives, withModifiers, vShow, inject, provide, reactive, onBeforeMount, Teleport, ref, nextTick, getCurrentInstance, renderList, render, unref, onUnmounted, useSlots, mergeProps, watchEffect, shallowReactive, markRaw, isVNode, createSlots, toRaw, readonly, vModelText } from "vue";
|
|
43
43
|
import { useRouter } from "vue-router";
|
|
44
44
|
function createComponent(name) {
|
|
45
45
|
const componentName2 = "nut-" + name;
|
|
@@ -67,8 +67,8 @@ var _export_sfc = (sfc, props) => {
|
|
|
67
67
|
}
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
|
-
const { componentName: componentName$
|
|
71
|
-
const _sfc_main$
|
|
70
|
+
const { componentName: componentName$18, create: create$1t } = createComponent("avatar");
|
|
71
|
+
const _sfc_main$1t = create$1t({
|
|
72
72
|
props: {
|
|
73
73
|
size: {
|
|
74
74
|
type: String,
|
|
@@ -92,7 +92,7 @@ const _sfc_main$1p = create$1p({
|
|
|
92
92
|
const { size, shape, bgColor, icon } = toRefs(props);
|
|
93
93
|
const sizeValue = ["large", "normal", "small"];
|
|
94
94
|
const classes = computed(() => {
|
|
95
|
-
const prefixCls = componentName$
|
|
95
|
+
const prefixCls = componentName$18;
|
|
96
96
|
return {
|
|
97
97
|
[prefixCls]: true,
|
|
98
98
|
["avatar-" + size.value]: true,
|
|
@@ -124,11 +124,11 @@ const _sfc_main$1p = create$1p({
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
const _hoisted_1
|
|
127
|
+
const _hoisted_1$12 = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "text"
|
|
130
130
|
};
|
|
131
|
-
function _sfc_render$
|
|
131
|
+
function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
132
132
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
133
133
|
return openBlock(), createElementBlock("view", {
|
|
134
134
|
style: normalizeStyle(_ctx.styles),
|
|
@@ -139,17 +139,17 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
139
139
|
class: "icon",
|
|
140
140
|
name: _ctx.iconStyles
|
|
141
141
|
}, null, 8, ["name"]),
|
|
142
|
-
_ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_1
|
|
142
|
+
_ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_1$12, [
|
|
143
143
|
renderSlot(_ctx.$slots, "default")
|
|
144
144
|
])) : createCommentVNode("", true)
|
|
145
145
|
], 6);
|
|
146
146
|
}
|
|
147
|
-
var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
147
|
+
var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1k]]);
|
|
148
148
|
const pxCheck = (value) => {
|
|
149
149
|
return isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
150
150
|
};
|
|
151
|
-
const { componentName: componentName$
|
|
152
|
-
const _sfc_main$
|
|
151
|
+
const { componentName: componentName$17, create: create$1s } = createComponent("icon");
|
|
152
|
+
const _sfc_main$1s = create$1s({
|
|
153
153
|
props: {
|
|
154
154
|
name: { type: String, default: "" },
|
|
155
155
|
size: { type: [String, Number], default: "" },
|
|
@@ -170,7 +170,7 @@ const _sfc_main$1o = create$1o({
|
|
|
170
170
|
var _a;
|
|
171
171
|
const _isImage = isImage();
|
|
172
172
|
return h(_isImage ? "img" : props.tag, {
|
|
173
|
-
class: _isImage ? `${componentName$
|
|
173
|
+
class: _isImage ? `${componentName$17}__img` : `${props.fontClassName} ${componentName$17} ${props.classPrefix}-${props.name}`,
|
|
174
174
|
style: {
|
|
175
175
|
color: props.color,
|
|
176
176
|
fontSize: pxCheck(props.size),
|
|
@@ -183,10 +183,10 @@ const _sfc_main$1o = create$1o({
|
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
|
-
const { componentName: componentName$
|
|
187
|
-
const _sfc_main$
|
|
186
|
+
const { componentName: componentName$16, create: create$1r } = createComponent("button");
|
|
187
|
+
const _sfc_main$1r = create$1r({
|
|
188
188
|
components: {
|
|
189
|
-
[_sfc_main$
|
|
189
|
+
[_sfc_main$1s.name]: _sfc_main$1s
|
|
190
190
|
},
|
|
191
191
|
props: {
|
|
192
192
|
color: String,
|
|
@@ -221,6 +221,14 @@ const _sfc_main$1n = create$1n({
|
|
|
221
221
|
icon: {
|
|
222
222
|
type: String,
|
|
223
223
|
default: ""
|
|
224
|
+
},
|
|
225
|
+
iconClassPrefix: {
|
|
226
|
+
type: String,
|
|
227
|
+
default: "nut-icon"
|
|
228
|
+
},
|
|
229
|
+
iconFontClassName: {
|
|
230
|
+
type: String,
|
|
231
|
+
default: "nutui-iconfont"
|
|
224
232
|
}
|
|
225
233
|
},
|
|
226
234
|
emits: ["click"],
|
|
@@ -232,7 +240,7 @@ const _sfc_main$1n = create$1n({
|
|
|
232
240
|
}
|
|
233
241
|
};
|
|
234
242
|
const classes = computed(() => {
|
|
235
|
-
const prefixCls = componentName$
|
|
243
|
+
const prefixCls = componentName$16;
|
|
236
244
|
return {
|
|
237
245
|
[prefixCls]: true,
|
|
238
246
|
[`${prefixCls}--${type.value}`]: type.value,
|
|
@@ -268,24 +276,25 @@ const _sfc_main$1n = create$1n({
|
|
|
268
276
|
};
|
|
269
277
|
}
|
|
270
278
|
});
|
|
271
|
-
const _hoisted_1$
|
|
272
|
-
function _sfc_render$
|
|
279
|
+
const _hoisted_1$11 = { class: "nut-button__warp" };
|
|
280
|
+
function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
273
281
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
274
282
|
return openBlock(), createElementBlock("view", {
|
|
275
283
|
class: normalizeClass(_ctx.classes),
|
|
276
284
|
style: normalizeStyle(_ctx.getStyle),
|
|
277
285
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
278
286
|
}, [
|
|
279
|
-
createElementVNode("view", _hoisted_1$
|
|
287
|
+
createElementVNode("view", _hoisted_1$11, [
|
|
280
288
|
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
281
289
|
key: 0,
|
|
282
290
|
class: "nut-icon-loading"
|
|
283
291
|
})) : createCommentVNode("", true),
|
|
284
292
|
_ctx.icon && !_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
285
293
|
key: 1,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
name: _ctx.icon,
|
|
295
|
+
"class-prefix": _ctx.iconClassPrefix,
|
|
296
|
+
"font-class-name": _ctx.iconFontClassName
|
|
297
|
+
}, null, 8, ["name", "class-prefix", "font-class-name"])) : createCommentVNode("", true),
|
|
289
298
|
_ctx.$slots.default ? (openBlock(), createElementBlock("view", {
|
|
290
299
|
key: 2,
|
|
291
300
|
class: normalizeClass({ text: _ctx.icon || _ctx.loading })
|
|
@@ -295,9 +304,9 @@ function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
295
304
|
])
|
|
296
305
|
], 6);
|
|
297
306
|
}
|
|
298
|
-
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
299
|
-
const { componentName: componentName$
|
|
300
|
-
const _sfc_main$
|
|
307
|
+
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1j]]);
|
|
308
|
+
const { componentName: componentName$15, create: create$1q } = createComponent("cell");
|
|
309
|
+
const _sfc_main$1q = create$1q({
|
|
301
310
|
props: {
|
|
302
311
|
title: { type: String, default: "" },
|
|
303
312
|
subTitle: { type: String, default: "" },
|
|
@@ -313,7 +322,7 @@ const _sfc_main$1m = create$1m({
|
|
|
313
322
|
emits: ["click"],
|
|
314
323
|
setup(props, { emit }) {
|
|
315
324
|
const classes = computed(() => {
|
|
316
|
-
const prefixCls = componentName$
|
|
325
|
+
const prefixCls = componentName$15;
|
|
317
326
|
return {
|
|
318
327
|
[prefixCls]: true,
|
|
319
328
|
[`${prefixCls}--clickable`]: props.isLink || props.to
|
|
@@ -340,9 +349,9 @@ const _sfc_main$1m = create$1m({
|
|
|
340
349
|
};
|
|
341
350
|
}
|
|
342
351
|
});
|
|
343
|
-
const _hoisted_1$
|
|
344
|
-
const _hoisted_2$
|
|
345
|
-
function _sfc_render$
|
|
352
|
+
const _hoisted_1$10 = { class: "title" };
|
|
353
|
+
const _hoisted_2$Q = { class: "nut-cell__title-desc" };
|
|
354
|
+
function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
346
355
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
347
356
|
return openBlock(), createElementBlock("view", {
|
|
348
357
|
class: normalizeClass(_ctx.classes),
|
|
@@ -360,8 +369,8 @@ function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
360
369
|
name: _ctx.icon
|
|
361
370
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
362
371
|
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
363
|
-
createElementVNode("view", _hoisted_1$
|
|
364
|
-
createElementVNode("view", _hoisted_2$
|
|
372
|
+
createElementVNode("view", _hoisted_1$10, toDisplayString(_ctx.title), 1),
|
|
373
|
+
createElementVNode("view", _hoisted_2$Q, toDisplayString(_ctx.subTitle), 1)
|
|
365
374
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
366
375
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
367
376
|
], 64))
|
|
@@ -379,16 +388,16 @@ function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
379
388
|
])
|
|
380
389
|
], 6);
|
|
381
390
|
}
|
|
382
|
-
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
383
|
-
const { componentName: componentName$
|
|
384
|
-
const _sfc_main$
|
|
391
|
+
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1i]]);
|
|
392
|
+
const { componentName: componentName$14, create: create$1p } = createComponent("cell-group");
|
|
393
|
+
const _sfc_main$1p = create$1p({
|
|
385
394
|
props: {
|
|
386
395
|
title: { type: String, default: "" },
|
|
387
396
|
desc: { type: String, default: "" }
|
|
388
397
|
},
|
|
389
398
|
setup() {
|
|
390
399
|
const classes = computed(() => {
|
|
391
|
-
const prefixCls = componentName$
|
|
400
|
+
const prefixCls = componentName$14;
|
|
392
401
|
return {
|
|
393
402
|
[prefixCls]: true
|
|
394
403
|
};
|
|
@@ -398,29 +407,29 @@ const _sfc_main$1l = create$1l({
|
|
|
398
407
|
};
|
|
399
408
|
}
|
|
400
409
|
});
|
|
401
|
-
const _hoisted_1
|
|
410
|
+
const _hoisted_1$$ = {
|
|
402
411
|
key: 1,
|
|
403
412
|
class: "nut-cell-group__title"
|
|
404
413
|
};
|
|
405
|
-
const _hoisted_2$
|
|
414
|
+
const _hoisted_2$P = {
|
|
406
415
|
key: 3,
|
|
407
416
|
class: "nut-cell-group__desc"
|
|
408
417
|
};
|
|
409
|
-
const _hoisted_3$
|
|
410
|
-
function _sfc_render$
|
|
418
|
+
const _hoisted_3$D = { class: "nut-cell-group__warp" };
|
|
419
|
+
function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
411
420
|
return openBlock(), createElementBlock("view", {
|
|
412
421
|
class: normalizeClass(_ctx.classes)
|
|
413
422
|
}, [
|
|
414
|
-
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1
|
|
415
|
-
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2$
|
|
416
|
-
createElementVNode("view", _hoisted_3$
|
|
423
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1$$, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
424
|
+
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2$P, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
425
|
+
createElementVNode("view", _hoisted_3$D, [
|
|
417
426
|
renderSlot(_ctx.$slots, "default")
|
|
418
427
|
])
|
|
419
428
|
], 2);
|
|
420
429
|
}
|
|
421
|
-
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
422
|
-
const { componentName: componentName
|
|
423
|
-
const _sfc_main$
|
|
430
|
+
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1h]]);
|
|
431
|
+
const { componentName: componentName$13, create: create$1o } = createComponent("price");
|
|
432
|
+
const _sfc_main$1o = create$1o({
|
|
424
433
|
props: {
|
|
425
434
|
price: {
|
|
426
435
|
type: [Number, String],
|
|
@@ -454,7 +463,7 @@ const _sfc_main$1k = create$1k({
|
|
|
454
463
|
setup(props) {
|
|
455
464
|
const classes = computed(() => {
|
|
456
465
|
return {
|
|
457
|
-
[componentName
|
|
466
|
+
[componentName$13]: true
|
|
458
467
|
};
|
|
459
468
|
});
|
|
460
469
|
const showSymbol = computed(() => {
|
|
@@ -503,9 +512,9 @@ const _sfc_main$1k = create$1k({
|
|
|
503
512
|
};
|
|
504
513
|
}
|
|
505
514
|
});
|
|
506
|
-
const _hoisted_1$
|
|
507
|
-
const _hoisted_2$
|
|
508
|
-
function _sfc_render$
|
|
515
|
+
const _hoisted_1$_ = ["innerHTML"];
|
|
516
|
+
const _hoisted_2$O = ["innerHTML"];
|
|
517
|
+
function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
509
518
|
return openBlock(), createElementBlock("view", {
|
|
510
519
|
class: normalizeClass(_ctx.classes)
|
|
511
520
|
}, [
|
|
@@ -513,7 +522,7 @@ function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
513
522
|
key: 0,
|
|
514
523
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
515
524
|
innerHTML: _ctx.showSymbol
|
|
516
|
-
}, null, 10, _hoisted_1$
|
|
525
|
+
}, null, 10, _hoisted_1$_)) : createCommentVNode("", true),
|
|
517
526
|
createElementVNode("view", {
|
|
518
527
|
class: normalizeClass(`nut-price--${_ctx.size}`)
|
|
519
528
|
}, toDisplayString(_ctx.formatThousands(_ctx.price)), 3),
|
|
@@ -528,11 +537,11 @@ function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
528
537
|
key: 2,
|
|
529
538
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
530
539
|
innerHTML: _ctx.showSymbol
|
|
531
|
-
}, null, 10, _hoisted_2$
|
|
540
|
+
}, null, 10, _hoisted_2$O)) : createCommentVNode("", true)
|
|
532
541
|
], 2);
|
|
533
542
|
}
|
|
534
|
-
var Price = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
535
|
-
const { componentName: componentName$
|
|
543
|
+
var Price = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1g]]);
|
|
544
|
+
const { componentName: componentName$12, create: create$1n } = createComponent("overlay");
|
|
536
545
|
const overlayProps = {
|
|
537
546
|
visible: {
|
|
538
547
|
type: Boolean,
|
|
@@ -562,12 +571,12 @@ const overlayProps = {
|
|
|
562
571
|
default: true
|
|
563
572
|
}
|
|
564
573
|
};
|
|
565
|
-
const _sfc_main$
|
|
574
|
+
const _sfc_main$1n = create$1n({
|
|
566
575
|
props: overlayProps,
|
|
567
576
|
emits: ["click", "update:visible"],
|
|
568
577
|
setup(props, { emit }) {
|
|
569
578
|
const classes = computed(() => {
|
|
570
|
-
const prefixCls = componentName$
|
|
579
|
+
const prefixCls = componentName$12;
|
|
571
580
|
return {
|
|
572
581
|
[prefixCls]: true,
|
|
573
582
|
[props.overlayClass]: true
|
|
@@ -607,7 +616,7 @@ const _sfc_main$1j = create$1j({
|
|
|
607
616
|
return { classes, style, touchmove, onClick };
|
|
608
617
|
}
|
|
609
618
|
});
|
|
610
|
-
function _sfc_render$
|
|
619
|
+
function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
611
620
|
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
612
621
|
default: withCtx(() => [
|
|
613
622
|
withDirectives(createElementVNode("view", {
|
|
@@ -624,9 +633,9 @@ function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
624
633
|
_: 3
|
|
625
634
|
});
|
|
626
635
|
}
|
|
627
|
-
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
628
|
-
const { componentName: componentName$
|
|
629
|
-
const _sfc_main$
|
|
636
|
+
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1f]]);
|
|
637
|
+
const { componentName: componentName$11, create: create$1m } = createComponent("divider");
|
|
638
|
+
const _sfc_main$1m = create$1m({
|
|
630
639
|
props: {
|
|
631
640
|
contentPosition: {
|
|
632
641
|
type: String,
|
|
@@ -644,7 +653,7 @@ const _sfc_main$1i = create$1i({
|
|
|
644
653
|
components: {},
|
|
645
654
|
setup(props, context) {
|
|
646
655
|
const classes = computed(() => {
|
|
647
|
-
const prefixCls = componentName$
|
|
656
|
+
const prefixCls = componentName$11;
|
|
648
657
|
return {
|
|
649
658
|
[prefixCls]: true,
|
|
650
659
|
[`${prefixCls}-center`]: context.slots.default,
|
|
@@ -657,18 +666,18 @@ const _sfc_main$1i = create$1i({
|
|
|
657
666
|
return { classes };
|
|
658
667
|
}
|
|
659
668
|
});
|
|
660
|
-
function _sfc_render$
|
|
669
|
+
function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
661
670
|
return openBlock(), createElementBlock("div", {
|
|
662
671
|
class: normalizeClass(_ctx.classes)
|
|
663
672
|
}, [
|
|
664
673
|
renderSlot(_ctx.$slots, "default")
|
|
665
674
|
], 2);
|
|
666
675
|
}
|
|
667
|
-
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
668
|
-
const { create: create$
|
|
669
|
-
const _sfc_main$
|
|
670
|
-
const { componentName: componentName$
|
|
671
|
-
const _sfc_main$
|
|
676
|
+
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1e]]);
|
|
677
|
+
const { create: create$1l } = createComponent("layout");
|
|
678
|
+
const _sfc_main$1l = create$1l({});
|
|
679
|
+
const { componentName: componentName$10, create: create$1k } = createComponent("col");
|
|
680
|
+
const _sfc_main$1k = create$1k({
|
|
672
681
|
props: {
|
|
673
682
|
span: {
|
|
674
683
|
type: [String, Number],
|
|
@@ -680,7 +689,7 @@ const _sfc_main$1g = create$1g({
|
|
|
680
689
|
}
|
|
681
690
|
},
|
|
682
691
|
setup(props) {
|
|
683
|
-
const prefixCls = componentName$
|
|
692
|
+
const prefixCls = componentName$10;
|
|
684
693
|
const gutter = inject("gutter");
|
|
685
694
|
const classes = computed(() => {
|
|
686
695
|
return {
|
|
@@ -702,7 +711,7 @@ const _sfc_main$1g = create$1g({
|
|
|
702
711
|
};
|
|
703
712
|
}
|
|
704
713
|
});
|
|
705
|
-
function _sfc_render$
|
|
714
|
+
function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
706
715
|
return openBlock(), createElementBlock("view", {
|
|
707
716
|
class: normalizeClass(_ctx.classes),
|
|
708
717
|
style: normalizeStyle(_ctx.style)
|
|
@@ -710,9 +719,9 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
710
719
|
renderSlot(_ctx.$slots, "default")
|
|
711
720
|
], 6);
|
|
712
721
|
}
|
|
713
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
714
|
-
const { componentName: componentName
|
|
715
|
-
const _sfc_main$
|
|
722
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1d]]);
|
|
723
|
+
const { componentName: componentName$$, create: create$1j } = createComponent("row");
|
|
724
|
+
const _sfc_main$1j = create$1j({
|
|
716
725
|
props: {
|
|
717
726
|
type: {
|
|
718
727
|
type: String,
|
|
@@ -736,7 +745,7 @@ const _sfc_main$1f = create$1f({
|
|
|
736
745
|
}
|
|
737
746
|
},
|
|
738
747
|
setup(props) {
|
|
739
|
-
const prefixCls = componentName
|
|
748
|
+
const prefixCls = componentName$$;
|
|
740
749
|
provide("gutter", props.gutter);
|
|
741
750
|
const getClass = (prefix, type) => {
|
|
742
751
|
return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
|
|
@@ -755,14 +764,14 @@ const _sfc_main$1f = create$1f({
|
|
|
755
764
|
};
|
|
756
765
|
}
|
|
757
766
|
});
|
|
758
|
-
function _sfc_render$
|
|
767
|
+
function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
759
768
|
return openBlock(), createElementBlock("view", {
|
|
760
769
|
class: normalizeClass(_ctx.getClasses())
|
|
761
770
|
}, [
|
|
762
771
|
renderSlot(_ctx.$slots, "default")
|
|
763
772
|
], 2);
|
|
764
773
|
}
|
|
765
|
-
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
774
|
+
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1c]]);
|
|
766
775
|
let count = 0;
|
|
767
776
|
const CLSNAME = "nut-overflow-hidden";
|
|
768
777
|
const useLockScroll = (isLock) => {
|
|
@@ -780,7 +789,7 @@ const useLockScroll = (isLock) => {
|
|
|
780
789
|
};
|
|
781
790
|
return [lock, unlock];
|
|
782
791
|
};
|
|
783
|
-
const { componentName: componentName$
|
|
792
|
+
const { componentName: componentName$_, create: create$1i } = createComponent("popup");
|
|
784
793
|
let _zIndex = 2e3;
|
|
785
794
|
const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
786
795
|
position: {
|
|
@@ -828,10 +837,10 @@ const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
|
828
837
|
default: true
|
|
829
838
|
}
|
|
830
839
|
});
|
|
831
|
-
const _sfc_main$
|
|
840
|
+
const _sfc_main$1i = create$1i({
|
|
832
841
|
components: {
|
|
833
842
|
[OverLay.name]: OverLay,
|
|
834
|
-
[_sfc_main$
|
|
843
|
+
[_sfc_main$1s.name]: _sfc_main$1s
|
|
835
844
|
},
|
|
836
845
|
props: __spreadValues({}, popupProps),
|
|
837
846
|
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
@@ -846,7 +855,7 @@ const _sfc_main$1e = create$1e({
|
|
|
846
855
|
});
|
|
847
856
|
const [lockScroll, unlockScroll] = useLockScroll(() => props.lockScroll);
|
|
848
857
|
const classes = computed(() => {
|
|
849
|
-
const prefixCls = componentName$
|
|
858
|
+
const prefixCls = componentName$_;
|
|
850
859
|
return {
|
|
851
860
|
[prefixCls]: true,
|
|
852
861
|
["round"]: props.round,
|
|
@@ -953,8 +962,8 @@ const _sfc_main$1e = create$1e({
|
|
|
953
962
|
});
|
|
954
963
|
}
|
|
955
964
|
});
|
|
956
|
-
const _hoisted_1$
|
|
957
|
-
function _sfc_render$
|
|
965
|
+
const _hoisted_1$Z = { key: 1 };
|
|
966
|
+
function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
958
967
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
959
968
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
960
969
|
return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
|
|
@@ -1000,7 +1009,7 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1000
1009
|
]),
|
|
1001
1010
|
_: 3
|
|
1002
1011
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
1003
|
-
], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1$
|
|
1012
|
+
], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1$Z, [
|
|
1004
1013
|
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
1005
1014
|
key: 0,
|
|
1006
1015
|
visible: _ctx.visible,
|
|
@@ -1042,34 +1051,9 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1042
1051
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
1043
1052
|
]));
|
|
1044
1053
|
}
|
|
1045
|
-
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
var previous = 0;
|
|
1049
|
-
} else if (type === 2) {
|
|
1050
|
-
var timeout;
|
|
1051
|
-
}
|
|
1052
|
-
return function() {
|
|
1053
|
-
let context = this;
|
|
1054
|
-
let args = arguments;
|
|
1055
|
-
if (type === 1) {
|
|
1056
|
-
let now = Date.now();
|
|
1057
|
-
if (now - previous > wait) {
|
|
1058
|
-
func.apply(context, args);
|
|
1059
|
-
previous = now;
|
|
1060
|
-
}
|
|
1061
|
-
} else if (type === 2) {
|
|
1062
|
-
if (!timeout) {
|
|
1063
|
-
timeout = setTimeout(() => {
|
|
1064
|
-
timeout = null;
|
|
1065
|
-
func.apply(context, args);
|
|
1066
|
-
}, wait);
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
};
|
|
1071
|
-
const { create: create$1d } = createComponent("video");
|
|
1072
|
-
const _sfc_main$1d = create$1d({
|
|
1054
|
+
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1b]]);
|
|
1055
|
+
const { create: create$1h } = createComponent("video");
|
|
1056
|
+
const _sfc_main$1h = create$1h({
|
|
1073
1057
|
props: {
|
|
1074
1058
|
source: {
|
|
1075
1059
|
type: Object,
|
|
@@ -1174,7 +1158,6 @@ const _sfc_main$1d = create$1d({
|
|
|
1174
1158
|
emit("pause", state.videoElm);
|
|
1175
1159
|
});
|
|
1176
1160
|
state.videoElm.addEventListener("ended", playEnded);
|
|
1177
|
-
state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
|
|
1178
1161
|
}
|
|
1179
1162
|
};
|
|
1180
1163
|
const customerInit = () => {
|
|
@@ -1198,7 +1181,6 @@ const _sfc_main$1d = create$1d({
|
|
|
1198
1181
|
state.videoElm.addEventListener("progress", () => {
|
|
1199
1182
|
getLoadTime();
|
|
1200
1183
|
});
|
|
1201
|
-
state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
|
|
1202
1184
|
state.videoElm.addEventListener("ended", playEnded);
|
|
1203
1185
|
emit("play", state.videoElm);
|
|
1204
1186
|
} catch (e) {
|
|
@@ -1210,37 +1192,10 @@ const _sfc_main$1d = create$1d({
|
|
|
1210
1192
|
}
|
|
1211
1193
|
}
|
|
1212
1194
|
};
|
|
1213
|
-
const timeFormat = (t) => {
|
|
1214
|
-
var h2 = Math.floor(t / 3600);
|
|
1215
|
-
if (h2 < 10) {
|
|
1216
|
-
h2 = "0" + h2;
|
|
1217
|
-
}
|
|
1218
|
-
var m = Math.floor(t % 3600 / 60);
|
|
1219
|
-
if (m < 10) {
|
|
1220
|
-
m = "0" + m;
|
|
1221
|
-
}
|
|
1222
|
-
var s = Math.round(t % 3600 % 60);
|
|
1223
|
-
if (s < 10) {
|
|
1224
|
-
s = "0" + s;
|
|
1225
|
-
}
|
|
1226
|
-
var str = "";
|
|
1227
|
-
if (h2 != 0) {
|
|
1228
|
-
str = h2 + ":" + m + ":" + s;
|
|
1229
|
-
} else {
|
|
1230
|
-
str = m + ":" + s;
|
|
1231
|
-
}
|
|
1232
|
-
return str;
|
|
1233
|
-
};
|
|
1234
1195
|
const getLoadTime = () => {
|
|
1235
1196
|
if (state.videoSet.loaded)
|
|
1236
1197
|
state.videoSet.loaded = state.videoElm.buffered.end(0) / state.videoElm.duration * 100;
|
|
1237
1198
|
};
|
|
1238
|
-
const getPlayTime = () => {
|
|
1239
|
-
const percent = state.videoElm.currentTime / state.videoElm.duration;
|
|
1240
|
-
state.videoSet.progress.current = Math.round(state.videoSet.progress.width * percent);
|
|
1241
|
-
state.videoSet.totalTime = timeFormat(state.videoElm.duration);
|
|
1242
|
-
state.videoSet.displayTime = timeFormat(state.videoElm.currentTime);
|
|
1243
|
-
};
|
|
1244
1199
|
const playEnded = () => {
|
|
1245
1200
|
state.state.playing = false;
|
|
1246
1201
|
state.state.isEnd = true;
|
|
@@ -1315,21 +1270,21 @@ const _sfc_main$1d = create$1d({
|
|
|
1315
1270
|
});
|
|
1316
1271
|
}
|
|
1317
1272
|
});
|
|
1318
|
-
const _hoisted_1$
|
|
1273
|
+
const _hoisted_1$Y = {
|
|
1319
1274
|
class: "nut-video",
|
|
1320
1275
|
ref: "videocon"
|
|
1321
1276
|
};
|
|
1322
|
-
const _hoisted_2$
|
|
1323
|
-
const _hoisted_3$
|
|
1324
|
-
const _hoisted_4$
|
|
1325
|
-
const _hoisted_5$
|
|
1326
|
-
const _hoisted_6$
|
|
1277
|
+
const _hoisted_2$N = ["muted", "autoplay", "loop", "poster", "controls", "preload"];
|
|
1278
|
+
const _hoisted_3$C = ["src", "type"];
|
|
1279
|
+
const _hoisted_4$t = { class: "current-time" };
|
|
1280
|
+
const _hoisted_5$k = { class: "progress-container" };
|
|
1281
|
+
const _hoisted_6$h = {
|
|
1327
1282
|
class: "progress",
|
|
1328
1283
|
ref: "progressBar"
|
|
1329
1284
|
};
|
|
1330
|
-
const _hoisted_7$
|
|
1331
|
-
const _hoisted_8$
|
|
1332
|
-
_hoisted_7$
|
|
1285
|
+
const _hoisted_7$c = /* @__PURE__ */ createElementVNode("div", { class: "move-handle" }, null, -1);
|
|
1286
|
+
const _hoisted_8$9 = [
|
|
1287
|
+
_hoisted_7$c
|
|
1333
1288
|
];
|
|
1334
1289
|
const _hoisted_9$6 = {
|
|
1335
1290
|
class: "played",
|
|
@@ -1338,8 +1293,8 @@ const _hoisted_9$6 = {
|
|
|
1338
1293
|
const _hoisted_10$4 = { class: "duration-time" };
|
|
1339
1294
|
const _hoisted_11$4 = { class: "nut-video-error" };
|
|
1340
1295
|
const _hoisted_12$4 = /* @__PURE__ */ createElementVNode("p", { class: "lose" }, "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25", -1);
|
|
1341
|
-
function _sfc_render$
|
|
1342
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1296
|
+
function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1297
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
1343
1298
|
createElementVNode("video", {
|
|
1344
1299
|
ref: "root",
|
|
1345
1300
|
class: "nut-video-player",
|
|
@@ -1354,8 +1309,8 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1354
1309
|
createElementVNode("source", {
|
|
1355
1310
|
src: _ctx.source.src,
|
|
1356
1311
|
type: _ctx.source.type
|
|
1357
|
-
}, null, 8, _hoisted_3$
|
|
1358
|
-
], 40, _hoisted_2$
|
|
1312
|
+
}, null, 8, _hoisted_3$C)
|
|
1313
|
+
], 40, _hoisted_2$N),
|
|
1359
1314
|
_ctx.showToolbox && !_ctx.isDisabled ? (openBlock(), createElementBlock("div", {
|
|
1360
1315
|
key: 0,
|
|
1361
1316
|
class: "playing-mask",
|
|
@@ -1377,9 +1332,9 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1377
1332
|
class: "control-play-btn",
|
|
1378
1333
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.play && _ctx.play(...args))
|
|
1379
1334
|
}),
|
|
1380
|
-
createElementVNode("div", _hoisted_4$
|
|
1381
|
-
createElementVNode("div", _hoisted_5$
|
|
1382
|
-
createElementVNode("div", _hoisted_6$
|
|
1335
|
+
createElementVNode("div", _hoisted_4$t, toDisplayString(_ctx.videoSet.displayTime), 1),
|
|
1336
|
+
createElementVNode("div", _hoisted_5$k, [
|
|
1337
|
+
createElementVNode("div", _hoisted_6$h, [
|
|
1383
1338
|
createElementVNode("div", {
|
|
1384
1339
|
class: "buffered",
|
|
1385
1340
|
style: normalizeStyle({ width: `${_ctx.videoSet.loaded}%` })
|
|
@@ -1392,7 +1347,7 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1392
1347
|
onTouchmove: _cache[4] || (_cache[4] = withModifiers(($event) => _ctx.touchSlidMove($event), ["stop", "prevent"])),
|
|
1393
1348
|
onTouchstart: _cache[5] || (_cache[5] = withModifiers(($event) => _ctx.touchSlidSrart($event), ["stop"])),
|
|
1394
1349
|
onTouchend: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.touchSlidEnd($event), ["stop"]))
|
|
1395
|
-
}, _hoisted_8$
|
|
1350
|
+
}, _hoisted_8$9, 36),
|
|
1396
1351
|
createElementVNode("div", _hoisted_9$6, null, 512)
|
|
1397
1352
|
], 512)
|
|
1398
1353
|
]),
|
|
@@ -1419,9 +1374,9 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1419
1374
|
])
|
|
1420
1375
|
], 512);
|
|
1421
1376
|
}
|
|
1422
|
-
var Video = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1377
|
+
var Video = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1a]]);
|
|
1423
1378
|
const DISTANCE = 5;
|
|
1424
|
-
function useTouch$
|
|
1379
|
+
function useTouch$2() {
|
|
1425
1380
|
const state = reactive({
|
|
1426
1381
|
startX: 0,
|
|
1427
1382
|
startY: 0,
|
|
@@ -1468,14 +1423,14 @@ function useTouch$1() {
|
|
|
1468
1423
|
move
|
|
1469
1424
|
};
|
|
1470
1425
|
}
|
|
1471
|
-
function useExpose
|
|
1426
|
+
function useExpose(apis) {
|
|
1472
1427
|
const instance = getCurrentInstance();
|
|
1473
1428
|
if (instance) {
|
|
1474
1429
|
Object.assign(instance.proxy, apis);
|
|
1475
1430
|
}
|
|
1476
1431
|
}
|
|
1477
|
-
const { create: create$
|
|
1478
|
-
const _sfc_main$
|
|
1432
|
+
const { create: create$1g, componentName: componentName$Z } = createComponent("swiper");
|
|
1433
|
+
const _sfc_main$1g = create$1g({
|
|
1479
1434
|
props: {
|
|
1480
1435
|
width: {
|
|
1481
1436
|
type: [Number, String],
|
|
@@ -1542,9 +1497,9 @@ const _sfc_main$1c = create$1c({
|
|
|
1542
1497
|
children: [],
|
|
1543
1498
|
style: {}
|
|
1544
1499
|
});
|
|
1545
|
-
const touch = useTouch$
|
|
1500
|
+
const touch = useTouch$2();
|
|
1546
1501
|
const classes = computed(() => {
|
|
1547
|
-
const prefixCls = componentName$
|
|
1502
|
+
const prefixCls = componentName$Z;
|
|
1548
1503
|
return {
|
|
1549
1504
|
[prefixCls]: true
|
|
1550
1505
|
};
|
|
@@ -1759,7 +1714,7 @@ const _sfc_main$1c = create$1c({
|
|
|
1759
1714
|
size,
|
|
1760
1715
|
relation
|
|
1761
1716
|
});
|
|
1762
|
-
useExpose
|
|
1717
|
+
useExpose({
|
|
1763
1718
|
prev,
|
|
1764
1719
|
next,
|
|
1765
1720
|
to
|
|
@@ -1797,7 +1752,7 @@ const _sfc_main$1c = create$1c({
|
|
|
1797
1752
|
state,
|
|
1798
1753
|
classes,
|
|
1799
1754
|
container,
|
|
1800
|
-
componentName: componentName$
|
|
1755
|
+
componentName: componentName$Z,
|
|
1801
1756
|
isVertical,
|
|
1802
1757
|
slots,
|
|
1803
1758
|
activePagination,
|
|
@@ -1807,7 +1762,7 @@ const _sfc_main$1c = create$1c({
|
|
|
1807
1762
|
};
|
|
1808
1763
|
}
|
|
1809
1764
|
});
|
|
1810
|
-
function _sfc_render$
|
|
1765
|
+
function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1811
1766
|
return openBlock(), createElementBlock("view", {
|
|
1812
1767
|
ref: "container",
|
|
1813
1768
|
class: normalizeClass(_ctx.classes),
|
|
@@ -1844,15 +1799,9 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1844
1799
|
], 2)) : createCommentVNode("", true)
|
|
1845
1800
|
], 34);
|
|
1846
1801
|
}
|
|
1847
|
-
var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
if (instance) {
|
|
1851
|
-
Object.assign(instance.proxy, apis);
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
const { create: create$1b, componentName: componentName$U } = createComponent("swiper-item");
|
|
1855
|
-
const _sfc_main$1b = create$1b({
|
|
1802
|
+
var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$19]]);
|
|
1803
|
+
const { create: create$1f, componentName: componentName$Y } = createComponent("swiper-item");
|
|
1804
|
+
const _sfc_main$1f = create$1f({
|
|
1856
1805
|
props: {},
|
|
1857
1806
|
setup(props, { slots }) {
|
|
1858
1807
|
const parent = inject("parent");
|
|
@@ -1861,7 +1810,7 @@ const _sfc_main$1b = create$1b({
|
|
|
1861
1810
|
offset: 0
|
|
1862
1811
|
});
|
|
1863
1812
|
const classes = computed(() => {
|
|
1864
|
-
const prefixCls = componentName$
|
|
1813
|
+
const prefixCls = componentName$Y;
|
|
1865
1814
|
return {
|
|
1866
1815
|
[prefixCls]: true
|
|
1867
1816
|
};
|
|
@@ -1887,7 +1836,7 @@ const _sfc_main$1b = create$1b({
|
|
|
1887
1836
|
};
|
|
1888
1837
|
}
|
|
1889
1838
|
});
|
|
1890
|
-
function _sfc_render$
|
|
1839
|
+
function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1891
1840
|
return openBlock(), createElementBlock("view", {
|
|
1892
1841
|
class: normalizeClass(_ctx.classes),
|
|
1893
1842
|
style: normalizeStyle(_ctx.style)
|
|
@@ -1895,9 +1844,9 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1895
1844
|
renderSlot(_ctx.$slots, "default")
|
|
1896
1845
|
], 6);
|
|
1897
1846
|
}
|
|
1898
|
-
var SwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1899
|
-
const { componentName: componentName$
|
|
1900
|
-
const _sfc_main$
|
|
1847
|
+
var SwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$18]]);
|
|
1848
|
+
const { componentName: componentName$X, create: create$1e } = createComponent("imagepreview");
|
|
1849
|
+
const _sfc_main$1e = create$1e({
|
|
1901
1850
|
props: {
|
|
1902
1851
|
show: {
|
|
1903
1852
|
type: Boolean,
|
|
@@ -1982,7 +1931,6 @@ const _sfc_main$1a = create$1a({
|
|
|
1982
1931
|
state.eleImg.style.transform = "scale(" + state.store.scale + ")";
|
|
1983
1932
|
};
|
|
1984
1933
|
const onTouchStart = (event) => {
|
|
1985
|
-
console.log("start");
|
|
1986
1934
|
const curTouchTime = new Date().getTime();
|
|
1987
1935
|
if (curTouchTime - state.lastTouchEndTime < 300) {
|
|
1988
1936
|
const store2 = state.store;
|
|
@@ -2034,7 +1982,6 @@ const _sfc_main$1a = create$1a({
|
|
|
2034
1982
|
}
|
|
2035
1983
|
};
|
|
2036
1984
|
const onTouchEnd = () => {
|
|
2037
|
-
console.log("end");
|
|
2038
1985
|
state.lastTouchEndTime = new Date().getTime();
|
|
2039
1986
|
const store = state.store;
|
|
2040
1987
|
store.moveable = false;
|
|
@@ -2070,9 +2017,9 @@ const _sfc_main$1a = create$1a({
|
|
|
2070
2017
|
});
|
|
2071
2018
|
}
|
|
2072
2019
|
});
|
|
2073
|
-
const _hoisted_1$
|
|
2074
|
-
const _hoisted_2$
|
|
2075
|
-
function _sfc_render$
|
|
2020
|
+
const _hoisted_1$X = ["src"];
|
|
2021
|
+
const _hoisted_2$M = { class: "nut-imagepreview-index" };
|
|
2022
|
+
function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2076
2023
|
const _component_nut_video = resolveComponent("nut-video");
|
|
2077
2024
|
const _component_nut_swiper_item = resolveComponent("nut-swiper-item");
|
|
2078
2025
|
const _component_nut_swiper = resolveComponent("nut-swiper");
|
|
@@ -2120,7 +2067,7 @@ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2120
2067
|
createElementVNode("img", {
|
|
2121
2068
|
src: item.src,
|
|
2122
2069
|
class: "nut-imagepreview-img"
|
|
2123
|
-
}, null, 8, _hoisted_1$
|
|
2070
|
+
}, null, 8, _hoisted_1$X)
|
|
2124
2071
|
]),
|
|
2125
2072
|
_: 2
|
|
2126
2073
|
}, 1024);
|
|
@@ -2129,12 +2076,12 @@ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2129
2076
|
_: 1
|
|
2130
2077
|
}, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : createCommentVNode("", true)
|
|
2131
2078
|
], 32),
|
|
2132
|
-
createElementVNode("view", _hoisted_2$
|
|
2079
|
+
createElementVNode("view", _hoisted_2$M, toDisplayString(_ctx.active) + " / " + toDisplayString(_ctx.images.length + _ctx.videos.length), 1)
|
|
2133
2080
|
]),
|
|
2134
2081
|
_: 1
|
|
2135
2082
|
}, 8, ["visible", "onClick"]);
|
|
2136
2083
|
}
|
|
2137
|
-
var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2084
|
+
var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$17]]);
|
|
2138
2085
|
class ImagePreviewOptions {
|
|
2139
2086
|
constructor() {
|
|
2140
2087
|
__publicField(this, "show", false);
|
|
@@ -2182,17 +2129,180 @@ _ImagePreview.install = (app) => {
|
|
|
2182
2129
|
app.use(ImagePreview);
|
|
2183
2130
|
app.config.globalProperties.$imagepreview = _ImagePreview;
|
|
2184
2131
|
};
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2132
|
+
function isWindow(val) {
|
|
2133
|
+
return val === window;
|
|
2134
|
+
}
|
|
2135
|
+
const useRect = (elementRef) => {
|
|
2136
|
+
const element = unref(elementRef);
|
|
2137
|
+
if (isWindow(element)) {
|
|
2138
|
+
const width = element.innerWidth;
|
|
2139
|
+
const height = element.innerHeight;
|
|
2140
|
+
return {
|
|
2141
|
+
top: 0,
|
|
2142
|
+
left: 0,
|
|
2143
|
+
right: width,
|
|
2144
|
+
bottom: height,
|
|
2145
|
+
width,
|
|
2146
|
+
height
|
|
2147
|
+
};
|
|
2148
|
+
}
|
|
2149
|
+
if (element && element.getBoundingClientRect) {
|
|
2150
|
+
return element.getBoundingClientRect();
|
|
2151
|
+
}
|
|
2152
|
+
return {
|
|
2153
|
+
top: 0,
|
|
2154
|
+
left: 0,
|
|
2155
|
+
right: 0,
|
|
2156
|
+
bottom: 0,
|
|
2157
|
+
width: 0,
|
|
2158
|
+
height: 0
|
|
2159
|
+
};
|
|
2160
|
+
};
|
|
2161
|
+
const { componentName: componentName$W, create: create$1d } = createComponent("sticky");
|
|
2162
|
+
const _sfc_main$1d = create$1d({
|
|
2163
|
+
props: {
|
|
2164
|
+
position: {
|
|
2165
|
+
type: String,
|
|
2166
|
+
default: "top"
|
|
2167
|
+
},
|
|
2168
|
+
top: {
|
|
2169
|
+
type: [Number, String],
|
|
2170
|
+
default: 0
|
|
2171
|
+
},
|
|
2172
|
+
bottom: {
|
|
2173
|
+
type: [Number, String],
|
|
2174
|
+
default: 0
|
|
2175
|
+
},
|
|
2176
|
+
container: {
|
|
2177
|
+
type: Object
|
|
2178
|
+
},
|
|
2179
|
+
zIndex: {
|
|
2180
|
+
type: [Number, String],
|
|
2181
|
+
default: 2e3
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
emits: ["change", "scroll"],
|
|
2185
|
+
setup(props, { emit, slots }) {
|
|
2186
|
+
const root = ref();
|
|
2187
|
+
const state = reactive({
|
|
2188
|
+
width: 0,
|
|
2189
|
+
height: 0,
|
|
2190
|
+
fixed: false,
|
|
2191
|
+
transform: 0
|
|
2192
|
+
});
|
|
2193
|
+
const rootStyle = computed(() => {
|
|
2194
|
+
const { fixed, width, height } = state;
|
|
2195
|
+
if (fixed) {
|
|
2196
|
+
return {
|
|
2197
|
+
width: `${width}px`,
|
|
2198
|
+
height: `${height}px`
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
});
|
|
2202
|
+
const stickyStyle = computed(() => {
|
|
2203
|
+
if (!state.fixed)
|
|
2204
|
+
return;
|
|
2205
|
+
const style = {
|
|
2206
|
+
width: `${state.width}px`,
|
|
2207
|
+
height: `${state.height}px`,
|
|
2208
|
+
[props.position]: `${offset.value}px`,
|
|
2209
|
+
zIndex: +props.zIndex
|
|
2210
|
+
};
|
|
2211
|
+
if (state.transform)
|
|
2212
|
+
style.transform = `translate3d(0, ${state.transform}px, 0)`;
|
|
2213
|
+
return style;
|
|
2214
|
+
});
|
|
2215
|
+
const offset = computed(() => {
|
|
2216
|
+
return props.position === "top" ? props.top : props.bottom;
|
|
2217
|
+
});
|
|
2218
|
+
const isHidden = (elementRef) => {
|
|
2219
|
+
const el = unref(elementRef);
|
|
2220
|
+
if (!el)
|
|
2221
|
+
return false;
|
|
2222
|
+
const style = window.getComputedStyle(el);
|
|
2223
|
+
const hidden = style.display === "none";
|
|
2224
|
+
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
2225
|
+
return hidden || parentHidden;
|
|
2226
|
+
};
|
|
2227
|
+
const isExistRoot = () => {
|
|
2228
|
+
if (!root.value || isHidden(root))
|
|
2229
|
+
return false;
|
|
2230
|
+
return true;
|
|
2231
|
+
};
|
|
2232
|
+
const getScrollTop = (el) => {
|
|
2233
|
+
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
2234
|
+
};
|
|
2235
|
+
const renderFixed = () => {
|
|
2236
|
+
var _a;
|
|
2237
|
+
return h("view", {
|
|
2238
|
+
style: stickyStyle.value,
|
|
2239
|
+
class: state.fixed ? `${componentName$W} nut-sticky--fixed` : componentName$W
|
|
2240
|
+
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
2241
|
+
};
|
|
2242
|
+
const onScroll = () => {
|
|
2243
|
+
if (!isExistRoot())
|
|
2244
|
+
return;
|
|
2245
|
+
const { container, position } = props;
|
|
2246
|
+
const scrollTop = getScrollTop(window);
|
|
2247
|
+
const rootRect = useRect(root);
|
|
2248
|
+
if (rootRect.width || rootRect.height) {
|
|
2249
|
+
state.width = rootRect.width;
|
|
2250
|
+
state.height = rootRect.height;
|
|
2251
|
+
}
|
|
2252
|
+
if (position === "top") {
|
|
2253
|
+
if (container) {
|
|
2254
|
+
const containerRect = useRect(container);
|
|
2255
|
+
const diff = containerRect.bottom - +offset.value - state.height;
|
|
2256
|
+
state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
|
|
2257
|
+
state.transform = diff < 0 ? diff : 0;
|
|
2258
|
+
} else {
|
|
2259
|
+
state.fixed = offset.value > rootRect.top;
|
|
2260
|
+
}
|
|
2261
|
+
} else if (position === "bottom") {
|
|
2262
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
2263
|
+
if (container) {
|
|
2264
|
+
const containerRect = useRect(container);
|
|
2265
|
+
const diff = clientHeight - containerRect.top - +offset.value - state.height;
|
|
2266
|
+
state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
|
|
2267
|
+
state.transform = diff < 0 ? -diff : 0;
|
|
2268
|
+
} else {
|
|
2269
|
+
state.fixed = clientHeight - +offset.value < rootRect.bottom;
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
emit("scroll", {
|
|
2273
|
+
top: scrollTop,
|
|
2274
|
+
fixed: state.fixed
|
|
2275
|
+
});
|
|
2276
|
+
};
|
|
2277
|
+
watch(() => state.fixed, (val) => {
|
|
2278
|
+
emit("change", val);
|
|
2279
|
+
});
|
|
2280
|
+
onMounted(() => {
|
|
2281
|
+
window.addEventListener("scroll", onScroll);
|
|
2282
|
+
onScroll();
|
|
2283
|
+
});
|
|
2284
|
+
onUnmounted(() => {
|
|
2285
|
+
window.removeEventListener("scroll", onScroll);
|
|
2286
|
+
});
|
|
2287
|
+
return () => {
|
|
2288
|
+
return h("view", {
|
|
2289
|
+
style: rootStyle.value,
|
|
2290
|
+
ref: root
|
|
2291
|
+
}, [renderFixed()]);
|
|
2292
|
+
};
|
|
2293
|
+
}
|
|
2294
|
+
});
|
|
2295
|
+
const MIN_DISTANCE$1 = 10;
|
|
2296
|
+
function getDirection$1(x, y) {
|
|
2297
|
+
if (x > y && x > MIN_DISTANCE$1) {
|
|
2188
2298
|
return "horizontal";
|
|
2189
2299
|
}
|
|
2190
|
-
if (y > x && y > MIN_DISTANCE) {
|
|
2300
|
+
if (y > x && y > MIN_DISTANCE$1) {
|
|
2191
2301
|
return "vertical";
|
|
2192
2302
|
}
|
|
2193
2303
|
return "";
|
|
2194
2304
|
}
|
|
2195
|
-
function useTouch() {
|
|
2305
|
+
function useTouch$1() {
|
|
2196
2306
|
const startX = ref(0);
|
|
2197
2307
|
const startY = ref(0);
|
|
2198
2308
|
const deltaX = ref(0);
|
|
@@ -2221,7 +2331,7 @@ function useTouch() {
|
|
|
2221
2331
|
offsetX.value = Math.abs(deltaX.value);
|
|
2222
2332
|
offsetY.value = Math.abs(deltaY.value);
|
|
2223
2333
|
if (!direction.value) {
|
|
2224
|
-
direction.value = getDirection(offsetX.value, offsetY.value);
|
|
2334
|
+
direction.value = getDirection$1(offsetX.value, offsetY.value);
|
|
2225
2335
|
}
|
|
2226
2336
|
};
|
|
2227
2337
|
return {
|
|
@@ -2239,8 +2349,8 @@ function useTouch() {
|
|
|
2239
2349
|
isHorizontal
|
|
2240
2350
|
};
|
|
2241
2351
|
}
|
|
2242
|
-
const { componentName: componentName$
|
|
2243
|
-
const _sfc_main$
|
|
2352
|
+
const { componentName: componentName$V, create: create$1c } = createComponent("swipe");
|
|
2353
|
+
const _sfc_main$1c = create$1c({
|
|
2244
2354
|
props: {
|
|
2245
2355
|
name: {
|
|
2246
2356
|
type: String,
|
|
@@ -2262,7 +2372,7 @@ const _sfc_main$19 = create$19({
|
|
|
2262
2372
|
emits: ["open", "close"],
|
|
2263
2373
|
setup(props, { emit }) {
|
|
2264
2374
|
const classes = computed(() => {
|
|
2265
|
-
const prefixCls = componentName$
|
|
2375
|
+
const prefixCls = componentName$V;
|
|
2266
2376
|
return {
|
|
2267
2377
|
[prefixCls]: true
|
|
2268
2378
|
};
|
|
@@ -2328,7 +2438,7 @@ const _sfc_main$19 = create$19({
|
|
|
2328
2438
|
}
|
|
2329
2439
|
state.offset = offset;
|
|
2330
2440
|
};
|
|
2331
|
-
const touch = useTouch();
|
|
2441
|
+
const touch = useTouch$1();
|
|
2332
2442
|
const touchMethods = {
|
|
2333
2443
|
onTouchStart(event) {
|
|
2334
2444
|
if (props.disabled)
|
|
@@ -2386,16 +2496,16 @@ const _sfc_main$19 = create$19({
|
|
|
2386
2496
|
});
|
|
2387
2497
|
}
|
|
2388
2498
|
});
|
|
2389
|
-
const _hoisted_1$
|
|
2499
|
+
const _hoisted_1$W = {
|
|
2390
2500
|
class: "nut-swipe__left",
|
|
2391
2501
|
ref: "leftRef"
|
|
2392
2502
|
};
|
|
2393
|
-
const _hoisted_2$
|
|
2394
|
-
const _hoisted_3$
|
|
2503
|
+
const _hoisted_2$L = { class: "nut-swipe__content" };
|
|
2504
|
+
const _hoisted_3$B = {
|
|
2395
2505
|
class: "nut-swipe__right",
|
|
2396
2506
|
ref: "rightRef"
|
|
2397
2507
|
};
|
|
2398
|
-
function _sfc_render$
|
|
2508
|
+
function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2399
2509
|
return openBlock(), createElementBlock("view", {
|
|
2400
2510
|
class: normalizeClass(_ctx.classes),
|
|
2401
2511
|
style: normalizeStyle(_ctx.touchStyle),
|
|
@@ -2404,20 +2514,20 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2404
2514
|
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
|
|
2405
2515
|
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
2406
2516
|
}, [
|
|
2407
|
-
createElementVNode("view", _hoisted_1$
|
|
2517
|
+
createElementVNode("view", _hoisted_1$W, [
|
|
2408
2518
|
renderSlot(_ctx.$slots, "left")
|
|
2409
2519
|
], 512),
|
|
2410
|
-
createElementVNode("view", _hoisted_2$
|
|
2520
|
+
createElementVNode("view", _hoisted_2$L, [
|
|
2411
2521
|
renderSlot(_ctx.$slots, "default")
|
|
2412
2522
|
]),
|
|
2413
|
-
createElementVNode("view", _hoisted_3$
|
|
2523
|
+
createElementVNode("view", _hoisted_3$B, [
|
|
2414
2524
|
renderSlot(_ctx.$slots, "right")
|
|
2415
2525
|
], 512)
|
|
2416
2526
|
], 38);
|
|
2417
2527
|
}
|
|
2418
|
-
var Swipe = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2419
|
-
const { componentName: componentName$
|
|
2420
|
-
const _sfc_main$
|
|
2528
|
+
var Swipe = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$16]]);
|
|
2529
|
+
const { componentName: componentName$U, create: create$1b } = createComponent("actionsheet");
|
|
2530
|
+
const _sfc_main$1b = create$1b({
|
|
2421
2531
|
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
2422
2532
|
cancelTxt: {
|
|
2423
2533
|
type: String,
|
|
@@ -2452,10 +2562,10 @@ const _sfc_main$18 = create$18({
|
|
|
2452
2562
|
default: () => []
|
|
2453
2563
|
}
|
|
2454
2564
|
}),
|
|
2455
|
-
emits: ["cancel", "choose", "update:visible"],
|
|
2565
|
+
emits: ["cancel", "close", "choose", "update:visible"],
|
|
2456
2566
|
setup(props, { emit }) {
|
|
2457
2567
|
const classes = computed(() => {
|
|
2458
|
-
const prefixCls = componentName$
|
|
2568
|
+
const prefixCls = componentName$U;
|
|
2459
2569
|
return {
|
|
2460
2570
|
[prefixCls]: true
|
|
2461
2571
|
};
|
|
@@ -2486,22 +2596,22 @@ const _sfc_main$18 = create$18({
|
|
|
2486
2596
|
};
|
|
2487
2597
|
}
|
|
2488
2598
|
});
|
|
2489
|
-
const _hoisted_1$
|
|
2490
|
-
const _hoisted_2$
|
|
2599
|
+
const _hoisted_1$V = { class: "nut-actionsheet-panel" };
|
|
2600
|
+
const _hoisted_2$K = {
|
|
2491
2601
|
key: 0,
|
|
2492
2602
|
class: "nut-actionsheet-title"
|
|
2493
2603
|
};
|
|
2494
|
-
const _hoisted_3$
|
|
2604
|
+
const _hoisted_3$A = {
|
|
2495
2605
|
key: 1,
|
|
2496
2606
|
class: "nut-actionsheet-item desc"
|
|
2497
2607
|
};
|
|
2498
|
-
const _hoisted_4$
|
|
2608
|
+
const _hoisted_4$s = {
|
|
2499
2609
|
key: 2,
|
|
2500
2610
|
class: "nut-actionsheet-menu"
|
|
2501
2611
|
};
|
|
2502
|
-
const _hoisted_5$
|
|
2503
|
-
const _hoisted_6$
|
|
2504
|
-
function _sfc_render$
|
|
2612
|
+
const _hoisted_5$j = ["onClick"];
|
|
2613
|
+
const _hoisted_6$g = { class: "subdesc" };
|
|
2614
|
+
function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2505
2615
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
2506
2616
|
return openBlock(), createElementBlock("view", {
|
|
2507
2617
|
class: normalizeClass(_ctx.classes)
|
|
@@ -2514,10 +2624,10 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2514
2624
|
onClickOverlay: _ctx.close
|
|
2515
2625
|
}, {
|
|
2516
2626
|
default: withCtx(() => [
|
|
2517
|
-
createElementVNode("view", _hoisted_1$
|
|
2518
|
-
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2$
|
|
2519
|
-
_ctx.description ? (openBlock(), createElementBlock("view", _hoisted_3$
|
|
2520
|
-
_ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_4$
|
|
2627
|
+
createElementVNode("view", _hoisted_1$V, [
|
|
2628
|
+
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2$K, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
2629
|
+
_ctx.description ? (openBlock(), createElementBlock("view", _hoisted_3$A, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
|
|
2630
|
+
_ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_4$s, [
|
|
2521
2631
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index) => {
|
|
2522
2632
|
return openBlock(), createElementBlock("view", {
|
|
2523
2633
|
class: normalizeClass(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": item.disable }]),
|
|
@@ -2526,8 +2636,8 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2526
2636
|
onClick: ($event) => _ctx.chooseItem(item, index)
|
|
2527
2637
|
}, [
|
|
2528
2638
|
createTextVNode(toDisplayString(item[_ctx.optionTag]), 1),
|
|
2529
|
-
createElementVNode("view", _hoisted_6$
|
|
2530
|
-
], 14, _hoisted_5$
|
|
2639
|
+
createElementVNode("view", _hoisted_6$g, toDisplayString(item[_ctx.optionSubTag]), 1)
|
|
2640
|
+
], 14, _hoisted_5$j);
|
|
2531
2641
|
}), 128))
|
|
2532
2642
|
])) : createCommentVNode("", true),
|
|
2533
2643
|
_ctx.cancelTxt ? (openBlock(), createElementBlock("view", {
|
|
@@ -2541,9 +2651,9 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2541
2651
|
}, 8, ["visible", "onClickOverlay"])
|
|
2542
2652
|
], 2);
|
|
2543
2653
|
}
|
|
2544
|
-
var ActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2545
|
-
const { componentName: componentName$
|
|
2546
|
-
const _sfc_main$
|
|
2654
|
+
var ActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$15]]);
|
|
2655
|
+
const { componentName: componentName$T, create: create$1a } = createComponent("backtop");
|
|
2656
|
+
const _sfc_main$1a = create$1a({
|
|
2547
2657
|
props: {
|
|
2548
2658
|
bottom: {
|
|
2549
2659
|
type: Number,
|
|
@@ -2584,7 +2694,7 @@ const _sfc_main$17 = create$17({
|
|
|
2584
2694
|
keepAlive: false
|
|
2585
2695
|
});
|
|
2586
2696
|
const classes = computed(() => {
|
|
2587
|
-
const prefixCls = componentName$
|
|
2697
|
+
const prefixCls = componentName$T;
|
|
2588
2698
|
return {
|
|
2589
2699
|
[prefixCls]: true,
|
|
2590
2700
|
show: state.backTop
|
|
@@ -2675,7 +2785,7 @@ const _sfc_main$17 = create$17({
|
|
|
2675
2785
|
};
|
|
2676
2786
|
}
|
|
2677
2787
|
});
|
|
2678
|
-
function _sfc_render$
|
|
2788
|
+
function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2679
2789
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2680
2790
|
return openBlock(), createElementBlock("div", {
|
|
2681
2791
|
class: normalizeClass(_ctx.classes),
|
|
@@ -2691,9 +2801,9 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2691
2801
|
])
|
|
2692
2802
|
], 6);
|
|
2693
2803
|
}
|
|
2694
|
-
var BackTop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2695
|
-
const { create: create$
|
|
2696
|
-
const _sfc_main$
|
|
2804
|
+
var BackTop = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$14]]);
|
|
2805
|
+
const { create: create$19 } = createComponent("collapse");
|
|
2806
|
+
const _sfc_main$19 = create$19({
|
|
2697
2807
|
props: {
|
|
2698
2808
|
active: {
|
|
2699
2809
|
type: [String, Number, Array]
|
|
@@ -2766,14 +2876,14 @@ const _sfc_main$16 = create$16({
|
|
|
2766
2876
|
});
|
|
2767
2877
|
}
|
|
2768
2878
|
});
|
|
2769
|
-
function _sfc_render$
|
|
2879
|
+
function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2770
2880
|
return openBlock(), createElementBlock("view", null, [
|
|
2771
2881
|
renderSlot(_ctx.$slots, "default")
|
|
2772
2882
|
]);
|
|
2773
2883
|
}
|
|
2774
|
-
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2775
|
-
const { create: create$
|
|
2776
|
-
const _sfc_main$
|
|
2884
|
+
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$13]]);
|
|
2885
|
+
const { create: create$18, componentName: componentName$S } = createComponent("collapse-item");
|
|
2886
|
+
const _sfc_main$18 = create$18({
|
|
2777
2887
|
props: {
|
|
2778
2888
|
title: {
|
|
2779
2889
|
type: String,
|
|
@@ -2800,7 +2910,7 @@ const _sfc_main$15 = create$15({
|
|
|
2800
2910
|
const collapse = inject("collapseParent");
|
|
2801
2911
|
const parent = reactive(collapse);
|
|
2802
2912
|
const classes = computed(() => {
|
|
2803
|
-
const prefixCls = componentName$
|
|
2913
|
+
const prefixCls = componentName$S;
|
|
2804
2914
|
return {
|
|
2805
2915
|
[prefixCls]: true,
|
|
2806
2916
|
[`${prefixCls}-icon`]: parent.props.icon
|
|
@@ -2933,23 +3043,23 @@ const _sfc_main$15 = create$15({
|
|
|
2933
3043
|
});
|
|
2934
3044
|
}
|
|
2935
3045
|
});
|
|
2936
|
-
const _hoisted_1$
|
|
2937
|
-
const _hoisted_2$
|
|
2938
|
-
const _hoisted_3$
|
|
2939
|
-
const _hoisted_4$
|
|
3046
|
+
const _hoisted_1$U = { class: "collapse-title" };
|
|
3047
|
+
const _hoisted_2$J = { class: "collapse-title-value" };
|
|
3048
|
+
const _hoisted_3$z = ["innerHTML"];
|
|
3049
|
+
const _hoisted_4$r = {
|
|
2940
3050
|
key: 0,
|
|
2941
3051
|
class: "subTitle"
|
|
2942
3052
|
};
|
|
2943
|
-
const _hoisted_5$
|
|
2944
|
-
const _hoisted_6$
|
|
3053
|
+
const _hoisted_5$i = ["innerHTML"];
|
|
3054
|
+
const _hoisted_6$f = {
|
|
2945
3055
|
class: "collapse-wrapper",
|
|
2946
3056
|
ref: "wrapperRef"
|
|
2947
3057
|
};
|
|
2948
|
-
const _hoisted_7$
|
|
3058
|
+
const _hoisted_7$b = {
|
|
2949
3059
|
class: "collapse-content",
|
|
2950
3060
|
ref: "contentRef"
|
|
2951
3061
|
};
|
|
2952
|
-
function _sfc_render
|
|
3062
|
+
function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2953
3063
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2954
3064
|
return openBlock(), createElementBlock("view", {
|
|
2955
3065
|
class: normalizeClass(_ctx.classes)
|
|
@@ -2958,9 +3068,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2958
3068
|
class: normalizeClass(["collapse-item", { "item-expanded": _ctx.openExpanded }, { "nut-collapse-item-disabled": _ctx.disabled }]),
|
|
2959
3069
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleOpen && _ctx.toggleOpen(...args))
|
|
2960
3070
|
}, [
|
|
2961
|
-
createElementVNode("view", _hoisted_1$
|
|
3071
|
+
createElementVNode("view", _hoisted_1$U, [
|
|
2962
3072
|
createElementVNode("view", null, [
|
|
2963
|
-
createElementVNode("view", _hoisted_2$
|
|
3073
|
+
createElementVNode("view", _hoisted_2$J, [
|
|
2964
3074
|
_ctx.titleIcon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
2965
3075
|
key: 0,
|
|
2966
3076
|
name: _ctx.titleIcon,
|
|
@@ -2972,17 +3082,17 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2972
3082
|
key: 2,
|
|
2973
3083
|
innerHTML: _ctx.title,
|
|
2974
3084
|
class: "collapse-icon-title"
|
|
2975
|
-
}, null, 8, _hoisted_3$
|
|
3085
|
+
}, null, 8, _hoisted_3$z))
|
|
2976
3086
|
])
|
|
2977
3087
|
])
|
|
2978
3088
|
]),
|
|
2979
|
-
_ctx.$slots.sTitle ? (openBlock(), createElementBlock("view", _hoisted_4$
|
|
3089
|
+
_ctx.$slots.sTitle ? (openBlock(), createElementBlock("view", _hoisted_4$r, [
|
|
2980
3090
|
renderSlot(_ctx.$slots, "sTitle")
|
|
2981
3091
|
])) : (openBlock(), createElementBlock("view", {
|
|
2982
3092
|
key: 1,
|
|
2983
3093
|
innerHTML: _ctx.subTitle,
|
|
2984
3094
|
class: "subTitle"
|
|
2985
|
-
}, null, 8, _hoisted_5$
|
|
3095
|
+
}, null, 8, _hoisted_5$i)),
|
|
2986
3096
|
_ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
2987
3097
|
key: 2,
|
|
2988
3098
|
name: _ctx.icon,
|
|
@@ -2992,14 +3102,14 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2992
3102
|
style: normalizeStyle(_ctx.iconStyle)
|
|
2993
3103
|
}, null, 8, ["name", "size", "color", "class", "style"])) : createCommentVNode("", true)
|
|
2994
3104
|
], 2),
|
|
2995
|
-
createElementVNode("view", _hoisted_6$
|
|
2996
|
-
createElementVNode("view", _hoisted_7$
|
|
3105
|
+
createElementVNode("view", _hoisted_6$f, [
|
|
3106
|
+
createElementVNode("view", _hoisted_7$b, [
|
|
2997
3107
|
renderSlot(_ctx.$slots, "default")
|
|
2998
3108
|
], 512)
|
|
2999
3109
|
], 512)
|
|
3000
3110
|
], 2);
|
|
3001
3111
|
}
|
|
3002
|
-
var CollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3112
|
+
var CollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$12]]);
|
|
3003
3113
|
const _window = window;
|
|
3004
3114
|
function requestAniFrame() {
|
|
3005
3115
|
if (typeof _window !== "undefined") {
|
|
@@ -3013,8 +3123,8 @@ function requestAniFrame() {
|
|
|
3013
3123
|
}
|
|
3014
3124
|
}
|
|
3015
3125
|
var requestAniFrame$1 = requestAniFrame();
|
|
3016
|
-
const { componentName: componentName$
|
|
3017
|
-
const _sfc_main$
|
|
3126
|
+
const { componentName: componentName$R, create: create$17 } = createComponent("drag");
|
|
3127
|
+
const _sfc_main$17 = create$17({
|
|
3018
3128
|
props: {
|
|
3019
3129
|
attract: {
|
|
3020
3130
|
type: Boolean,
|
|
@@ -3059,7 +3169,7 @@ const _sfc_main$14 = create$14({
|
|
|
3059
3169
|
}
|
|
3060
3170
|
});
|
|
3061
3171
|
const classes = computed(() => {
|
|
3062
|
-
const prefixCls = componentName$
|
|
3172
|
+
const prefixCls = componentName$R;
|
|
3063
3173
|
return {
|
|
3064
3174
|
[prefixCls]: true
|
|
3065
3175
|
};
|
|
@@ -3194,7 +3304,7 @@ const _sfc_main$14 = create$14({
|
|
|
3194
3304
|
};
|
|
3195
3305
|
}
|
|
3196
3306
|
});
|
|
3197
|
-
function _sfc_render$
|
|
3307
|
+
function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3198
3308
|
return openBlock(), createElementBlock("view", {
|
|
3199
3309
|
class: normalizeClass(_ctx.classes),
|
|
3200
3310
|
ref: "myDrag",
|
|
@@ -3205,9 +3315,9 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3205
3315
|
renderSlot(_ctx.$slots, "default")
|
|
3206
3316
|
], 34);
|
|
3207
3317
|
}
|
|
3208
|
-
var Drag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3209
|
-
const { componentName: componentName$
|
|
3210
|
-
const _sfc_main$
|
|
3318
|
+
var Drag = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$11]]);
|
|
3319
|
+
const { componentName: componentName$Q, create: create$16 } = createComponent("dialog");
|
|
3320
|
+
const _sfc_main$16 = create$16({
|
|
3211
3321
|
inheritAttrs: false,
|
|
3212
3322
|
components: {
|
|
3213
3323
|
[Popup.name]: Popup,
|
|
@@ -3282,7 +3392,7 @@ const _sfc_main$13 = create$13({
|
|
|
3282
3392
|
});
|
|
3283
3393
|
const classes = computed(() => {
|
|
3284
3394
|
return {
|
|
3285
|
-
[componentName$
|
|
3395
|
+
[componentName$Q]: true
|
|
3286
3396
|
};
|
|
3287
3397
|
});
|
|
3288
3398
|
const update = (val) => {
|
|
@@ -3312,12 +3422,12 @@ const _sfc_main$13 = create$13({
|
|
|
3312
3422
|
};
|
|
3313
3423
|
}
|
|
3314
3424
|
});
|
|
3315
|
-
const _hoisted_1$
|
|
3425
|
+
const _hoisted_1$T = {
|
|
3316
3426
|
key: 0,
|
|
3317
3427
|
class: "nut-dialog__header"
|
|
3318
3428
|
};
|
|
3319
|
-
const _hoisted_2$
|
|
3320
|
-
function _sfc_render$
|
|
3429
|
+
const _hoisted_2$I = ["innerHTML"];
|
|
3430
|
+
function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3321
3431
|
const _component_nut_button = resolveComponent("nut-button");
|
|
3322
3432
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
3323
3433
|
return openBlock(), createBlock(_component_nut_popup, {
|
|
@@ -3334,7 +3444,7 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3334
3444
|
createElementVNode("view", {
|
|
3335
3445
|
class: normalizeClass(_ctx.classes)
|
|
3336
3446
|
}, [
|
|
3337
|
-
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1$
|
|
3447
|
+
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1$T, [
|
|
3338
3448
|
_ctx.$slots.header ? renderSlot(_ctx.$slots, "header", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3339
3449
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
3340
3450
|
], 64))
|
|
@@ -3346,7 +3456,7 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3346
3456
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock("view", {
|
|
3347
3457
|
key: 1,
|
|
3348
3458
|
innerHTML: _ctx.content
|
|
3349
|
-
}, null, 8, _hoisted_2$
|
|
3459
|
+
}, null, 8, _hoisted_2$I))
|
|
3350
3460
|
], 4),
|
|
3351
3461
|
!_ctx.noFooter ? (openBlock(), createElementBlock("view", {
|
|
3352
3462
|
key: 1,
|
|
@@ -3386,7 +3496,7 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3386
3496
|
_: 3
|
|
3387
3497
|
}, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
|
|
3388
3498
|
}
|
|
3389
|
-
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3499
|
+
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$10]]);
|
|
3390
3500
|
class DialogOptions {
|
|
3391
3501
|
constructor() {
|
|
3392
3502
|
__publicField(this, "title", "");
|
|
@@ -3460,8 +3570,8 @@ _Dialog.install = (app) => {
|
|
|
3460
3570
|
app.use(Dialog);
|
|
3461
3571
|
app.config.globalProperties.$dialog = _Dialog;
|
|
3462
3572
|
};
|
|
3463
|
-
const { componentName: componentName$
|
|
3464
|
-
const _sfc_main$
|
|
3573
|
+
const { componentName: componentName$P, create: create$15 } = createComponent("infiniteloading");
|
|
3574
|
+
const _sfc_main$15 = create$15({
|
|
3465
3575
|
props: {
|
|
3466
3576
|
hasMore: {
|
|
3467
3577
|
type: Boolean,
|
|
@@ -3523,7 +3633,7 @@ const _sfc_main$12 = create$12({
|
|
|
3523
3633
|
distance: 0
|
|
3524
3634
|
});
|
|
3525
3635
|
const classes = computed(() => {
|
|
3526
|
-
const prefixCls = componentName$
|
|
3636
|
+
const prefixCls = componentName$P;
|
|
3527
3637
|
return {
|
|
3528
3638
|
[prefixCls]: true
|
|
3529
3639
|
};
|
|
@@ -3647,20 +3757,20 @@ const _sfc_main$12 = create$12({
|
|
|
3647
3757
|
});
|
|
3648
3758
|
}
|
|
3649
3759
|
});
|
|
3650
|
-
const _hoisted_1$
|
|
3651
|
-
const _hoisted_2$
|
|
3652
|
-
const _hoisted_3$
|
|
3653
|
-
const _hoisted_4$
|
|
3654
|
-
const _hoisted_5$
|
|
3760
|
+
const _hoisted_1$S = { class: "top-box" };
|
|
3761
|
+
const _hoisted_2$H = { class: "top-text" };
|
|
3762
|
+
const _hoisted_3$y = { class: "nut-infinite-container" };
|
|
3763
|
+
const _hoisted_4$q = { class: "nut-infinite-bottom" };
|
|
3764
|
+
const _hoisted_5$h = {
|
|
3655
3765
|
key: 0,
|
|
3656
3766
|
class: "bottom-box"
|
|
3657
3767
|
};
|
|
3658
|
-
const _hoisted_6$
|
|
3659
|
-
const _hoisted_7$
|
|
3768
|
+
const _hoisted_6$e = { class: "bottom-text" };
|
|
3769
|
+
const _hoisted_7$a = {
|
|
3660
3770
|
key: 1,
|
|
3661
3771
|
class: "tips"
|
|
3662
3772
|
};
|
|
3663
|
-
function _sfc_render
|
|
3773
|
+
function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3664
3774
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
3665
3775
|
return openBlock(), createElementBlock("view", {
|
|
3666
3776
|
class: normalizeClass(_ctx.classes),
|
|
@@ -3674,31 +3784,31 @@ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3674
3784
|
ref: "refreshTop",
|
|
3675
3785
|
style: normalizeStyle(_ctx.getStyle)
|
|
3676
3786
|
}, [
|
|
3677
|
-
createElementVNode("view", _hoisted_1$
|
|
3787
|
+
createElementVNode("view", _hoisted_1$S, [
|
|
3678
3788
|
createVNode(_component_nut_icon, {
|
|
3679
3789
|
class: "top-img",
|
|
3680
3790
|
name: _ctx.pullIcon
|
|
3681
3791
|
}, null, 8, ["name"]),
|
|
3682
|
-
createElementVNode("view", _hoisted_2$
|
|
3792
|
+
createElementVNode("view", _hoisted_2$H, toDisplayString(_ctx.pullTxt), 1)
|
|
3683
3793
|
])
|
|
3684
3794
|
], 4),
|
|
3685
|
-
createElementVNode("view", _hoisted_3$
|
|
3795
|
+
createElementVNode("view", _hoisted_3$y, [
|
|
3686
3796
|
renderSlot(_ctx.$slots, "default")
|
|
3687
3797
|
]),
|
|
3688
|
-
createElementVNode("view", _hoisted_4$
|
|
3689
|
-
_ctx.isInfiniting ? (openBlock(), createElementBlock("view", _hoisted_5$
|
|
3798
|
+
createElementVNode("view", _hoisted_4$q, [
|
|
3799
|
+
_ctx.isInfiniting ? (openBlock(), createElementBlock("view", _hoisted_5$h, [
|
|
3690
3800
|
createVNode(_component_nut_icon, {
|
|
3691
3801
|
class: "bottom-img",
|
|
3692
3802
|
name: _ctx.loadIcon
|
|
3693
3803
|
}, null, 8, ["name"]),
|
|
3694
|
-
createElementVNode("view", _hoisted_6$
|
|
3695
|
-
])) : !_ctx.hasMore ? (openBlock(), createElementBlock("view", _hoisted_7$
|
|
3804
|
+
createElementVNode("view", _hoisted_6$e, toDisplayString(_ctx.loadTxt), 1)
|
|
3805
|
+
])) : !_ctx.hasMore ? (openBlock(), createElementBlock("view", _hoisted_7$a, toDisplayString(_ctx.loadMoreTxt), 1)) : createCommentVNode("", true)
|
|
3696
3806
|
])
|
|
3697
3807
|
], 34);
|
|
3698
3808
|
}
|
|
3699
|
-
var InfiniteLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3700
|
-
const { componentName: componentName$
|
|
3701
|
-
const _sfc_main$
|
|
3809
|
+
var InfiniteLoading = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$$]]);
|
|
3810
|
+
const { componentName: componentName$O, create: create$14 } = createComponent("notify");
|
|
3811
|
+
const _sfc_main$14 = create$14({
|
|
3702
3812
|
components: {
|
|
3703
3813
|
[Popup.name]: Popup
|
|
3704
3814
|
},
|
|
@@ -3768,7 +3878,7 @@ const _sfc_main$11 = create$11({
|
|
|
3768
3878
|
return { state, hide, onAfterLeave, clickCover };
|
|
3769
3879
|
}
|
|
3770
3880
|
});
|
|
3771
|
-
function _sfc_render$
|
|
3881
|
+
function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3772
3882
|
return openBlock(), createBlock(Transition, {
|
|
3773
3883
|
name: "toast-fade",
|
|
3774
3884
|
onAfterLeave: _ctx.onAfterLeave
|
|
@@ -3789,7 +3899,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3789
3899
|
_: 3
|
|
3790
3900
|
}, 8, ["onAfterLeave"]);
|
|
3791
3901
|
}
|
|
3792
|
-
var Notify = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3902
|
+
var Notify = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$_]]);
|
|
3793
3903
|
const defaultOptions$1 = {
|
|
3794
3904
|
type: "base",
|
|
3795
3905
|
showPopup: false,
|
|
@@ -3898,37 +4008,8 @@ const NotifyFunction = {
|
|
|
3898
4008
|
app.config.globalProperties.$notify = NotifyFunction;
|
|
3899
4009
|
}
|
|
3900
4010
|
};
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
}
|
|
3904
|
-
const useRect = (elementRef) => {
|
|
3905
|
-
const element = unref(elementRef);
|
|
3906
|
-
if (isWindow(element)) {
|
|
3907
|
-
const width = element.innerWidth;
|
|
3908
|
-
const height = element.innerHeight;
|
|
3909
|
-
return {
|
|
3910
|
-
top: 0,
|
|
3911
|
-
left: 0,
|
|
3912
|
-
right: width,
|
|
3913
|
-
bottom: height,
|
|
3914
|
-
width,
|
|
3915
|
-
height
|
|
3916
|
-
};
|
|
3917
|
-
}
|
|
3918
|
-
if (element && element.getBoundingClientRect) {
|
|
3919
|
-
return element.getBoundingClientRect();
|
|
3920
|
-
}
|
|
3921
|
-
return {
|
|
3922
|
-
top: 0,
|
|
3923
|
-
left: 0,
|
|
3924
|
-
right: 0,
|
|
3925
|
-
bottom: 0,
|
|
3926
|
-
width: 0,
|
|
3927
|
-
height: 0
|
|
3928
|
-
};
|
|
3929
|
-
};
|
|
3930
|
-
const { componentName: componentName$K, create: create$10 } = createComponent("range");
|
|
3931
|
-
const _sfc_main$10 = create$10({
|
|
4011
|
+
const { componentName: componentName$N, create: create$13 } = createComponent("range");
|
|
4012
|
+
const _sfc_main$13 = create$13({
|
|
3932
4013
|
props: {
|
|
3933
4014
|
range: {
|
|
3934
4015
|
type: Boolean,
|
|
@@ -3970,10 +4051,10 @@ const _sfc_main$10 = create$10({
|
|
|
3970
4051
|
let currentValue;
|
|
3971
4052
|
const root = ref();
|
|
3972
4053
|
const dragStatus = ref();
|
|
3973
|
-
const touch = useTouch();
|
|
4054
|
+
const touch = useTouch$1();
|
|
3974
4055
|
const scope = computed(() => Number(props.max) - Number(props.min));
|
|
3975
4056
|
const classes = computed(() => {
|
|
3976
|
-
const prefixCls = componentName$
|
|
4057
|
+
const prefixCls = componentName$N;
|
|
3977
4058
|
return {
|
|
3978
4059
|
[prefixCls]: true,
|
|
3979
4060
|
[`${prefixCls}-disabled`]: props.disabled,
|
|
@@ -4124,28 +4205,28 @@ const _sfc_main$10 = create$10({
|
|
|
4124
4205
|
});
|
|
4125
4206
|
}
|
|
4126
4207
|
});
|
|
4127
|
-
const _hoisted_1$
|
|
4128
|
-
const _hoisted_2$
|
|
4208
|
+
const _hoisted_1$R = { class: "nut-range-container" };
|
|
4209
|
+
const _hoisted_2$G = {
|
|
4129
4210
|
key: 0,
|
|
4130
4211
|
class: "min"
|
|
4131
4212
|
};
|
|
4132
|
-
const _hoisted_3$
|
|
4133
|
-
const _hoisted_4$
|
|
4213
|
+
const _hoisted_3$x = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
|
|
4214
|
+
const _hoisted_4$p = {
|
|
4134
4215
|
key: 0,
|
|
4135
4216
|
class: "number"
|
|
4136
4217
|
};
|
|
4137
|
-
const _hoisted_5$
|
|
4138
|
-
const _hoisted_6$
|
|
4218
|
+
const _hoisted_5$g = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
|
|
4219
|
+
const _hoisted_6$d = {
|
|
4139
4220
|
key: 0,
|
|
4140
4221
|
class: "number"
|
|
4141
4222
|
};
|
|
4142
|
-
const _hoisted_7$
|
|
4223
|
+
const _hoisted_7$9 = {
|
|
4143
4224
|
key: 1,
|
|
4144
4225
|
class: "max"
|
|
4145
4226
|
};
|
|
4146
|
-
function _sfc_render$
|
|
4147
|
-
return openBlock(), createElementBlock("view", _hoisted_1$
|
|
4148
|
-
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_2$
|
|
4227
|
+
function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4228
|
+
return openBlock(), createElementBlock("view", _hoisted_1$R, [
|
|
4229
|
+
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_2$G, toDisplayString(+_ctx.min), 1)) : createCommentVNode("", true),
|
|
4149
4230
|
createElementVNode("view", {
|
|
4150
4231
|
ref: "root",
|
|
4151
4232
|
style: normalizeStyle(_ctx.wrapperStyle),
|
|
@@ -4185,9 +4266,9 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4185
4266
|
class: "nut-range-button",
|
|
4186
4267
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
4187
4268
|
}, [
|
|
4188
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_4$
|
|
4269
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_4$p, toDisplayString(_ctx.curValue(index)), 1)) : createCommentVNode("", true)
|
|
4189
4270
|
], 4))
|
|
4190
|
-
], 42, _hoisted_3$
|
|
4271
|
+
], 42, _hoisted_3$x);
|
|
4191
4272
|
}), 64)) : (openBlock(), createElementBlock("view", {
|
|
4192
4273
|
key: 1,
|
|
4193
4274
|
role: "slider",
|
|
@@ -4210,17 +4291,355 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4210
4291
|
class: "nut-range-button",
|
|
4211
4292
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
4212
4293
|
}, [
|
|
4213
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_6$
|
|
4294
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_6$d, toDisplayString(_ctx.curValue()), 1)) : createCommentVNode("", true)
|
|
4214
4295
|
], 4))
|
|
4215
|
-
], 40, _hoisted_5$
|
|
4296
|
+
], 40, _hoisted_5$g))
|
|
4216
4297
|
], 4)
|
|
4217
4298
|
], 6),
|
|
4218
|
-
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_7$
|
|
4299
|
+
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_7$9, toDisplayString(+_ctx.max), 1)) : createCommentVNode("", true)
|
|
4219
4300
|
]);
|
|
4220
4301
|
}
|
|
4221
|
-
var Range = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4222
|
-
const
|
|
4223
|
-
|
|
4302
|
+
var Range = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$Z]]);
|
|
4303
|
+
const MIN_DISTANCE = 10;
|
|
4304
|
+
function getDirection(x, y) {
|
|
4305
|
+
if (x > y && x > MIN_DISTANCE) {
|
|
4306
|
+
return "horizontal";
|
|
4307
|
+
}
|
|
4308
|
+
if (y > x && y > MIN_DISTANCE) {
|
|
4309
|
+
return "vertical";
|
|
4310
|
+
}
|
|
4311
|
+
return "";
|
|
4312
|
+
}
|
|
4313
|
+
function useTouch() {
|
|
4314
|
+
const startX = ref(0);
|
|
4315
|
+
const startY = ref(0);
|
|
4316
|
+
const deltaX = ref(0);
|
|
4317
|
+
const deltaY = ref(0);
|
|
4318
|
+
const offsetX = ref(0);
|
|
4319
|
+
const offsetY = ref(0);
|
|
4320
|
+
const direction = ref("");
|
|
4321
|
+
const isVertical = () => direction.value === "vertical";
|
|
4322
|
+
const isHorizontal = () => direction.value === "horizontal";
|
|
4323
|
+
const reset = () => {
|
|
4324
|
+
deltaX.value = 0;
|
|
4325
|
+
deltaY.value = 0;
|
|
4326
|
+
offsetX.value = 0;
|
|
4327
|
+
offsetY.value = 0;
|
|
4328
|
+
direction.value = "";
|
|
4329
|
+
};
|
|
4330
|
+
const start = (event) => {
|
|
4331
|
+
reset();
|
|
4332
|
+
startX.value = event.touches[0].clientX;
|
|
4333
|
+
startY.value = event.touches[0].clientY;
|
|
4334
|
+
};
|
|
4335
|
+
const move = (event) => {
|
|
4336
|
+
const touch = event.touches[0];
|
|
4337
|
+
deltaX.value = touch.clientX - startX.value;
|
|
4338
|
+
deltaY.value = touch.clientY - startY.value;
|
|
4339
|
+
offsetX.value = Math.abs(deltaX.value);
|
|
4340
|
+
offsetY.value = Math.abs(deltaY.value);
|
|
4341
|
+
if (!direction.value) {
|
|
4342
|
+
direction.value = getDirection(offsetX.value, offsetY.value);
|
|
4343
|
+
}
|
|
4344
|
+
};
|
|
4345
|
+
return {
|
|
4346
|
+
move,
|
|
4347
|
+
start,
|
|
4348
|
+
reset,
|
|
4349
|
+
startX,
|
|
4350
|
+
startY,
|
|
4351
|
+
deltaX,
|
|
4352
|
+
deltaY,
|
|
4353
|
+
offsetX,
|
|
4354
|
+
offsetY,
|
|
4355
|
+
direction,
|
|
4356
|
+
isVertical,
|
|
4357
|
+
isHorizontal
|
|
4358
|
+
};
|
|
4359
|
+
}
|
|
4360
|
+
function preventDefault(event, isStopPropagation) {
|
|
4361
|
+
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
4362
|
+
event.preventDefault();
|
|
4363
|
+
}
|
|
4364
|
+
if (isStopPropagation)
|
|
4365
|
+
event.stopPropagation();
|
|
4366
|
+
}
|
|
4367
|
+
const { componentName: componentName$M, create: create$12 } = createComponent("pullrefresh");
|
|
4368
|
+
const _sfc_main$12 = create$12({
|
|
4369
|
+
props: {
|
|
4370
|
+
useWindow: {
|
|
4371
|
+
type: Boolean,
|
|
4372
|
+
default: true
|
|
4373
|
+
},
|
|
4374
|
+
containerId: {
|
|
4375
|
+
type: String,
|
|
4376
|
+
default: ""
|
|
4377
|
+
},
|
|
4378
|
+
disabled: {
|
|
4379
|
+
type: Boolean,
|
|
4380
|
+
default: false
|
|
4381
|
+
},
|
|
4382
|
+
direction: {
|
|
4383
|
+
type: String,
|
|
4384
|
+
default: "vertical"
|
|
4385
|
+
},
|
|
4386
|
+
pullingText: {
|
|
4387
|
+
type: Object,
|
|
4388
|
+
default: {
|
|
4389
|
+
top: "\u4E0B\u62C9\u5237\u65B0",
|
|
4390
|
+
bottom: "\u4E0A\u62C9\u52A0\u8F7D",
|
|
4391
|
+
left: "\u5DE6\u6ED1\u5237\u65B0",
|
|
4392
|
+
right: "\u53F3\u6ED1\u52A0\u8F7D"
|
|
4393
|
+
}
|
|
4394
|
+
},
|
|
4395
|
+
loosingText: {
|
|
4396
|
+
type: Object,
|
|
4397
|
+
default: {
|
|
4398
|
+
top: "\u677E\u624B\u91CA\u653E\u5237\u65B0",
|
|
4399
|
+
bottom: "\u677E\u624B\u91CA\u653E\u5237\u65B0",
|
|
4400
|
+
left: "\u91CA\u653E\u5237\u65B0",
|
|
4401
|
+
right: "\u52A0\u8F7D\u66F4\u591A"
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
loadingText: {
|
|
4405
|
+
type: Object,
|
|
4406
|
+
default: {
|
|
4407
|
+
top: "\u52A0\u8F7D\u4E2D...",
|
|
4408
|
+
bottom: "\u52A0\u8F7D\u4E2D...",
|
|
4409
|
+
left: "\u52A0\u8F7D\u4E2D...",
|
|
4410
|
+
right: "\u52A0\u8F7D\u4E2D..."
|
|
4411
|
+
}
|
|
4412
|
+
}
|
|
4413
|
+
},
|
|
4414
|
+
emits: ["refresh", "downRefresh"],
|
|
4415
|
+
setup(props, { emit }) {
|
|
4416
|
+
const { containerId, useWindow, direction, disabled } = toRefs(props);
|
|
4417
|
+
const reachTop = ref(false);
|
|
4418
|
+
const reachBottom = ref(false);
|
|
4419
|
+
const reachLeft = ref(false);
|
|
4420
|
+
const reachRight = ref(false);
|
|
4421
|
+
const state = reactive({
|
|
4422
|
+
status: "normal",
|
|
4423
|
+
distance: 0,
|
|
4424
|
+
duration: 0
|
|
4425
|
+
});
|
|
4426
|
+
let scrollEl = document.documentElement || document.body;
|
|
4427
|
+
const scroller = ref(null);
|
|
4428
|
+
const touch = useTouch();
|
|
4429
|
+
const getStyle = computed(() => {
|
|
4430
|
+
let style = {};
|
|
4431
|
+
const { deltaY, deltaX } = touch;
|
|
4432
|
+
if (direction.value == "vertical" && (reachTop.value && deltaY.value > 0 || reachBottom.value && deltaY.value < 0) && touch.isVertical()) {
|
|
4433
|
+
style = {
|
|
4434
|
+
transitionDuration: `${state.duration}ms`,
|
|
4435
|
+
transform: state.distance ? `translate3d(0,${state.distance}px, 0)` : `translate3d(0,0,0)`
|
|
4436
|
+
};
|
|
4437
|
+
}
|
|
4438
|
+
if (direction.value == "horizontal" && (reachLeft.value && deltaX.value > 0 || reachRight.value && deltaX.value < 0) && touch.isHorizontal()) {
|
|
4439
|
+
style = {
|
|
4440
|
+
transitionDuration: `${state.duration}ms`,
|
|
4441
|
+
transform: state.distance ? `translate3d(${state.distance}px, 0,0)` : `translate3d(0,0,0)`
|
|
4442
|
+
};
|
|
4443
|
+
}
|
|
4444
|
+
return style;
|
|
4445
|
+
});
|
|
4446
|
+
const getBottomStyle = computed(() => {
|
|
4447
|
+
let style = {};
|
|
4448
|
+
if (direction.value == "vertical" && reachBottom.value && touch.deltaY.value < 0 && touch.isVertical()) {
|
|
4449
|
+
const dis = Math.abs(state.distance) < 50 ? -state.distance : 50;
|
|
4450
|
+
style = {
|
|
4451
|
+
height: dis + "px"
|
|
4452
|
+
};
|
|
4453
|
+
}
|
|
4454
|
+
if (direction.value == "horizontal" && reachRight.value && touch.deltaX.value < 0 && touch.isVertical()) {
|
|
4455
|
+
const dis = Math.abs(state.distance) < 50 ? -state.distance : 50;
|
|
4456
|
+
style = {
|
|
4457
|
+
width: dis + "px"
|
|
4458
|
+
};
|
|
4459
|
+
}
|
|
4460
|
+
return style;
|
|
4461
|
+
});
|
|
4462
|
+
const refreshTopTem = computed(() => {
|
|
4463
|
+
const { status, distance } = state;
|
|
4464
|
+
const tag = direction.value == "vertical" ? "top" : "left";
|
|
4465
|
+
if (status == "loading" && (reachTop.value || reachLeft.value) && distance > 0) {
|
|
4466
|
+
return props.loadingText[tag];
|
|
4467
|
+
}
|
|
4468
|
+
if (status == "pulling" && (reachTop.value || reachLeft.value) && distance > 0) {
|
|
4469
|
+
return props.pullingText[tag];
|
|
4470
|
+
}
|
|
4471
|
+
if (status == "loosing" && (reachTop.value || reachLeft.value) && distance > 0) {
|
|
4472
|
+
return props.loosingText[tag];
|
|
4473
|
+
}
|
|
4474
|
+
return "";
|
|
4475
|
+
});
|
|
4476
|
+
const refreshBottomTem = computed(() => {
|
|
4477
|
+
const { status, distance } = state;
|
|
4478
|
+
const tag = direction.value == "vertical" ? "bottom" : "right";
|
|
4479
|
+
if (status == "loading" && (reachBottom.value || reachRight.value) && distance < 0) {
|
|
4480
|
+
return props.loadingText[tag];
|
|
4481
|
+
}
|
|
4482
|
+
if (status == "pulling" && (reachBottom.value || reachRight.value) && distance < 0) {
|
|
4483
|
+
return props.pullingText[tag];
|
|
4484
|
+
}
|
|
4485
|
+
if (status == "loosing" && (reachBottom.value || reachRight.value) && distance < 0) {
|
|
4486
|
+
return props.loosingText[tag];
|
|
4487
|
+
}
|
|
4488
|
+
return "";
|
|
4489
|
+
});
|
|
4490
|
+
const isTouchable = () => state.status !== "loading" && !disabled.value;
|
|
4491
|
+
const setStatus = (distance, isLoading) => {
|
|
4492
|
+
state.distance = distance;
|
|
4493
|
+
if (isLoading) {
|
|
4494
|
+
state.status = "loading";
|
|
4495
|
+
} else if (distance === 0) {
|
|
4496
|
+
state.status = "normal";
|
|
4497
|
+
} else if (Math.abs(distance) < 50) {
|
|
4498
|
+
state.status = "pulling";
|
|
4499
|
+
} else {
|
|
4500
|
+
state.status = "loosing";
|
|
4501
|
+
}
|
|
4502
|
+
};
|
|
4503
|
+
const getParentElement = (el) => {
|
|
4504
|
+
if (containerId.value != "") {
|
|
4505
|
+
return document.querySelector(`#${containerId.value}`);
|
|
4506
|
+
}
|
|
4507
|
+
return el && el.parentNode;
|
|
4508
|
+
};
|
|
4509
|
+
onMounted(() => {
|
|
4510
|
+
const parentElement = getParentElement(scroller);
|
|
4511
|
+
let scrollElCopy = document.documentElement || document.body;
|
|
4512
|
+
if (useWindow.value === false) {
|
|
4513
|
+
scrollElCopy = parentElement;
|
|
4514
|
+
}
|
|
4515
|
+
scrollEl = scrollElCopy;
|
|
4516
|
+
});
|
|
4517
|
+
const ease = (distance) => {
|
|
4518
|
+
const headHeight = 50;
|
|
4519
|
+
if (distance > headHeight) {
|
|
4520
|
+
if (distance < headHeight * 2) {
|
|
4521
|
+
distance = headHeight + (distance - headHeight) / 2;
|
|
4522
|
+
} else {
|
|
4523
|
+
distance = headHeight * 1.5 + (distance - headHeight * 2) / 4;
|
|
4524
|
+
}
|
|
4525
|
+
}
|
|
4526
|
+
return Math.round(distance);
|
|
4527
|
+
};
|
|
4528
|
+
const refreshDone = () => {
|
|
4529
|
+
setStatus(0);
|
|
4530
|
+
};
|
|
4531
|
+
const touchStart = (event) => {
|
|
4532
|
+
if (isTouchable()) {
|
|
4533
|
+
if (direction.value == "vertical") {
|
|
4534
|
+
const top = "scrollTop" in scrollEl ? scrollEl.scrollTop : 0;
|
|
4535
|
+
reachTop.value = Math.max(top, 0) == 0 ? true : false;
|
|
4536
|
+
const { scrollHeight, clientHeight, scrollTop } = scrollEl;
|
|
4537
|
+
reachBottom.value = clientHeight + scrollTop == scrollHeight ? true : false;
|
|
4538
|
+
if (reachTop.value || reachBottom.value) {
|
|
4539
|
+
state.duration = 0;
|
|
4540
|
+
touch.start(event);
|
|
4541
|
+
}
|
|
4542
|
+
} else {
|
|
4543
|
+
const { scrollWidth, clientWidth, scrollLeft } = scrollEl;
|
|
4544
|
+
const left = "scrollLeft" in scrollEl ? scrollEl.scrollLeft : 0;
|
|
4545
|
+
reachLeft.value = Math.max(left, 0) == 0 ? true : false;
|
|
4546
|
+
reachRight.value = clientWidth + scrollLeft == scrollWidth ? true : false;
|
|
4547
|
+
if (reachLeft.value || reachRight.value) {
|
|
4548
|
+
state.duration = 0;
|
|
4549
|
+
touch.start(event);
|
|
4550
|
+
}
|
|
4551
|
+
}
|
|
4552
|
+
} else {
|
|
4553
|
+
preventDefault(event);
|
|
4554
|
+
}
|
|
4555
|
+
};
|
|
4556
|
+
const touchMove = (event) => {
|
|
4557
|
+
if (isTouchable()) {
|
|
4558
|
+
const { deltaY, deltaX } = touch;
|
|
4559
|
+
touch.move(event);
|
|
4560
|
+
if (direction.value == "vertical" && (reachBottom.value && deltaY.value < 0 || reachTop.value && deltaY.value >= 0) && touch.isVertical()) {
|
|
4561
|
+
preventDefault(event);
|
|
4562
|
+
setStatus(ease(deltaY.value));
|
|
4563
|
+
}
|
|
4564
|
+
if (direction.value == "horizontal" && (reachLeft.value && deltaX.value >= 0 || reachRight.value && deltaX.value < 0) && touch.isHorizontal()) {
|
|
4565
|
+
preventDefault(event);
|
|
4566
|
+
setStatus(ease(deltaX.value));
|
|
4567
|
+
}
|
|
4568
|
+
} else {
|
|
4569
|
+
preventDefault(event);
|
|
4570
|
+
}
|
|
4571
|
+
};
|
|
4572
|
+
const touchEnd = () => {
|
|
4573
|
+
if (isTouchable()) {
|
|
4574
|
+
const { deltaY, deltaX } = touch;
|
|
4575
|
+
if (state.status === "loosing") {
|
|
4576
|
+
let dis = 0;
|
|
4577
|
+
if (direction.value == "vertical" && reachTop.value && deltaY.value > 0) {
|
|
4578
|
+
dis = 50;
|
|
4579
|
+
emit("downRefresh", refreshDone);
|
|
4580
|
+
}
|
|
4581
|
+
if (direction.value == "vertical" && reachBottom.value && deltaY.value < 0) {
|
|
4582
|
+
dis = -50;
|
|
4583
|
+
emit("refresh", refreshDone);
|
|
4584
|
+
}
|
|
4585
|
+
if (direction.value == "horizontal" && reachLeft.value && deltaX.value > 0) {
|
|
4586
|
+
dis = 50;
|
|
4587
|
+
emit("downRefresh", refreshDone);
|
|
4588
|
+
}
|
|
4589
|
+
if (direction.value == "horizontal" && reachRight.value && deltaX.value < 0) {
|
|
4590
|
+
dis = -50;
|
|
4591
|
+
emit("refresh", refreshDone);
|
|
4592
|
+
}
|
|
4593
|
+
setStatus(dis, true);
|
|
4594
|
+
} else {
|
|
4595
|
+
setStatus(0);
|
|
4596
|
+
}
|
|
4597
|
+
}
|
|
4598
|
+
};
|
|
4599
|
+
return __spreadValues({
|
|
4600
|
+
scroller,
|
|
4601
|
+
touchStart,
|
|
4602
|
+
touchMove,
|
|
4603
|
+
touchEnd,
|
|
4604
|
+
getStyle,
|
|
4605
|
+
reachBottom,
|
|
4606
|
+
reachTop,
|
|
4607
|
+
reachRight,
|
|
4608
|
+
reachLeft,
|
|
4609
|
+
getBottomStyle,
|
|
4610
|
+
refreshTopTem,
|
|
4611
|
+
refreshBottomTem
|
|
4612
|
+
}, toRefs(state));
|
|
4613
|
+
}
|
|
4614
|
+
});
|
|
4615
|
+
const _hoisted_1$Q = {
|
|
4616
|
+
class: "pullrefresh-content",
|
|
4617
|
+
ref: "pull"
|
|
4618
|
+
};
|
|
4619
|
+
function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4620
|
+
return openBlock(), createElementBlock("view", {
|
|
4621
|
+
class: "nut-pullrefresh",
|
|
4622
|
+
ref: "scroller",
|
|
4623
|
+
style: normalizeStyle(_ctx.getStyle),
|
|
4624
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
|
|
4625
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.touchMove && _ctx.touchMove(...args)),
|
|
4626
|
+
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
|
|
4627
|
+
}, [
|
|
4628
|
+
createElementVNode("view", {
|
|
4629
|
+
class: normalizeClass(["pullrefresh-top", _ctx.direction == "horizontal" ? "pullrefresh-top-h" : "pullrefresh-top-v"])
|
|
4630
|
+
}, toDisplayString(_ctx.refreshTopTem), 3),
|
|
4631
|
+
createElementVNode("view", _hoisted_1$Q, [
|
|
4632
|
+
renderSlot(_ctx.$slots, "default")
|
|
4633
|
+
], 512),
|
|
4634
|
+
createElementVNode("view", {
|
|
4635
|
+
class: normalizeClass(["pullrefresh-bottom", _ctx.direction == "horizontal" ? "pullrefresh-bottom-h" : "pullrefresh-bottom-v"]),
|
|
4636
|
+
style: normalizeStyle(_ctx.getBottomStyle)
|
|
4637
|
+
}, toDisplayString(_ctx.refreshBottomTem), 7)
|
|
4638
|
+
], 36);
|
|
4639
|
+
}
|
|
4640
|
+
var PullRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Y]]);
|
|
4641
|
+
const { create: create$11, componentName: componentName$L } = createComponent("steps");
|
|
4642
|
+
const _sfc_main$11 = create$11({
|
|
4224
4643
|
props: {
|
|
4225
4644
|
direction: {
|
|
4226
4645
|
type: String,
|
|
@@ -4240,7 +4659,7 @@ const _sfc_main$$ = create$$({
|
|
|
4240
4659
|
children: []
|
|
4241
4660
|
});
|
|
4242
4661
|
const classes = computed(() => {
|
|
4243
|
-
const prefixCls = componentName$
|
|
4662
|
+
const prefixCls = componentName$L;
|
|
4244
4663
|
return {
|
|
4245
4664
|
[prefixCls]: true,
|
|
4246
4665
|
[`${prefixCls}-${props.direction}`]: true,
|
|
@@ -4263,8 +4682,8 @@ const _sfc_main$$ = create$$({
|
|
|
4263
4682
|
};
|
|
4264
4683
|
}
|
|
4265
4684
|
});
|
|
4266
|
-
const { create: create$
|
|
4267
|
-
const _sfc_main$
|
|
4685
|
+
const { create: create$10, componentName: componentName$K } = createComponent("step");
|
|
4686
|
+
const _sfc_main$10 = create$10({
|
|
4268
4687
|
props: {
|
|
4269
4688
|
title: {
|
|
4270
4689
|
type: String,
|
|
@@ -4305,7 +4724,7 @@ const _sfc_main$_ = create$_({
|
|
|
4305
4724
|
return getCurrentStatus();
|
|
4306
4725
|
});
|
|
4307
4726
|
const classes = computed(() => {
|
|
4308
|
-
const prefixCls = componentName$
|
|
4727
|
+
const prefixCls = componentName$K;
|
|
4309
4728
|
return {
|
|
4310
4729
|
[prefixCls]: true,
|
|
4311
4730
|
[`${prefixCls}-${status.value}`]: true
|
|
@@ -4317,22 +4736,22 @@ const _sfc_main$_ = create$_({
|
|
|
4317
4736
|
});
|
|
4318
4737
|
}
|
|
4319
4738
|
});
|
|
4320
|
-
const _hoisted_1$
|
|
4321
|
-
const _hoisted_2$
|
|
4322
|
-
const _hoisted_3$
|
|
4739
|
+
const _hoisted_1$P = { class: "nut-step-head" };
|
|
4740
|
+
const _hoisted_2$F = /* @__PURE__ */ createElementVNode("view", { class: "nut-step-line" }, null, -1);
|
|
4741
|
+
const _hoisted_3$w = {
|
|
4323
4742
|
key: 2,
|
|
4324
4743
|
class: "nut-step-inner"
|
|
4325
4744
|
};
|
|
4326
|
-
const _hoisted_4$
|
|
4327
|
-
const _hoisted_5$
|
|
4328
|
-
const _hoisted_6$
|
|
4329
|
-
function _sfc_render$
|
|
4745
|
+
const _hoisted_4$o = { class: "nut-step-main" };
|
|
4746
|
+
const _hoisted_5$f = { class: "nut-step-title" };
|
|
4747
|
+
const _hoisted_6$c = ["innerHTML"];
|
|
4748
|
+
function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4330
4749
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
4331
4750
|
return openBlock(), createElementBlock("view", {
|
|
4332
4751
|
class: normalizeClass(_ctx.classes)
|
|
4333
4752
|
}, [
|
|
4334
|
-
createElementVNode("view", _hoisted_1$
|
|
4335
|
-
_hoisted_2$
|
|
4753
|
+
createElementVNode("view", _hoisted_1$P, [
|
|
4754
|
+
_hoisted_2$F,
|
|
4336
4755
|
createElementVNode("view", {
|
|
4337
4756
|
class: normalizeClass(["nut-step-icon", [!_ctx.dot ? _ctx.icon ? "is-icon" : "is-text" : ""]])
|
|
4338
4757
|
}, [
|
|
@@ -4342,22 +4761,22 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4342
4761
|
color: _ctx.iconColor,
|
|
4343
4762
|
name: _ctx.icon,
|
|
4344
4763
|
size: _ctx.size
|
|
4345
|
-
}, null, 8, ["color", "name", "size"])) : _ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_3$
|
|
4764
|
+
}, null, 8, ["color", "name", "size"])) : _ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_3$w, toDisplayString(_ctx.index), 1))
|
|
4346
4765
|
], 2)
|
|
4347
4766
|
]),
|
|
4348
|
-
createElementVNode("view", _hoisted_4$
|
|
4349
|
-
createElementVNode("view", _hoisted_5$
|
|
4767
|
+
createElementVNode("view", _hoisted_4$o, [
|
|
4768
|
+
createElementVNode("view", _hoisted_5$f, toDisplayString(_ctx.title), 1),
|
|
4350
4769
|
_ctx.content ? (openBlock(), createElementBlock("view", {
|
|
4351
4770
|
key: 0,
|
|
4352
4771
|
class: "nut-step-content",
|
|
4353
4772
|
innerHTML: _ctx.content
|
|
4354
|
-
}, null, 8, _hoisted_6$
|
|
4773
|
+
}, null, 8, _hoisted_6$c)) : createCommentVNode("", true)
|
|
4355
4774
|
])
|
|
4356
4775
|
], 2);
|
|
4357
4776
|
}
|
|
4358
|
-
var Step = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4359
|
-
const { componentName: componentName$
|
|
4360
|
-
const _sfc_main
|
|
4777
|
+
var Step = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$X]]);
|
|
4778
|
+
const { componentName: componentName$J, create: create$$ } = createComponent("switch");
|
|
4779
|
+
const _sfc_main$$ = create$$({
|
|
4361
4780
|
props: {
|
|
4362
4781
|
modelValue: {
|
|
4363
4782
|
type: [String, Number, Boolean],
|
|
@@ -4408,11 +4827,11 @@ const _sfc_main$Z = create$Z({
|
|
|
4408
4827
|
default: ""
|
|
4409
4828
|
}
|
|
4410
4829
|
},
|
|
4411
|
-
emits: ["change", "update:modelValue"],
|
|
4830
|
+
emits: ["change", "update:modelValue", "update:loading"],
|
|
4412
4831
|
setup(props, { emit }) {
|
|
4413
4832
|
const isActive = computed(() => props.modelValue === props.activeValue);
|
|
4414
4833
|
const classes = computed(() => {
|
|
4415
|
-
const prefixCls = componentName$
|
|
4834
|
+
const prefixCls = componentName$J;
|
|
4416
4835
|
return {
|
|
4417
4836
|
[prefixCls]: true,
|
|
4418
4837
|
[isActive.value ? "switch-open" : "switch-close"]: true,
|
|
@@ -4440,15 +4859,15 @@ const _sfc_main$Z = create$Z({
|
|
|
4440
4859
|
};
|
|
4441
4860
|
}
|
|
4442
4861
|
});
|
|
4443
|
-
const _hoisted_1$
|
|
4444
|
-
function _sfc_render$
|
|
4862
|
+
const _hoisted_1$O = { class: "switch-button" };
|
|
4863
|
+
function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4445
4864
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
4446
4865
|
return openBlock(), createElementBlock("view", {
|
|
4447
4866
|
class: normalizeClass(_ctx.classes),
|
|
4448
4867
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
4449
4868
|
style: normalizeStyle(_ctx.style)
|
|
4450
4869
|
}, [
|
|
4451
|
-
createElementVNode("view", _hoisted_1$
|
|
4870
|
+
createElementVNode("view", _hoisted_1$O, [
|
|
4452
4871
|
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
4453
4872
|
key: 0,
|
|
4454
4873
|
name: _ctx.name,
|
|
@@ -4466,11 +4885,11 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4466
4885
|
])
|
|
4467
4886
|
], 6);
|
|
4468
4887
|
}
|
|
4469
|
-
var Switch = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
4470
|
-
const { create: create$
|
|
4471
|
-
const _sfc_main$
|
|
4888
|
+
var Switch = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$W]]);
|
|
4889
|
+
const { create: create$_ } = createComponent("toast");
|
|
4890
|
+
const _sfc_main$_ = create$_({
|
|
4472
4891
|
components: {
|
|
4473
|
-
[_sfc_main$
|
|
4892
|
+
[_sfc_main$1s.name]: _sfc_main$1s
|
|
4474
4893
|
},
|
|
4475
4894
|
props: {
|
|
4476
4895
|
id: String,
|
|
@@ -4596,16 +5015,16 @@ const _sfc_main$Y = create$Y({
|
|
|
4596
5015
|
};
|
|
4597
5016
|
}
|
|
4598
5017
|
});
|
|
4599
|
-
const _hoisted_1$
|
|
5018
|
+
const _hoisted_1$N = {
|
|
4600
5019
|
key: 0,
|
|
4601
5020
|
class: "nut-toast-icon-wrapper"
|
|
4602
5021
|
};
|
|
4603
|
-
const _hoisted_2$
|
|
5022
|
+
const _hoisted_2$E = {
|
|
4604
5023
|
key: 1,
|
|
4605
5024
|
class: "nut-toast-title"
|
|
4606
5025
|
};
|
|
4607
|
-
const _hoisted_3$
|
|
4608
|
-
function _sfc_render$
|
|
5026
|
+
const _hoisted_3$v = ["innerHTML"];
|
|
5027
|
+
function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4609
5028
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
4610
5029
|
return openBlock(), createBlock(Transition, {
|
|
4611
5030
|
name: "toast-fade",
|
|
@@ -4627,18 +5046,18 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4627
5046
|
"background-color": _ctx.bgColor
|
|
4628
5047
|
})
|
|
4629
5048
|
}, [
|
|
4630
|
-
_ctx.hasIcon ? (openBlock(), createElementBlock("view", _hoisted_1$
|
|
5049
|
+
_ctx.hasIcon ? (openBlock(), createElementBlock("view", _hoisted_1$N, [
|
|
4631
5050
|
createVNode(_component_nut_icon, {
|
|
4632
5051
|
size: "20",
|
|
4633
5052
|
color: "#ffffff",
|
|
4634
5053
|
name: _ctx.icon
|
|
4635
5054
|
}, null, 8, ["name"])
|
|
4636
5055
|
])) : createCommentVNode("", true),
|
|
4637
|
-
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
5056
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2$E, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
4638
5057
|
createElementVNode("view", {
|
|
4639
5058
|
class: "nut-toast-text",
|
|
4640
5059
|
innerHTML: _ctx.msg
|
|
4641
|
-
}, null, 8, _hoisted_3$
|
|
5060
|
+
}, null, 8, _hoisted_3$v)
|
|
4642
5061
|
], 4)
|
|
4643
5062
|
], 6), [
|
|
4644
5063
|
[vShow, _ctx.state.mounted]
|
|
@@ -4647,7 +5066,7 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4647
5066
|
_: 1
|
|
4648
5067
|
}, 8, ["onAfterLeave"]);
|
|
4649
5068
|
}
|
|
4650
|
-
var Toast = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5069
|
+
var Toast = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$V]]);
|
|
4651
5070
|
const defaultOptions = {
|
|
4652
5071
|
msg: "",
|
|
4653
5072
|
id: "",
|
|
@@ -4764,8 +5183,8 @@ const ToastFunction = {
|
|
|
4764
5183
|
app.config.globalProperties.$toast = ToastFunction;
|
|
4765
5184
|
}
|
|
4766
5185
|
};
|
|
4767
|
-
const { create: create$
|
|
4768
|
-
const _sfc_main$
|
|
5186
|
+
const { create: create$Z } = createComponent("progress");
|
|
5187
|
+
const _sfc_main$Z = create$Z({
|
|
4769
5188
|
props: {
|
|
4770
5189
|
percentage: {
|
|
4771
5190
|
type: [Number, String],
|
|
@@ -4807,11 +5226,16 @@ const _sfc_main$X = create$X({
|
|
|
4807
5226
|
iconColor: {
|
|
4808
5227
|
type: String,
|
|
4809
5228
|
default: "#439422"
|
|
5229
|
+
},
|
|
5230
|
+
isShowPercentage: {
|
|
5231
|
+
type: Boolean,
|
|
5232
|
+
default: true
|
|
4810
5233
|
}
|
|
4811
5234
|
},
|
|
4812
5235
|
setup(props, { emit }) {
|
|
4813
5236
|
const height = ref(props.strokeWidth + "px");
|
|
4814
5237
|
const progressOuter = ref();
|
|
5238
|
+
const insideText = ref();
|
|
4815
5239
|
const left = ref();
|
|
4816
5240
|
const bgStyle = computed(() => {
|
|
4817
5241
|
return {
|
|
@@ -4824,32 +5248,39 @@ const _sfc_main$X = create$X({
|
|
|
4824
5248
|
color: props.textColor || ""
|
|
4825
5249
|
};
|
|
4826
5250
|
});
|
|
5251
|
+
const slideLeft = (values) => {
|
|
5252
|
+
if (props.textInside) {
|
|
5253
|
+
let offsetWidth = progressOuter.value.offsetWidth;
|
|
5254
|
+
let percentageWidth = progressOuter.value.offsetWidth * Number(values) * 0.01;
|
|
5255
|
+
let insideTextWidth = insideText.value.offsetWidth;
|
|
5256
|
+
left.value = percentageWidth - 5 + "px";
|
|
5257
|
+
if (offsetWidth == percentageWidth) {
|
|
5258
|
+
left.value = percentageWidth - insideTextWidth + "px";
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
};
|
|
4827
5262
|
watch(() => props.percentage, (values) => {
|
|
4828
|
-
|
|
4829
|
-
console.log("values", values);
|
|
4830
|
-
left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 5 + "px";
|
|
5263
|
+
slideLeft(values);
|
|
4831
5264
|
});
|
|
4832
5265
|
onMounted(() => {
|
|
4833
|
-
|
|
5266
|
+
slideLeft(props.percentage);
|
|
4834
5267
|
});
|
|
4835
5268
|
return {
|
|
4836
5269
|
height,
|
|
4837
5270
|
bgStyle,
|
|
4838
5271
|
textStyle,
|
|
4839
5272
|
progressOuter,
|
|
5273
|
+
insideText,
|
|
4840
5274
|
left
|
|
4841
5275
|
};
|
|
4842
5276
|
}
|
|
4843
5277
|
});
|
|
4844
|
-
const _hoisted_1$
|
|
4845
|
-
function _sfc_render$
|
|
5278
|
+
const _hoisted_1$M = { class: "nut-progress" };
|
|
5279
|
+
function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4846
5280
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
4847
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5281
|
+
return openBlock(), createElementBlock("div", _hoisted_1$M, [
|
|
4848
5282
|
createElementVNode("div", {
|
|
4849
|
-
class: normalizeClass(["nut-progress-outer", [
|
|
4850
|
-
_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "",
|
|
4851
|
-
_ctx.size ? "nut-progress-" + _ctx.size : ""
|
|
4852
|
-
]]),
|
|
5283
|
+
class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
|
|
4853
5284
|
ref: "progressOuter",
|
|
4854
5285
|
style: normalizeStyle({ height: _ctx.height })
|
|
4855
5286
|
}, [
|
|
@@ -4860,11 +5291,12 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4860
5291
|
_ctx.showText && _ctx.textInside ? (openBlock(), createElementBlock("div", {
|
|
4861
5292
|
key: 0,
|
|
4862
5293
|
class: "nut-progress-text nut-progress-insidetext",
|
|
5294
|
+
ref: "insideText",
|
|
4863
5295
|
style: normalizeStyle({ lineHeight: _ctx.height, left: _ctx.left })
|
|
4864
5296
|
}, [
|
|
4865
5297
|
createElementVNode("span", {
|
|
4866
5298
|
style: normalizeStyle(_ctx.textStyle)
|
|
4867
|
-
}, toDisplayString(_ctx.percentage) + "%", 5)
|
|
5299
|
+
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
|
|
4868
5300
|
], 4)) : createCommentVNode("", true)
|
|
4869
5301
|
], 6)
|
|
4870
5302
|
], 6),
|
|
@@ -4876,7 +5308,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4876
5308
|
_ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
|
|
4877
5309
|
key: 0,
|
|
4878
5310
|
style: normalizeStyle(_ctx.textStyle)
|
|
4879
|
-
}, toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
5311
|
+
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
4880
5312
|
key: 1,
|
|
4881
5313
|
size: "16px",
|
|
4882
5314
|
name: _ctx.iconName,
|
|
@@ -4885,9 +5317,9 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4885
5317
|
], 4)) : createCommentVNode("", true)
|
|
4886
5318
|
]);
|
|
4887
5319
|
}
|
|
4888
|
-
var Progress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4889
|
-
const { componentName: componentName$
|
|
4890
|
-
const _sfc_main$
|
|
5320
|
+
var Progress = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$U]]);
|
|
5321
|
+
const { componentName: componentName$I, create: create$Y } = createComponent("circleprogress");
|
|
5322
|
+
const _sfc_main$Y = create$Y({
|
|
4891
5323
|
props: {
|
|
4892
5324
|
progress: {
|
|
4893
5325
|
type: [Number, String],
|
|
@@ -4909,7 +5341,7 @@ const _sfc_main$W = create$W({
|
|
|
4909
5341
|
},
|
|
4910
5342
|
setup(props, { emit }) {
|
|
4911
5343
|
const classes = computed(() => {
|
|
4912
|
-
const prefixCls = componentName$
|
|
5344
|
+
const prefixCls = componentName$I;
|
|
4913
5345
|
return {
|
|
4914
5346
|
[prefixCls]: true
|
|
4915
5347
|
};
|
|
@@ -4943,11 +5375,11 @@ const _sfc_main$W = create$W({
|
|
|
4943
5375
|
};
|
|
4944
5376
|
}
|
|
4945
5377
|
});
|
|
4946
|
-
const _hoisted_1$
|
|
4947
|
-
const _hoisted_2$
|
|
4948
|
-
const _hoisted_3$
|
|
4949
|
-
const _hoisted_4$
|
|
4950
|
-
function _sfc_render$
|
|
5378
|
+
const _hoisted_1$L = ["height", "width"];
|
|
5379
|
+
const _hoisted_2$D = ["r", "cx", "cy", "stroke", "stroke-width"];
|
|
5380
|
+
const _hoisted_3$u = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
|
|
5381
|
+
const _hoisted_4$n = { class: "nut-circleprogress-content" };
|
|
5382
|
+
function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4951
5383
|
return openBlock(), createElementBlock("div", {
|
|
4952
5384
|
class: normalizeClass(_ctx.classes),
|
|
4953
5385
|
style: normalizeStyle({ height: _ctx.option.size + "px", width: _ctx.option.size + "px" })
|
|
@@ -4964,7 +5396,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4964
5396
|
stroke: _ctx.option.backColor,
|
|
4965
5397
|
"stroke-width": _ctx.option.strokeOutWidth,
|
|
4966
5398
|
fill: "none"
|
|
4967
|
-
}, null, 8, _hoisted_2$
|
|
5399
|
+
}, null, 8, _hoisted_2$D),
|
|
4968
5400
|
createElementVNode("circle", {
|
|
4969
5401
|
r: _ctx.option.radius,
|
|
4970
5402
|
cx: _ctx.option.cx,
|
|
@@ -4976,18 +5408,18 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4976
5408
|
transform: _ctx.option.startPosition,
|
|
4977
5409
|
"stroke-linecap": "round",
|
|
4978
5410
|
style: { "transition": "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
|
|
4979
|
-
}, null, 8, _hoisted_3$
|
|
4980
|
-
], 8, _hoisted_1$
|
|
4981
|
-
createElementVNode("div", _hoisted_4$
|
|
5411
|
+
}, null, 8, _hoisted_3$u)
|
|
5412
|
+
], 8, _hoisted_1$L)),
|
|
5413
|
+
createElementVNode("div", _hoisted_4$n, [
|
|
4982
5414
|
!_ctx.isAuto ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
4983
5415
|
createTextVNode(toDisplayString(_ctx.progress) + "%", 1)
|
|
4984
5416
|
]) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4985
5417
|
])
|
|
4986
5418
|
], 6);
|
|
4987
5419
|
}
|
|
4988
|
-
var CircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4989
|
-
const { componentName: componentName$
|
|
4990
|
-
const _sfc_main$
|
|
5420
|
+
var CircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$T]]);
|
|
5421
|
+
const { componentName: componentName$H, create: create$X } = createComponent("noticebar");
|
|
5422
|
+
const _sfc_main$X = create$X({
|
|
4991
5423
|
props: {
|
|
4992
5424
|
direction: {
|
|
4993
5425
|
type: String,
|
|
@@ -5053,7 +5485,6 @@ const _sfc_main$V = create$V({
|
|
|
5053
5485
|
},
|
|
5054
5486
|
emits: ["click", "close"],
|
|
5055
5487
|
setup(props, { emit, slots }) {
|
|
5056
|
-
console.log("componentName", componentName$F);
|
|
5057
5488
|
const wrap = ref(null);
|
|
5058
5489
|
const content = ref(null);
|
|
5059
5490
|
const state = reactive({
|
|
@@ -5070,7 +5501,7 @@ const _sfc_main$V = create$V({
|
|
|
5070
5501
|
keepAlive: false
|
|
5071
5502
|
});
|
|
5072
5503
|
const classes = computed(() => {
|
|
5073
|
-
const prefixCls = componentName$
|
|
5504
|
+
const prefixCls = componentName$H;
|
|
5074
5505
|
return {
|
|
5075
5506
|
[prefixCls]: true
|
|
5076
5507
|
};
|
|
@@ -5199,14 +5630,12 @@ const _sfc_main$V = create$V({
|
|
|
5199
5630
|
emit("close", state.scrollList[0]);
|
|
5200
5631
|
};
|
|
5201
5632
|
onMounted(() => {
|
|
5202
|
-
console.log(props.direction);
|
|
5203
5633
|
if (props.direction == "vertical") {
|
|
5204
5634
|
if (slots.default) {
|
|
5205
5635
|
state.scrollList = [].concat(slots.default()[0].children);
|
|
5206
5636
|
} else {
|
|
5207
5637
|
state.scrollList = [].concat(props.list);
|
|
5208
5638
|
}
|
|
5209
|
-
console.log(state.scrollList);
|
|
5210
5639
|
setTimeout(() => {
|
|
5211
5640
|
props.complexAm ? startRoll() : startRollEasy();
|
|
5212
5641
|
}, props.standTime);
|
|
@@ -5244,12 +5673,12 @@ const _sfc_main$V = create$V({
|
|
|
5244
5673
|
});
|
|
5245
5674
|
}
|
|
5246
5675
|
});
|
|
5247
|
-
const _hoisted_1$
|
|
5676
|
+
const _hoisted_1$K = {
|
|
5248
5677
|
ref: "wrap",
|
|
5249
5678
|
class: "wrap"
|
|
5250
5679
|
};
|
|
5251
|
-
const _hoisted_2$
|
|
5252
|
-
function _sfc_render$
|
|
5680
|
+
const _hoisted_2$C = ["onClick"];
|
|
5681
|
+
function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5253
5682
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
5254
5683
|
const _component_ScrollItem = resolveComponent("ScrollItem");
|
|
5255
5684
|
return openBlock(), createElementBlock("view", {
|
|
@@ -5273,7 +5702,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5273
5702
|
color: _ctx.color
|
|
5274
5703
|
}, null, 8, ["color"])) : createCommentVNode("", true)
|
|
5275
5704
|
], 4)) : createCommentVNode("", true),
|
|
5276
|
-
createElementVNode("view", _hoisted_1$
|
|
5705
|
+
createElementVNode("view", _hoisted_1$K, [
|
|
5277
5706
|
createElementVNode("view", {
|
|
5278
5707
|
ref: "content",
|
|
5279
5708
|
class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }]]),
|
|
@@ -5327,7 +5756,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5327
5756
|
key: index,
|
|
5328
5757
|
style: normalizeStyle({ height: _ctx.height }),
|
|
5329
5758
|
onClick: ($event) => _ctx.go(item)
|
|
5330
|
-
}, toDisplayString(item), 13, _hoisted_2$
|
|
5759
|
+
}, toDisplayString(item), 13, _hoisted_2$C);
|
|
5331
5760
|
}), 128))
|
|
5332
5761
|
], 4)),
|
|
5333
5762
|
createElementVNode("view", {
|
|
@@ -5344,9 +5773,9 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5344
5773
|
], 4)) : createCommentVNode("", true)
|
|
5345
5774
|
], 2);
|
|
5346
5775
|
}
|
|
5347
|
-
var NoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5348
|
-
const { create: create$
|
|
5349
|
-
const _sfc_main$
|
|
5776
|
+
var NoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$S]]);
|
|
5777
|
+
const { create: create$W } = createComponent("searchbar");
|
|
5778
|
+
const _sfc_main$W = create$W({
|
|
5350
5779
|
props: {
|
|
5351
5780
|
modelValue: {
|
|
5352
5781
|
type: [String, Number],
|
|
@@ -5437,41 +5866,41 @@ const _sfc_main$U = create$U({
|
|
|
5437
5866
|
});
|
|
5438
5867
|
}
|
|
5439
5868
|
});
|
|
5440
|
-
const _hoisted_1$
|
|
5869
|
+
const _hoisted_1$J = {
|
|
5441
5870
|
key: 0,
|
|
5442
5871
|
class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
|
|
5443
5872
|
};
|
|
5444
|
-
const _hoisted_2$
|
|
5873
|
+
const _hoisted_2$B = {
|
|
5445
5874
|
key: 0,
|
|
5446
5875
|
class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon"
|
|
5447
5876
|
};
|
|
5448
|
-
const _hoisted_3$
|
|
5449
|
-
const _hoisted_4$
|
|
5450
|
-
const _hoisted_5$
|
|
5877
|
+
const _hoisted_3$t = { class: "nut-searchbar__input-inner" };
|
|
5878
|
+
const _hoisted_4$m = ["type", "maxlength", "placeholder", "value"];
|
|
5879
|
+
const _hoisted_5$e = {
|
|
5451
5880
|
key: 1,
|
|
5452
5881
|
class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon"
|
|
5453
5882
|
};
|
|
5454
|
-
const _hoisted_6$
|
|
5883
|
+
const _hoisted_6$b = {
|
|
5455
5884
|
key: 1,
|
|
5456
5885
|
class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
|
|
5457
5886
|
};
|
|
5458
|
-
function _sfc_render$
|
|
5887
|
+
function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5459
5888
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
5460
5889
|
return openBlock(), createElementBlock("view", {
|
|
5461
5890
|
class: "nut-searchbar",
|
|
5462
5891
|
style: normalizeStyle(_ctx.searchbarStyle)
|
|
5463
5892
|
}, [
|
|
5464
|
-
_ctx.$slots.leftout ? (openBlock(), createElementBlock("view", _hoisted_1$
|
|
5893
|
+
_ctx.$slots.leftout ? (openBlock(), createElementBlock("view", _hoisted_1$J, [
|
|
5465
5894
|
renderSlot(_ctx.$slots, "leftout")
|
|
5466
5895
|
])) : createCommentVNode("", true),
|
|
5467
5896
|
createElementVNode("view", {
|
|
5468
5897
|
class: "nut-searchbar__search-input",
|
|
5469
5898
|
style: normalizeStyle(_ctx.inputSearchbarStyle)
|
|
5470
5899
|
}, [
|
|
5471
|
-
_ctx.$slots.leftin ? (openBlock(), createElementBlock("view", _hoisted_2$
|
|
5900
|
+
_ctx.$slots.leftin ? (openBlock(), createElementBlock("view", _hoisted_2$B, [
|
|
5472
5901
|
renderSlot(_ctx.$slots, "leftin")
|
|
5473
5902
|
])) : createCommentVNode("", true),
|
|
5474
|
-
createElementVNode("view", _hoisted_3$
|
|
5903
|
+
createElementVNode("view", _hoisted_3$t, [
|
|
5475
5904
|
createElementVNode("form", {
|
|
5476
5905
|
action: "#",
|
|
5477
5906
|
onSubmit: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
|
|
@@ -5485,7 +5914,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5485
5914
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
|
|
5486
5915
|
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
5487
5916
|
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
|
|
5488
|
-
}, null, 40, _hoisted_4$
|
|
5917
|
+
}, null, 40, _hoisted_4$m)
|
|
5489
5918
|
], 32),
|
|
5490
5919
|
_ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
|
|
5491
5920
|
key: 0,
|
|
@@ -5501,23 +5930,23 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5501
5930
|
[vShow, _ctx.modelValue.length > 0]
|
|
5502
5931
|
]) : createCommentVNode("", true)
|
|
5503
5932
|
]),
|
|
5504
|
-
_ctx.$slots.rightin ? (openBlock(), createElementBlock("view", _hoisted_5$
|
|
5933
|
+
_ctx.$slots.rightin ? (openBlock(), createElementBlock("view", _hoisted_5$e, [
|
|
5505
5934
|
renderSlot(_ctx.$slots, "rightin")
|
|
5506
5935
|
])) : createCommentVNode("", true)
|
|
5507
5936
|
], 4),
|
|
5508
|
-
_ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_6$
|
|
5937
|
+
_ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_6$b, [
|
|
5509
5938
|
renderSlot(_ctx.$slots, "rightout")
|
|
5510
5939
|
])) : createCommentVNode("", true)
|
|
5511
5940
|
], 4);
|
|
5512
5941
|
}
|
|
5513
|
-
var SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5514
|
-
const { componentName: componentName$
|
|
5942
|
+
var SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$R]]);
|
|
5943
|
+
const { componentName: componentName$G, create: create$V } = createComponent("empty");
|
|
5515
5944
|
const defaultStatus = {
|
|
5516
5945
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
5517
5946
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
5518
5947
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
5519
5948
|
};
|
|
5520
|
-
const _sfc_main$
|
|
5949
|
+
const _sfc_main$V = create$V({
|
|
5521
5950
|
props: {
|
|
5522
5951
|
image: {
|
|
5523
5952
|
type: String,
|
|
@@ -5551,31 +5980,389 @@ const _sfc_main$T = create$T({
|
|
|
5551
5980
|
};
|
|
5552
5981
|
}
|
|
5553
5982
|
});
|
|
5554
|
-
const _hoisted_1$
|
|
5555
|
-
const _hoisted_2$
|
|
5556
|
-
const _hoisted_3$
|
|
5983
|
+
const _hoisted_1$I = { class: "nut-empty" };
|
|
5984
|
+
const _hoisted_2$A = ["src"];
|
|
5985
|
+
const _hoisted_3$s = {
|
|
5557
5986
|
key: 1,
|
|
5558
5987
|
class: "nut-empty-description"
|
|
5559
5988
|
};
|
|
5560
|
-
function _sfc_render$
|
|
5561
|
-
return openBlock(), createElementBlock("view", _hoisted_1$
|
|
5989
|
+
function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5990
|
+
return openBlock(), createElementBlock("view", _hoisted_1$I, [
|
|
5562
5991
|
createElementVNode("view", {
|
|
5563
5992
|
class: "nut-empty-image",
|
|
5564
5993
|
style: normalizeStyle(_ctx.imgStyle)
|
|
5565
5994
|
}, [
|
|
5566
|
-
_ctx.$slots.image ? renderSlot(_ctx.$slots, "image", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5567
|
-
_ctx.imageUrl ? (openBlock(), createElementBlock("img", {
|
|
5568
|
-
key: 0,
|
|
5569
|
-
class: "img",
|
|
5570
|
-
src: _ctx.imageUrl
|
|
5571
|
-
}, null, 8, _hoisted_2$
|
|
5572
|
-
], 64))
|
|
5573
|
-
], 4),
|
|
5574
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("view", _hoisted_3$
|
|
5575
|
-
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
|
|
5995
|
+
_ctx.$slots.image ? renderSlot(_ctx.$slots, "image", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5996
|
+
_ctx.imageUrl ? (openBlock(), createElementBlock("img", {
|
|
5997
|
+
key: 0,
|
|
5998
|
+
class: "img",
|
|
5999
|
+
src: _ctx.imageUrl
|
|
6000
|
+
}, null, 8, _hoisted_2$A)) : createCommentVNode("", true)
|
|
6001
|
+
], 64))
|
|
6002
|
+
], 4),
|
|
6003
|
+
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("view", _hoisted_3$s, toDisplayString(_ctx.description), 1)),
|
|
6004
|
+
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
|
|
6005
|
+
]);
|
|
6006
|
+
}
|
|
6007
|
+
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$Q]]);
|
|
6008
|
+
const { componentName: componentName$F, create: create$U } = createComponent("audio");
|
|
6009
|
+
const _sfc_main$U = create$U({
|
|
6010
|
+
props: {
|
|
6011
|
+
url: {
|
|
6012
|
+
type: String,
|
|
6013
|
+
default() {
|
|
6014
|
+
return "";
|
|
6015
|
+
}
|
|
6016
|
+
},
|
|
6017
|
+
muted: {
|
|
6018
|
+
type: Boolean,
|
|
6019
|
+
default() {
|
|
6020
|
+
return false;
|
|
6021
|
+
}
|
|
6022
|
+
},
|
|
6023
|
+
autoplay: {
|
|
6024
|
+
type: Boolean,
|
|
6025
|
+
default() {
|
|
6026
|
+
return false;
|
|
6027
|
+
}
|
|
6028
|
+
},
|
|
6029
|
+
loop: {
|
|
6030
|
+
type: Boolean,
|
|
6031
|
+
default() {
|
|
6032
|
+
return false;
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6035
|
+
preload: {
|
|
6036
|
+
type: String,
|
|
6037
|
+
default() {
|
|
6038
|
+
return "auto";
|
|
6039
|
+
}
|
|
6040
|
+
},
|
|
6041
|
+
second: {
|
|
6042
|
+
type: Number,
|
|
6043
|
+
default() {
|
|
6044
|
+
return 0;
|
|
6045
|
+
}
|
|
6046
|
+
},
|
|
6047
|
+
type: {
|
|
6048
|
+
type: String,
|
|
6049
|
+
default() {
|
|
6050
|
+
return "progress";
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
},
|
|
6054
|
+
components: {},
|
|
6055
|
+
emits: ["fastBack", "play", "forward", "ended", "changeProgress", "mute"],
|
|
6056
|
+
setup(props, { emit }) {
|
|
6057
|
+
const audioRef = ref(null);
|
|
6058
|
+
const audioData = reactive({
|
|
6059
|
+
currentTime: 0,
|
|
6060
|
+
currentDuration: "00:00:00",
|
|
6061
|
+
percent: 0,
|
|
6062
|
+
duration: "00:00:00",
|
|
6063
|
+
second: 0,
|
|
6064
|
+
hanMuted: props.muted,
|
|
6065
|
+
playing: props.autoplay
|
|
6066
|
+
});
|
|
6067
|
+
onMounted(() => {
|
|
6068
|
+
var arr = ["webkitVisibilityState", "visibilitychange"];
|
|
6069
|
+
try {
|
|
6070
|
+
for (let i = 0; i < arr.length; i++) {
|
|
6071
|
+
document.addEventListener(arr[i], () => {
|
|
6072
|
+
if (document.hidden) {
|
|
6073
|
+
audioRef.value.pause();
|
|
6074
|
+
} else {
|
|
6075
|
+
if (audioData.playing) {
|
|
6076
|
+
setTimeout(() => {
|
|
6077
|
+
audioRef.value.play();
|
|
6078
|
+
}, 200);
|
|
6079
|
+
}
|
|
6080
|
+
}
|
|
6081
|
+
});
|
|
6082
|
+
}
|
|
6083
|
+
} catch (e) {
|
|
6084
|
+
console.log(e.message);
|
|
6085
|
+
}
|
|
6086
|
+
setTimeout(() => {
|
|
6087
|
+
if (props.autoplay) {
|
|
6088
|
+
if (audioRef.value && audioRef.value.paused) {
|
|
6089
|
+
audioRef.value.play();
|
|
6090
|
+
}
|
|
6091
|
+
}
|
|
6092
|
+
audioData.second = audioRef.value.duration;
|
|
6093
|
+
audioData.duration = formatSeconds(audioRef.value.duration);
|
|
6094
|
+
}, 500);
|
|
6095
|
+
});
|
|
6096
|
+
const onTimeupdate = (e) => {
|
|
6097
|
+
audioData.currentTime = parseInt(e.target.currentTime);
|
|
6098
|
+
};
|
|
6099
|
+
const fastBack = () => {
|
|
6100
|
+
audioData.currentTime--;
|
|
6101
|
+
audioRef.value.currentTime = audioData.currentTime;
|
|
6102
|
+
emit("fastBack", audioData.currentTime);
|
|
6103
|
+
};
|
|
6104
|
+
const changeStatus = () => {
|
|
6105
|
+
if (audioData.playing) {
|
|
6106
|
+
audioRef.value.pause();
|
|
6107
|
+
audioData.handPlaying = false;
|
|
6108
|
+
} else {
|
|
6109
|
+
audioRef.value.play();
|
|
6110
|
+
audioData.handPlaying = true;
|
|
6111
|
+
}
|
|
6112
|
+
audioData.playing = !audioData.playing;
|
|
6113
|
+
emit("play", audioData.playing);
|
|
6114
|
+
};
|
|
6115
|
+
const forward = () => {
|
|
6116
|
+
audioData.currentTime++;
|
|
6117
|
+
audioRef.value.currentTime = audioData.currentTime;
|
|
6118
|
+
emit("forward", audioData.currentTime);
|
|
6119
|
+
};
|
|
6120
|
+
const handle = (val) => {
|
|
6121
|
+
audioData.currentDuration = formatSeconds(val);
|
|
6122
|
+
audioData.percent = val / audioData.second * 100;
|
|
6123
|
+
};
|
|
6124
|
+
const audioEnd = () => {
|
|
6125
|
+
audioData.playing = false;
|
|
6126
|
+
emit("ended");
|
|
6127
|
+
};
|
|
6128
|
+
const progressChange = (val) => {
|
|
6129
|
+
audioRef.value.currentTime = audioData.second * val / 100;
|
|
6130
|
+
emit("changeProgress", audioRef.value.currentTime);
|
|
6131
|
+
};
|
|
6132
|
+
const handleMute = () => {
|
|
6133
|
+
audioData.hanMuted = !audioData.hanMuted;
|
|
6134
|
+
emit("mute", audioData.hanMuted);
|
|
6135
|
+
};
|
|
6136
|
+
const formatSeconds = (value) => {
|
|
6137
|
+
let theTime = parseInt(value);
|
|
6138
|
+
let theTime1 = 0;
|
|
6139
|
+
let theTime2 = 0;
|
|
6140
|
+
if (theTime > 60) {
|
|
6141
|
+
theTime1 = parseInt(theTime / 60);
|
|
6142
|
+
theTime = parseInt(theTime % 60);
|
|
6143
|
+
if (theTime1 > 60) {
|
|
6144
|
+
theTime2 = parseInt(theTime1 / 60);
|
|
6145
|
+
theTime1 = parseInt(theTime1 % 60);
|
|
6146
|
+
}
|
|
6147
|
+
}
|
|
6148
|
+
let result = "" + parseInt(theTime);
|
|
6149
|
+
if (result < 10) {
|
|
6150
|
+
result = "0" + result;
|
|
6151
|
+
}
|
|
6152
|
+
if (theTime1 > 0) {
|
|
6153
|
+
result = "" + parseInt(theTime1) + ":" + result;
|
|
6154
|
+
if (theTime1 < 10) {
|
|
6155
|
+
result = "0" + result;
|
|
6156
|
+
}
|
|
6157
|
+
} else {
|
|
6158
|
+
result = "00:" + result;
|
|
6159
|
+
}
|
|
6160
|
+
if (theTime2 > 0) {
|
|
6161
|
+
result = "" + parseInt(theTime2) + ":" + result;
|
|
6162
|
+
if (theTime2 < 10) {
|
|
6163
|
+
result = "0" + result;
|
|
6164
|
+
}
|
|
6165
|
+
} else {
|
|
6166
|
+
result = "00:" + result;
|
|
6167
|
+
}
|
|
6168
|
+
return result;
|
|
6169
|
+
};
|
|
6170
|
+
watch(() => audioData.currentTime, (value) => {
|
|
6171
|
+
handle(value);
|
|
6172
|
+
});
|
|
6173
|
+
provide("audioParent", {
|
|
6174
|
+
children: [],
|
|
6175
|
+
props,
|
|
6176
|
+
audioData,
|
|
6177
|
+
handleMute,
|
|
6178
|
+
forward,
|
|
6179
|
+
fastBack,
|
|
6180
|
+
changeStatus
|
|
6181
|
+
});
|
|
6182
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(audioData)), {
|
|
6183
|
+
audioRef,
|
|
6184
|
+
fastBack,
|
|
6185
|
+
forward,
|
|
6186
|
+
changeStatus,
|
|
6187
|
+
progressChange,
|
|
6188
|
+
audioEnd,
|
|
6189
|
+
onTimeupdate,
|
|
6190
|
+
handleMute
|
|
6191
|
+
});
|
|
6192
|
+
}
|
|
6193
|
+
});
|
|
6194
|
+
const _hoisted_1$H = { class: "nut-audio" };
|
|
6195
|
+
const _hoisted_2$z = {
|
|
6196
|
+
key: 0,
|
|
6197
|
+
class: "progress-wrapper"
|
|
6198
|
+
};
|
|
6199
|
+
const _hoisted_3$r = { class: "time" };
|
|
6200
|
+
const _hoisted_4$l = { class: "progress-bar-wrapper" };
|
|
6201
|
+
const _hoisted_5$d = /* @__PURE__ */ createElementVNode("div", { class: "custom-button" }, null, -1);
|
|
6202
|
+
const _hoisted_6$a = { class: "time" };
|
|
6203
|
+
const _hoisted_7$8 = {
|
|
6204
|
+
key: 1,
|
|
6205
|
+
class: "nut-audio-icon"
|
|
6206
|
+
};
|
|
6207
|
+
const _hoisted_8$8 = ["controls", "src", "preload", "autoplay", "loop", "muted"];
|
|
6208
|
+
function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6209
|
+
const _component_nut_range = resolveComponent("nut-range");
|
|
6210
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
6211
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
6212
|
+
_ctx.type == "progress" ? (openBlock(), createElementBlock("div", _hoisted_2$z, [
|
|
6213
|
+
createElementVNode("div", _hoisted_3$r, toDisplayString(_ctx.currentDuration), 1),
|
|
6214
|
+
createElementVNode("div", _hoisted_4$l, [
|
|
6215
|
+
createVNode(_component_nut_range, {
|
|
6216
|
+
modelValue: _ctx.percent,
|
|
6217
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.percent = $event),
|
|
6218
|
+
"hidden-range": "",
|
|
6219
|
+
onChange: _ctx.progressChange,
|
|
6220
|
+
"inactive-color": "#cccccc",
|
|
6221
|
+
"active-color": "#fa2c19"
|
|
6222
|
+
}, {
|
|
6223
|
+
button: withCtx(() => [
|
|
6224
|
+
_hoisted_5$d
|
|
6225
|
+
]),
|
|
6226
|
+
_: 1
|
|
6227
|
+
}, 8, ["modelValue", "onChange"])
|
|
6228
|
+
]),
|
|
6229
|
+
createElementVNode("div", _hoisted_6$a, toDisplayString(_ctx.duration), 1)
|
|
6230
|
+
])) : createCommentVNode("", true),
|
|
6231
|
+
_ctx.type == "icon" ? (openBlock(), createElementBlock("div", _hoisted_7$8, [
|
|
6232
|
+
createElementVNode("div", {
|
|
6233
|
+
class: normalizeClass(["nut-audio-icon-box", _ctx.playing ? "nut-audio-icon-play" : "nut-audio-icon-stop"]),
|
|
6234
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
6235
|
+
}, [
|
|
6236
|
+
_ctx.playing ? (openBlock(), createBlock(_component_nut_icon, {
|
|
6237
|
+
key: 0,
|
|
6238
|
+
name: "service",
|
|
6239
|
+
class: "nut-icon-am-rotate nut-icon-am-infinite"
|
|
6240
|
+
})) : createCommentVNode("", true),
|
|
6241
|
+
!_ctx.playing ? (openBlock(), createBlock(_component_nut_icon, {
|
|
6242
|
+
key: 1,
|
|
6243
|
+
name: "service"
|
|
6244
|
+
})) : createCommentVNode("", true)
|
|
6245
|
+
], 2)
|
|
6246
|
+
])) : createCommentVNode("", true),
|
|
6247
|
+
_ctx.type == "none" ? (openBlock(), createElementBlock("div", {
|
|
6248
|
+
key: 2,
|
|
6249
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
6250
|
+
}, [
|
|
6251
|
+
renderSlot(_ctx.$slots, "default")
|
|
6252
|
+
])) : createCommentVNode("", true),
|
|
6253
|
+
_ctx.type != "none" ? renderSlot(_ctx.$slots, "default", { key: 3 }) : createCommentVNode("", true),
|
|
6254
|
+
createElementVNode("audio", {
|
|
6255
|
+
class: "audioMain",
|
|
6256
|
+
controls: _ctx.type == "controls",
|
|
6257
|
+
ref: "audioRef",
|
|
6258
|
+
src: _ctx.url,
|
|
6259
|
+
preload: _ctx.preload,
|
|
6260
|
+
autoplay: _ctx.autoplay,
|
|
6261
|
+
loop: _ctx.loop,
|
|
6262
|
+
onTimeupdate: _cache[3] || (_cache[3] = (...args) => _ctx.onTimeupdate && _ctx.onTimeupdate(...args)),
|
|
6263
|
+
onEnded: _cache[4] || (_cache[4] = (...args) => _ctx.audioEnd && _ctx.audioEnd(...args)),
|
|
6264
|
+
muted: _ctx.hanMuted
|
|
6265
|
+
}, null, 40, _hoisted_8$8)
|
|
6266
|
+
]);
|
|
6267
|
+
}
|
|
6268
|
+
var Audio = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$P]]);
|
|
6269
|
+
const { componentName: componentName$E, create: create$T } = createComponent("audio-operate");
|
|
6270
|
+
const _sfc_main$T = create$T({
|
|
6271
|
+
props: {
|
|
6272
|
+
type: {
|
|
6273
|
+
type: Array,
|
|
6274
|
+
default() {
|
|
6275
|
+
return "play";
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
},
|
|
6279
|
+
components: {},
|
|
6280
|
+
emits: ["click"],
|
|
6281
|
+
setup(props, { emit }) {
|
|
6282
|
+
const audio = inject("audioParent");
|
|
6283
|
+
const parent = reactive(audio);
|
|
6284
|
+
const customSlot = ref(useSlots().default);
|
|
6285
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(parent)), { customSlot });
|
|
6286
|
+
}
|
|
6287
|
+
});
|
|
6288
|
+
const _hoisted_1$G = { class: "nut-audio-operate" };
|
|
6289
|
+
const _hoisted_2$y = /* @__PURE__ */ createTextVNode("\u5012\u9000");
|
|
6290
|
+
const _hoisted_3$q = /* @__PURE__ */ createTextVNode("\u5FEB\u8FDB");
|
|
6291
|
+
const _hoisted_4$k = /* @__PURE__ */ createTextVNode("\u9759\u97F3");
|
|
6292
|
+
function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6293
|
+
const _component_nut_button = resolveComponent("nut-button");
|
|
6294
|
+
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
6295
|
+
_ctx.type == "back" ? (openBlock(), createElementBlock("div", {
|
|
6296
|
+
key: 0,
|
|
6297
|
+
class: "nut-audio-operate-item",
|
|
6298
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
|
|
6299
|
+
}, [
|
|
6300
|
+
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
6301
|
+
key: 0,
|
|
6302
|
+
type: "primary",
|
|
6303
|
+
size: "small"
|
|
6304
|
+
}, {
|
|
6305
|
+
default: withCtx(() => [
|
|
6306
|
+
_hoisted_2$y
|
|
6307
|
+
]),
|
|
6308
|
+
_: 1
|
|
6309
|
+
})) : createCommentVNode("", true),
|
|
6310
|
+
renderSlot(_ctx.$slots, "default")
|
|
6311
|
+
])) : createCommentVNode("", true),
|
|
6312
|
+
_ctx.type == "play" ? (openBlock(), createElementBlock("div", {
|
|
6313
|
+
key: 1,
|
|
6314
|
+
class: "nut-audio-operate-item",
|
|
6315
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
6316
|
+
}, [
|
|
6317
|
+
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
6318
|
+
key: 0,
|
|
6319
|
+
type: "primary",
|
|
6320
|
+
size: "small"
|
|
6321
|
+
}, {
|
|
6322
|
+
default: withCtx(() => [
|
|
6323
|
+
createTextVNode(toDisplayString(!_ctx.audioData.playing ? "\u5F00\u59CB" : "\u6682\u505C"), 1)
|
|
6324
|
+
]),
|
|
6325
|
+
_: 1
|
|
6326
|
+
})) : createCommentVNode("", true),
|
|
6327
|
+
renderSlot(_ctx.$slots, "default")
|
|
6328
|
+
])) : createCommentVNode("", true),
|
|
6329
|
+
_ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
|
|
6330
|
+
key: 2,
|
|
6331
|
+
class: "nut-audio-operate-item",
|
|
6332
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
|
|
6333
|
+
}, [
|
|
6334
|
+
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
6335
|
+
key: 0,
|
|
6336
|
+
type: "primary",
|
|
6337
|
+
size: "small"
|
|
6338
|
+
}, {
|
|
6339
|
+
default: withCtx(() => [
|
|
6340
|
+
_hoisted_3$q
|
|
6341
|
+
]),
|
|
6342
|
+
_: 1
|
|
6343
|
+
})) : createCommentVNode("", true),
|
|
6344
|
+
renderSlot(_ctx.$slots, "default")
|
|
6345
|
+
])) : createCommentVNode("", true),
|
|
6346
|
+
_ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
|
|
6347
|
+
key: 3,
|
|
6348
|
+
class: "nut-audio-operate-item",
|
|
6349
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
|
|
6350
|
+
}, [
|
|
6351
|
+
!_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
|
|
6352
|
+
key: 0,
|
|
6353
|
+
type: !_ctx.audioData.hanMuted ? "primary" : "default",
|
|
6354
|
+
size: "small"
|
|
6355
|
+
}, {
|
|
6356
|
+
default: withCtx(() => [
|
|
6357
|
+
_hoisted_4$k
|
|
6358
|
+
]),
|
|
6359
|
+
_: 1
|
|
6360
|
+
}, 8, ["type"])) : createCommentVNode("", true),
|
|
6361
|
+
renderSlot(_ctx.$slots, "default")
|
|
6362
|
+
])) : createCommentVNode("", true)
|
|
5576
6363
|
]);
|
|
5577
6364
|
}
|
|
5578
|
-
var
|
|
6365
|
+
var AudioOperate = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$O]]);
|
|
5579
6366
|
const { componentName: componentName$D, create: create$S } = createComponent("navbar");
|
|
5580
6367
|
const _sfc_main$S = create$S({
|
|
5581
6368
|
props: {
|
|
@@ -5950,7 +6737,7 @@ const _sfc_main$P = create$P({
|
|
|
5950
6737
|
}
|
|
5951
6738
|
},
|
|
5952
6739
|
components: {
|
|
5953
|
-
[_sfc_main$
|
|
6740
|
+
[_sfc_main$1s.name]: _sfc_main$1s,
|
|
5954
6741
|
[Popup.name]: Popup
|
|
5955
6742
|
},
|
|
5956
6743
|
emits: ["update:modelValue", "change"],
|
|
@@ -6309,7 +7096,8 @@ const _sfc_main$M = create$M({
|
|
|
6309
7096
|
y2: 0
|
|
6310
7097
|
},
|
|
6311
7098
|
scrollStart: false,
|
|
6312
|
-
currentIndex: 0
|
|
7099
|
+
currentIndex: 0,
|
|
7100
|
+
currentData: {}
|
|
6313
7101
|
});
|
|
6314
7102
|
const classes = computed(() => {
|
|
6315
7103
|
const prefixCls = componentName$z;
|
|
@@ -6369,7 +7157,6 @@ const _sfc_main$M = create$M({
|
|
|
6369
7157
|
state.touchState.y1 = firstTouch.pageY;
|
|
6370
7158
|
state.anchorIndex = +index;
|
|
6371
7159
|
state.currentIndex = +index;
|
|
6372
|
-
console.log(state.currentIndex);
|
|
6373
7160
|
scrollTo(+index);
|
|
6374
7161
|
};
|
|
6375
7162
|
const touchMove = (e) => {
|
|
@@ -6384,10 +7171,14 @@ const _sfc_main$M = create$M({
|
|
|
6384
7171
|
};
|
|
6385
7172
|
const handleClickItem = (key, item) => {
|
|
6386
7173
|
context.emit("click-item", key, item);
|
|
7174
|
+
state.currentData = item;
|
|
6387
7175
|
};
|
|
6388
7176
|
const handleClickIndex = (key) => {
|
|
6389
7177
|
context.emit("click-index", key);
|
|
6390
7178
|
};
|
|
7179
|
+
useExpose({
|
|
7180
|
+
scrollTo
|
|
7181
|
+
});
|
|
6391
7182
|
return __spreadProps(__spreadValues({
|
|
6392
7183
|
classes
|
|
6393
7184
|
}, toRefs(state)), {
|
|
@@ -6424,11 +7215,11 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6424
7215
|
createElementVNode("view", _hoisted_1$A, toDisplayString(item[_ctx.acceptKey]), 1),
|
|
6425
7216
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
|
|
6426
7217
|
return openBlock(), createElementBlock("view", {
|
|
6427
|
-
class: "nut-elevator__list__item__name",
|
|
7218
|
+
class: normalizeClass(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id }]),
|
|
6428
7219
|
key: subitem["id"],
|
|
6429
7220
|
onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
|
|
6430
7221
|
innerHTML: subitem.name
|
|
6431
|
-
}, null,
|
|
7222
|
+
}, null, 10, _hoisted_2$t);
|
|
6432
7223
|
}), 128))
|
|
6433
7224
|
]);
|
|
6434
7225
|
}), 128))
|
|
@@ -7440,12 +8231,36 @@ const _sfc_main$C = create$C({
|
|
|
7440
8231
|
type: Boolean,
|
|
7441
8232
|
default: true
|
|
7442
8233
|
},
|
|
8234
|
+
showTitle: {
|
|
8235
|
+
type: Boolean,
|
|
8236
|
+
default: true
|
|
8237
|
+
},
|
|
8238
|
+
showSubTitle: {
|
|
8239
|
+
type: Boolean,
|
|
8240
|
+
default: true
|
|
8241
|
+
},
|
|
8242
|
+
showToday: {
|
|
8243
|
+
type: Boolean,
|
|
8244
|
+
default: true
|
|
8245
|
+
},
|
|
7443
8246
|
title: {
|
|
7444
8247
|
type: String,
|
|
7445
8248
|
default: "\u65E5\u5386\u9009\u62E9"
|
|
7446
8249
|
},
|
|
7447
|
-
|
|
8250
|
+
confirmText: {
|
|
8251
|
+
type: String,
|
|
8252
|
+
default: "\u786E\u8BA4"
|
|
8253
|
+
},
|
|
8254
|
+
startText: {
|
|
8255
|
+
type: String,
|
|
8256
|
+
default: "\u5F00\u59CB"
|
|
8257
|
+
},
|
|
8258
|
+
endText: {
|
|
7448
8259
|
type: String,
|
|
8260
|
+
default: "\u7ED3\u675F"
|
|
8261
|
+
},
|
|
8262
|
+
defaultValue: {
|
|
8263
|
+
type: [String, Array],
|
|
7449
8264
|
default: null
|
|
7450
8265
|
},
|
|
7451
8266
|
startDate: {
|
|
@@ -7457,15 +8272,32 @@ const _sfc_main$C = create$C({
|
|
|
7457
8272
|
default: Utils.getDay(365)
|
|
7458
8273
|
}
|
|
7459
8274
|
},
|
|
7460
|
-
emits: ["choose", "update", "close"],
|
|
7461
|
-
setup(props, { emit }) {
|
|
8275
|
+
emits: ["choose", "update", "close", "select"],
|
|
8276
|
+
setup(props, { emit, slots }) {
|
|
7462
8277
|
const weeks = ref(["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"]);
|
|
7463
8278
|
const months = ref(null);
|
|
7464
8279
|
const monthsPanel = ref(null);
|
|
7465
8280
|
const weeksPanel = ref(null);
|
|
8281
|
+
const viewArea = ref(null);
|
|
8282
|
+
const viewHeight = ref(0);
|
|
8283
|
+
const compConthsData = computed(() => {
|
|
8284
|
+
return state.monthsData.slice(state.defaultRange[0], state.defaultRange[1]);
|
|
8285
|
+
});
|
|
8286
|
+
const showTopBtn = computed(() => {
|
|
8287
|
+
return slots.btn;
|
|
8288
|
+
});
|
|
8289
|
+
const topInfo = computed(() => {
|
|
8290
|
+
return slots.topInfo;
|
|
8291
|
+
});
|
|
8292
|
+
const bottomInfo = computed(() => {
|
|
8293
|
+
return slots.bottomInfo;
|
|
8294
|
+
});
|
|
7466
8295
|
const state = reactive({
|
|
7467
8296
|
yearMonthTitle: "",
|
|
8297
|
+
defaultRange: [],
|
|
7468
8298
|
currDate: "",
|
|
8299
|
+
propStartDate: "",
|
|
8300
|
+
propEndDate: "",
|
|
7469
8301
|
unLoadPrev: false,
|
|
7470
8302
|
touchParams: {
|
|
7471
8303
|
startY: 0,
|
|
@@ -7485,7 +8317,10 @@ const _sfc_main$C = create$C({
|
|
|
7485
8317
|
startData: "",
|
|
7486
8318
|
endData: "",
|
|
7487
8319
|
isRange: props.type === "range",
|
|
7488
|
-
timer: 0
|
|
8320
|
+
timer: 0,
|
|
8321
|
+
currentIndex: 0,
|
|
8322
|
+
avgHeight: 0,
|
|
8323
|
+
monthsNum: 0
|
|
7489
8324
|
});
|
|
7490
8325
|
const splitDate = (date) => {
|
|
7491
8326
|
return date.split("-");
|
|
@@ -7497,14 +8332,14 @@ const _sfc_main$C = create$C({
|
|
|
7497
8332
|
return Utils.isEqual(state.currDate[1], currDate);
|
|
7498
8333
|
};
|
|
7499
8334
|
const getCurrDate = (day, month, isRange) => {
|
|
7500
|
-
return
|
|
8335
|
+
return month.curData[0] + "-" + month.curData[1] + "-" + Utils.getNumTwoBit(+day.day);
|
|
7501
8336
|
};
|
|
7502
8337
|
const getClass = (day, month, isRange) => {
|
|
7503
|
-
const currDate = getCurrDate(day, month
|
|
8338
|
+
const currDate = getCurrDate(day, month);
|
|
7504
8339
|
if (day.type == "curr") {
|
|
7505
8340
|
if (!state.isRange && Utils.isEqual(state.currDate, currDate) || state.isRange && (isStart(currDate) || isEnd(currDate))) {
|
|
7506
8341
|
return `${state.dayPrefix}-active`;
|
|
7507
|
-
} else if (
|
|
8342
|
+
} else if (state.propStartDate && Utils.compareDate(currDate, state.propStartDate) || state.propEndDate && Utils.compareDate(state.propEndDate, currDate)) {
|
|
7508
8343
|
return `${state.dayPrefix}-disabled`;
|
|
7509
8344
|
} else if (state.isRange && Array.isArray(state.currDate) && Object.values(state.currDate).length == 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
|
|
7510
8345
|
return `${state.dayPrefix}-choose`;
|
|
@@ -7524,9 +8359,8 @@ const _sfc_main$C = create$C({
|
|
|
7524
8359
|
}
|
|
7525
8360
|
};
|
|
7526
8361
|
const chooseDay = (day, month, isFirst, isRange) => {
|
|
7527
|
-
if (getClass(day, month
|
|
8362
|
+
if (getClass(day, month) != `${state.dayPrefix}-disabled`) {
|
|
7528
8363
|
let days = [...month.curData];
|
|
7529
|
-
days = isRange ? days.splice(3) : days.splice(0, 3);
|
|
7530
8364
|
days[2] = typeof day.day == "number" ? Utils.getNumTwoBit(day.day) : day.day;
|
|
7531
8365
|
days[3] = `${days[0]}-${days[1]}-${days[2]}`;
|
|
7532
8366
|
days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
|
|
@@ -7553,8 +8387,11 @@ const _sfc_main$C = create$C({
|
|
|
7553
8387
|
}
|
|
7554
8388
|
}
|
|
7555
8389
|
}
|
|
7556
|
-
if (
|
|
7557
|
-
|
|
8390
|
+
if (!isFirst) {
|
|
8391
|
+
emit("select", state.chooseData);
|
|
8392
|
+
if (props.isAutoBackFill) {
|
|
8393
|
+
confirm();
|
|
8394
|
+
}
|
|
7558
8395
|
}
|
|
7559
8396
|
}
|
|
7560
8397
|
};
|
|
@@ -7572,26 +8409,47 @@ const _sfc_main$C = create$C({
|
|
|
7572
8409
|
month = month == 12 ? 1 : ++month;
|
|
7573
8410
|
break;
|
|
7574
8411
|
}
|
|
7575
|
-
return [
|
|
7576
|
-
year,
|
|
7577
|
-
Utils.getNumTwoBit(month),
|
|
7578
|
-
Utils.getMonthDays(String(year), String(month))
|
|
7579
|
-
];
|
|
8412
|
+
return [year, Utils.getNumTwoBit(month), Utils.getMonthDays(String(year), String(month))];
|
|
7580
8413
|
};
|
|
7581
|
-
const getDaysStatus = (days, type) => {
|
|
8414
|
+
const getDaysStatus = (days, type, dateInfo) => {
|
|
8415
|
+
let { year, month } = dateInfo;
|
|
7582
8416
|
if (type == "prev" && days >= 7) {
|
|
7583
8417
|
days -= 7;
|
|
7584
8418
|
}
|
|
7585
8419
|
return Array.from(Array(days), (v, k) => {
|
|
7586
8420
|
return {
|
|
7587
8421
|
day: k + 1,
|
|
7588
|
-
type
|
|
8422
|
+
type,
|
|
8423
|
+
year,
|
|
8424
|
+
month
|
|
8425
|
+
};
|
|
8426
|
+
});
|
|
8427
|
+
};
|
|
8428
|
+
const getPreDaysStatus = (days, type, dateInfo, preCurrMonthDays) => {
|
|
8429
|
+
let { year, month } = dateInfo;
|
|
8430
|
+
if (type == "prev" && days >= 7) {
|
|
8431
|
+
days -= 7;
|
|
8432
|
+
}
|
|
8433
|
+
let months2 = Array.from(Array(preCurrMonthDays), (v, k) => {
|
|
8434
|
+
return {
|
|
8435
|
+
day: k + 1,
|
|
8436
|
+
type,
|
|
8437
|
+
year,
|
|
8438
|
+
month
|
|
7589
8439
|
};
|
|
7590
8440
|
});
|
|
8441
|
+
return months2.slice(preCurrMonthDays - days);
|
|
7591
8442
|
};
|
|
7592
8443
|
const getMonth = (curData, type) => {
|
|
7593
8444
|
const preMonthDays = Utils.getMonthPreDay(+curData[0], +curData[1]);
|
|
8445
|
+
let preMonth = curData[1] - 1;
|
|
8446
|
+
let preYear = curData[0];
|
|
8447
|
+
if (preMonth <= 0) {
|
|
8448
|
+
preMonth = 12;
|
|
8449
|
+
preYear += 1;
|
|
8450
|
+
}
|
|
7594
8451
|
const currMonthDays = Utils.getMonthDays(curData[0], curData[1]);
|
|
8452
|
+
const preCurrMonthDays = Utils.getMonthDays(preYear + "", preMonth + "");
|
|
7595
8453
|
const title = {
|
|
7596
8454
|
year: curData[0],
|
|
7597
8455
|
month: curData[1]
|
|
@@ -7600,10 +8458,16 @@ const _sfc_main$C = create$C({
|
|
|
7600
8458
|
curData,
|
|
7601
8459
|
title: `${title.year}\u5E74${title.month}\u6708`,
|
|
7602
8460
|
monthData: [
|
|
7603
|
-
...
|
|
7604
|
-
...getDaysStatus(currMonthDays, "curr")
|
|
8461
|
+
...getPreDaysStatus(preMonthDays, "prev", { month: preMonth, year: preYear }, preCurrMonthDays),
|
|
8462
|
+
...getDaysStatus(currMonthDays, "curr", title)
|
|
7605
8463
|
]
|
|
7606
8464
|
};
|
|
8465
|
+
monthInfo.cssHeight = 39 + (monthInfo.monthData.length > 35 ? 384 : 320);
|
|
8466
|
+
let cssScrollHeight = 0;
|
|
8467
|
+
if (state.monthsData.length > 0) {
|
|
8468
|
+
cssScrollHeight = state.monthsData[state.monthsData.length - 1].cssScrollHeight + state.monthsData[state.monthsData.length - 1].cssHeight;
|
|
8469
|
+
}
|
|
8470
|
+
monthInfo.cssScrollHeight = cssScrollHeight;
|
|
7607
8471
|
if (type == "next") {
|
|
7608
8472
|
if (!state.endData || !Utils.compareDate(`${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`, `${curData[0]}-${curData[1]}-${curData[2]}`)) {
|
|
7609
8473
|
state.monthsData.push(monthInfo);
|
|
@@ -7617,44 +8481,97 @@ const _sfc_main$C = create$C({
|
|
|
7617
8481
|
}
|
|
7618
8482
|
};
|
|
7619
8483
|
const initData = () => {
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
8484
|
+
let propStartDate = props.startDate ? props.startDate : Utils.getDay(0);
|
|
8485
|
+
let propEndDate = props.endDate ? props.endDate : Utils.getDay(365);
|
|
8486
|
+
state.propStartDate = propStartDate;
|
|
8487
|
+
state.propEndDate = propEndDate;
|
|
8488
|
+
state.startData = splitDate(propStartDate);
|
|
8489
|
+
state.endData = splitDate(propEndDate);
|
|
8490
|
+
if (!props.defaultValue || Array.isArray(props.defaultValue) && props.defaultValue.length <= 0) {
|
|
7623
8491
|
state.currDate = state.isRange ? [Utils.date2Str(new Date()), Utils.getDay(1)] : Utils.date2Str(new Date());
|
|
7624
8492
|
} else {
|
|
7625
8493
|
state.currDate = state.isRange ? [...props.defaultValue] : props.defaultValue;
|
|
7626
8494
|
}
|
|
8495
|
+
const startDate = {
|
|
8496
|
+
year: Number(state.startData[0]),
|
|
8497
|
+
month: Number(state.startData[1])
|
|
8498
|
+
};
|
|
8499
|
+
const endDate = {
|
|
8500
|
+
year: Number(state.endData[0]),
|
|
8501
|
+
month: Number(state.endData[1])
|
|
8502
|
+
};
|
|
8503
|
+
let monthsNum = endDate.month - startDate.month;
|
|
8504
|
+
if (endDate.year - startDate.year > 0) {
|
|
8505
|
+
monthsNum = monthsNum + 12 * (endDate.year - startDate.year);
|
|
8506
|
+
}
|
|
8507
|
+
getMonth(state.startData, "next");
|
|
8508
|
+
let i = 1;
|
|
8509
|
+
do {
|
|
8510
|
+
getMonth(getCurrData("next"), "next");
|
|
8511
|
+
} while (i++ < monthsNum);
|
|
8512
|
+
state.monthsNum = monthsNum;
|
|
7627
8513
|
if (state.isRange && Array.isArray(state.currDate)) {
|
|
7628
|
-
if (
|
|
7629
|
-
state.currDate.splice(0, 1,
|
|
8514
|
+
if (propStartDate && Utils.compareDate(state.currDate[0], propStartDate)) {
|
|
8515
|
+
state.currDate.splice(0, 1, propStartDate);
|
|
7630
8516
|
}
|
|
7631
|
-
if (
|
|
7632
|
-
state.currDate.splice(1, 1,
|
|
8517
|
+
if (propEndDate && Utils.compareDate(propEndDate, state.currDate[1])) {
|
|
8518
|
+
state.currDate.splice(1, 1, propEndDate);
|
|
7633
8519
|
}
|
|
7634
|
-
state.defaultData = [
|
|
7635
|
-
...splitDate(state.currDate[0]),
|
|
7636
|
-
...splitDate(state.currDate[1])
|
|
7637
|
-
];
|
|
8520
|
+
state.defaultData = [...splitDate(state.currDate[0]), ...splitDate(state.currDate[1])];
|
|
7638
8521
|
} else {
|
|
7639
|
-
if (
|
|
7640
|
-
state.currDate =
|
|
7641
|
-
} else if (
|
|
7642
|
-
state.currDate =
|
|
8522
|
+
if (propStartDate && Utils.compareDate(state.currDate, propStartDate)) {
|
|
8523
|
+
state.currDate = propStartDate;
|
|
8524
|
+
} else if (propEndDate && !Utils.compareDate(state.currDate, propEndDate)) {
|
|
8525
|
+
state.currDate = propEndDate;
|
|
7643
8526
|
}
|
|
7644
8527
|
state.defaultData = [...splitDate(state.currDate)];
|
|
7645
8528
|
}
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
8529
|
+
let current = 0;
|
|
8530
|
+
let lastCurrent = 0;
|
|
8531
|
+
state.monthsData.forEach((item, index) => {
|
|
8532
|
+
if (item.title == `${state.defaultData[0]}\u5E74${state.defaultData[1]}\u6708`) {
|
|
8533
|
+
current = index;
|
|
8534
|
+
}
|
|
8535
|
+
if (state.isRange) {
|
|
8536
|
+
if (item.title == `${state.defaultData[3]}\u5E74${state.defaultData[4]}\u6708`) {
|
|
8537
|
+
lastCurrent = index;
|
|
8538
|
+
}
|
|
8539
|
+
}
|
|
8540
|
+
});
|
|
8541
|
+
setDefaultRange(monthsNum, current);
|
|
8542
|
+
state.currentIndex = current;
|
|
8543
|
+
state.yearMonthTitle = state.monthsData[state.currentIndex].title;
|
|
7652
8544
|
if (state.isRange) {
|
|
7653
|
-
chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[
|
|
7654
|
-
chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[
|
|
8545
|
+
chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
|
|
8546
|
+
chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[lastCurrent], true);
|
|
8547
|
+
} else {
|
|
8548
|
+
chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
|
|
8549
|
+
}
|
|
8550
|
+
let lastItem = state.monthsData[state.monthsData.length - 1];
|
|
8551
|
+
let containerHeight = lastItem.cssHeight + lastItem.cssScrollHeight;
|
|
8552
|
+
requestAniFrame$1(() => {
|
|
8553
|
+
if ((months == null ? void 0 : months.value) && (monthsPanel == null ? void 0 : monthsPanel.value) && (viewArea == null ? void 0 : viewArea.value)) {
|
|
8554
|
+
viewHeight.value = months.value.clientHeight;
|
|
8555
|
+
monthsPanel.value.style.height = `${containerHeight}px`;
|
|
8556
|
+
months.value.scrollTop = state.monthsData[state.currentIndex].cssScrollHeight;
|
|
8557
|
+
}
|
|
8558
|
+
});
|
|
8559
|
+
state.avgHeight = Math.floor(containerHeight / (monthsNum + 1));
|
|
8560
|
+
};
|
|
8561
|
+
const setDefaultRange = (monthsNum, current) => {
|
|
8562
|
+
if (monthsNum >= 3) {
|
|
8563
|
+
if (current > 0 && current < monthsNum) {
|
|
8564
|
+
state.defaultRange = [current - 1, current + 3];
|
|
8565
|
+
} else if (current == 0) {
|
|
8566
|
+
state.defaultRange = [current, current + 4];
|
|
8567
|
+
} else if (current == monthsNum) {
|
|
8568
|
+
state.defaultRange = [current - 2, current + 2];
|
|
8569
|
+
}
|
|
7655
8570
|
} else {
|
|
7656
|
-
|
|
8571
|
+
state.defaultRange = [0, monthsNum + 2];
|
|
7657
8572
|
}
|
|
8573
|
+
let defaultScrollTop = state.monthsData[state.defaultRange[0]].cssScrollHeight;
|
|
8574
|
+
state.translateY = defaultScrollTop;
|
|
7658
8575
|
};
|
|
7659
8576
|
const isActive = (day, month) => {
|
|
7660
8577
|
return state.isRange && day.type == "curr" && getClass(day, month) == "calendar-month-day-active";
|
|
@@ -7667,139 +8584,72 @@ const _sfc_main$C = create$C({
|
|
|
7667
8584
|
}
|
|
7668
8585
|
};
|
|
7669
8586
|
const isEndTip = (day, month) => {
|
|
7670
|
-
|
|
8587
|
+
if (state.currDate.length >= 2 && isEnd(getCurrDate(day, month))) {
|
|
8588
|
+
return isActive(day, month);
|
|
8589
|
+
}
|
|
8590
|
+
return false;
|
|
8591
|
+
};
|
|
8592
|
+
const rangeTip = (day, month) => {
|
|
8593
|
+
if (state.currDate.length >= 2) {
|
|
8594
|
+
return Utils.isEqual(state.currDate[0], state.currDate[1]);
|
|
8595
|
+
}
|
|
7671
8596
|
};
|
|
7672
8597
|
const isCurrDay = (month, day) => {
|
|
7673
8598
|
const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
|
|
7674
8599
|
return Utils.isEqual(date, Utils.date2Str(new Date()));
|
|
7675
8600
|
};
|
|
7676
|
-
const
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
const top = weeksPanel == null ? void 0 : weeksPanel.value.getBoundingClientRect().bottom;
|
|
7683
|
-
const monthsDoms = monthsPanel.value.getElementsByClassName("calendar-month");
|
|
7684
|
-
for (let i = 0; i < monthsDoms.length; i++) {
|
|
7685
|
-
if (monthsDoms[i].getBoundingClientRect().top <= top && monthsDoms[i].getBoundingClientRect().bottom >= top) {
|
|
7686
|
-
state.yearMonthTitle = state.monthsData[i].title;
|
|
7687
|
-
} else if (state.scrollDistance === 0) {
|
|
7688
|
-
state.yearMonthTitle = state.monthsData[0].title;
|
|
7689
|
-
}
|
|
7690
|
-
}
|
|
7691
|
-
}
|
|
7692
|
-
});
|
|
7693
|
-
};
|
|
7694
|
-
const setTransform = (translateY = 0, type, time = 1e3) => {
|
|
7695
|
-
if (monthsPanel == null ? void 0 : monthsPanel.value) {
|
|
7696
|
-
if (type === "end") {
|
|
7697
|
-
monthsPanel.value.style.webkitTransition = `transform ${time}ms cubic-bezier(0.19, 1, 0.22, 1)`;
|
|
7698
|
-
clearTimeout(state.timer);
|
|
7699
|
-
state.timer = setTimeout(() => {
|
|
7700
|
-
loadScroll();
|
|
7701
|
-
}, time);
|
|
7702
|
-
} else {
|
|
7703
|
-
monthsPanel.value.style.webkitTransition = "";
|
|
7704
|
-
loadScroll();
|
|
7705
|
-
}
|
|
7706
|
-
monthsPanel.value.style.webkitTransform = `translateY(${translateY}px)`;
|
|
7707
|
-
state.scrollDistance = translateY;
|
|
7708
|
-
}
|
|
7709
|
-
};
|
|
7710
|
-
const setMove = (move, type, time) => {
|
|
7711
|
-
var _a, _b;
|
|
7712
|
-
let updateMove = move + state.transformY;
|
|
7713
|
-
const h2 = ((_a = months.value) == null ? void 0 : _a.offsetHeight) || 0;
|
|
7714
|
-
const offsetHeight = ((_b = monthsPanel.value) == null ? void 0 : _b.offsetHeight) || 0;
|
|
7715
|
-
if (type === "end") {
|
|
7716
|
-
if (updateMove > 0) {
|
|
7717
|
-
updateMove = 0;
|
|
8601
|
+
const mothsViewScroll = (e) => {
|
|
8602
|
+
var currentScrollTop = e.target.scrollTop;
|
|
8603
|
+
let current = Math.floor(currentScrollTop / state.avgHeight);
|
|
8604
|
+
if (current == 0) {
|
|
8605
|
+
if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
|
|
8606
|
+
current += 1;
|
|
7718
8607
|
}
|
|
7719
|
-
|
|
7720
|
-
|
|
8608
|
+
} else if (current > 0 && current < state.monthsNum - 1) {
|
|
8609
|
+
if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
|
|
8610
|
+
current += 1;
|
|
7721
8611
|
}
|
|
7722
|
-
if (
|
|
7723
|
-
|
|
8612
|
+
if (currentScrollTop < state.monthsData[current].cssScrollHeight) {
|
|
8613
|
+
current -= 1;
|
|
7724
8614
|
}
|
|
7725
|
-
setTransform(updateMove, type, time);
|
|
7726
8615
|
} else {
|
|
7727
|
-
if (
|
|
7728
|
-
|
|
8616
|
+
if (currentScrollTop + viewHeight.value < state.monthsData[current].cssScrollHeight + state.monthsData[current].cssHeight) {
|
|
8617
|
+
current -= 1;
|
|
7729
8618
|
}
|
|
7730
|
-
if (
|
|
7731
|
-
|
|
8619
|
+
if (current + 1 <= state.monthsNum && currentScrollTop + viewHeight.value >= state.monthsData[current + 1].cssScrollHeight + state.monthsData[current + 1].cssHeight) {
|
|
8620
|
+
current += 1;
|
|
7732
8621
|
}
|
|
7733
|
-
if (
|
|
7734
|
-
|
|
7735
|
-
}
|
|
7736
|
-
setTransform(updateMove);
|
|
7737
|
-
}
|
|
7738
|
-
};
|
|
7739
|
-
const touchStart = (event) => {
|
|
7740
|
-
const changedTouches = event.changedTouches[0];
|
|
7741
|
-
state.touchParams.startY = changedTouches.pageY;
|
|
7742
|
-
state.touchParams.startTime = event.timeStamp || Date.now();
|
|
7743
|
-
state.transformY = state.scrollDistance;
|
|
7744
|
-
};
|
|
7745
|
-
const touchMove = (event) => {
|
|
7746
|
-
const changedTouches = event.changedTouches[0];
|
|
7747
|
-
state.touchParams.lastY = changedTouches.pageY;
|
|
7748
|
-
state.touchParams.lastTime = event.timeStamp || Date.now();
|
|
7749
|
-
const move = state.touchParams.lastY - state.touchParams.startY;
|
|
7750
|
-
if (Math.abs(move) < 5) {
|
|
7751
|
-
return false;
|
|
7752
|
-
}
|
|
7753
|
-
setMove(move);
|
|
7754
|
-
};
|
|
7755
|
-
const touchEnd = (event) => {
|
|
7756
|
-
var _a, _b;
|
|
7757
|
-
const changedTouches = event.changedTouches[0];
|
|
7758
|
-
state.touchParams.lastY = changedTouches.pageY;
|
|
7759
|
-
state.touchParams.lastTime = event.timeStamp || Date.now();
|
|
7760
|
-
let move = state.touchParams.lastY - state.touchParams.startY;
|
|
7761
|
-
if (Math.abs(move) < 5) {
|
|
7762
|
-
return false;
|
|
7763
|
-
}
|
|
7764
|
-
const updateMove = move + state.transformY;
|
|
7765
|
-
const h2 = ((_a = months.value) == null ? void 0 : _a.offsetHeight) || 0;
|
|
7766
|
-
const offsetHeight = ((_b = monthsPanel.value) == null ? void 0 : _b.offsetHeight) || 0;
|
|
7767
|
-
if (updateMove > 0) {
|
|
7768
|
-
getMonth(getCurrData("prev"), "prev");
|
|
7769
|
-
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h2 ? Math.abs(move) : h2) * 5) {
|
|
7770
|
-
getMonth(getCurrData("next"), "next");
|
|
7771
|
-
if (Math.abs(move) >= 300) {
|
|
7772
|
-
getMonth(getCurrData("next"), "next");
|
|
8622
|
+
if (currentScrollTop < state.monthsData[current - 1].cssScrollHeight) {
|
|
8623
|
+
current -= 1;
|
|
7773
8624
|
}
|
|
7774
8625
|
}
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
moveTime = moveTime + 1e3;
|
|
7779
|
-
setMove(move, "end", moveTime);
|
|
7780
|
-
} else {
|
|
7781
|
-
setMove(move, "end");
|
|
8626
|
+
if (state.currentIndex !== current) {
|
|
8627
|
+
state.currentIndex = current;
|
|
8628
|
+
setDefaultRange(state.monthsNum, current);
|
|
7782
8629
|
}
|
|
8630
|
+
state.yearMonthTitle = state.monthsData[current].title;
|
|
7783
8631
|
};
|
|
7784
8632
|
const resetRender = () => {
|
|
7785
8633
|
state.chooseData.splice(0);
|
|
7786
8634
|
state.monthsData.splice(0);
|
|
7787
|
-
state.scrollDistance = 0;
|
|
7788
|
-
state.translateY = 0;
|
|
7789
|
-
setTransform(state.scrollDistance);
|
|
7790
8635
|
initData();
|
|
7791
8636
|
};
|
|
7792
8637
|
initData();
|
|
7793
8638
|
watch(() => props.defaultValue, (val) => {
|
|
7794
8639
|
if (val) {
|
|
7795
|
-
|
|
8640
|
+
if (props.poppable) {
|
|
8641
|
+
resetRender();
|
|
8642
|
+
}
|
|
7796
8643
|
}
|
|
7797
8644
|
});
|
|
7798
8645
|
return __spreadValues(__spreadValues({
|
|
7799
8646
|
weeks,
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
8647
|
+
compConthsData,
|
|
8648
|
+
showTopBtn,
|
|
8649
|
+
topInfo,
|
|
8650
|
+
bottomInfo,
|
|
8651
|
+
rangeTip,
|
|
8652
|
+
mothsViewScroll,
|
|
7803
8653
|
getClass,
|
|
7804
8654
|
isStartTip,
|
|
7805
8655
|
isEndTip,
|
|
@@ -7808,38 +8658,52 @@ const _sfc_main$C = create$C({
|
|
|
7808
8658
|
confirm,
|
|
7809
8659
|
monthsPanel,
|
|
7810
8660
|
months,
|
|
7811
|
-
weeksPanel
|
|
8661
|
+
weeksPanel,
|
|
8662
|
+
viewArea
|
|
7812
8663
|
}, toRefs(state)), toRefs(props));
|
|
7813
8664
|
}
|
|
7814
8665
|
});
|
|
7815
|
-
const _hoisted_1$t = {
|
|
7816
|
-
|
|
8666
|
+
const _hoisted_1$t = {
|
|
8667
|
+
key: 0,
|
|
8668
|
+
class: "calendar-title"
|
|
8669
|
+
};
|
|
8670
|
+
const _hoisted_2$o = {
|
|
8671
|
+
key: 1,
|
|
8672
|
+
class: "calendar-top-slot"
|
|
8673
|
+
};
|
|
7817
8674
|
const _hoisted_3$k = {
|
|
8675
|
+
key: 2,
|
|
8676
|
+
class: "calendar-curr-month"
|
|
8677
|
+
};
|
|
8678
|
+
const _hoisted_4$f = {
|
|
7818
8679
|
class: "calendar-weeks",
|
|
7819
8680
|
ref: "weeksPanel"
|
|
7820
8681
|
};
|
|
7821
|
-
const
|
|
8682
|
+
const _hoisted_5$a = {
|
|
7822
8683
|
class: "calendar-months-panel",
|
|
7823
8684
|
ref: "monthsPanel"
|
|
7824
8685
|
};
|
|
7825
|
-
const _hoisted_5$a = { class: "calendar-loading-tip" };
|
|
7826
8686
|
const _hoisted_6$8 = { class: "calendar-month-title" };
|
|
7827
8687
|
const _hoisted_7$7 = { class: "calendar-month-con" };
|
|
7828
8688
|
const _hoisted_8$7 = ["onClick"];
|
|
7829
8689
|
const _hoisted_9$5 = { class: "calendar-day" };
|
|
7830
8690
|
const _hoisted_10$3 = {
|
|
7831
8691
|
key: 0,
|
|
7832
|
-
class: "calendar-curr-tips"
|
|
8692
|
+
class: "calendar-curr-tips calendar-curr-tips-top"
|
|
7833
8693
|
};
|
|
7834
8694
|
const _hoisted_11$3 = {
|
|
7835
8695
|
key: 1,
|
|
7836
|
-
class: "calendar-
|
|
8696
|
+
class: "calendar-curr-tips calendar-curr-tips-bottom"
|
|
7837
8697
|
};
|
|
7838
8698
|
const _hoisted_12$3 = {
|
|
7839
8699
|
key: 2,
|
|
7840
|
-
class: "calendar-
|
|
8700
|
+
class: "calendar-curr-tip-curr"
|
|
7841
8701
|
};
|
|
7842
8702
|
const _hoisted_13$2 = {
|
|
8703
|
+
key: 4,
|
|
8704
|
+
class: "calendar-day-tip"
|
|
8705
|
+
};
|
|
8706
|
+
const _hoisted_14$2 = {
|
|
7843
8707
|
key: 0,
|
|
7844
8708
|
class: "nut-calendar-footer"
|
|
7845
8709
|
};
|
|
@@ -7853,11 +8717,12 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7853
8717
|
createElementVNode("view", {
|
|
7854
8718
|
class: normalizeClass(["nut-calendar-header", { "nut-calendar-header-tile": !_ctx.poppable }])
|
|
7855
8719
|
}, [
|
|
7856
|
-
_ctx.
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
]
|
|
7860
|
-
|
|
8720
|
+
_ctx.showTitle ? (openBlock(), createElementBlock("view", _hoisted_1$t, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
8721
|
+
_ctx.showTopBtn ? (openBlock(), createElementBlock("view", _hoisted_2$o, [
|
|
8722
|
+
renderSlot(_ctx.$slots, "btn")
|
|
8723
|
+
])) : createCommentVNode("", true),
|
|
8724
|
+
_ctx.showSubTitle ? (openBlock(), createElementBlock("view", _hoisted_3$k, toDisplayString(_ctx.yearMonthTitle), 1)) : createCommentVNode("", true),
|
|
8725
|
+
createElementVNode("view", _hoisted_4$f, [
|
|
7861
8726
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weeks, (item, index) => {
|
|
7862
8727
|
return openBlock(), createElementBlock("view", {
|
|
7863
8728
|
class: "calendar-week-item",
|
|
@@ -7869,44 +8734,67 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7869
8734
|
createElementVNode("view", {
|
|
7870
8735
|
class: "nut-calendar-content",
|
|
7871
8736
|
ref: "months",
|
|
7872
|
-
|
|
7873
|
-
onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
|
|
7874
|
-
onTouchend: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.touchEnd && _ctx.touchEnd(...args), ["stop"]))
|
|
8737
|
+
onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.mothsViewScroll && _ctx.mothsViewScroll(...args))
|
|
7875
8738
|
}, [
|
|
7876
|
-
createElementVNode("view",
|
|
7877
|
-
createElementVNode("view",
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
8739
|
+
createElementVNode("view", _hoisted_5$a, [
|
|
8740
|
+
createElementVNode("view", {
|
|
8741
|
+
class: "viewArea",
|
|
8742
|
+
ref: "viewArea",
|
|
8743
|
+
style: normalizeStyle({ transform: `translateY(${_ctx.translateY}px)` })
|
|
8744
|
+
}, [
|
|
8745
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.compConthsData, (month, index) => {
|
|
8746
|
+
return openBlock(), createElementBlock("view", {
|
|
8747
|
+
class: "calendar-month",
|
|
8748
|
+
key: index
|
|
8749
|
+
}, [
|
|
8750
|
+
createElementVNode("view", _hoisted_6$8, toDisplayString(month.title), 1),
|
|
8751
|
+
createElementVNode("view", _hoisted_7$7, [
|
|
8752
|
+
createElementVNode("view", {
|
|
8753
|
+
class: normalizeClass(["calendar-month-item", _ctx.type === "range" ? "month-item-range" : ""])
|
|
8754
|
+
}, [
|
|
8755
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(month.monthData, (day, i) => {
|
|
8756
|
+
return openBlock(), createElementBlock("view", {
|
|
8757
|
+
key: i,
|
|
8758
|
+
class: normalizeClass(["calendar-month-day", _ctx.getClass(day, month)]),
|
|
8759
|
+
onClick: ($event) => _ctx.chooseDay(day, month)
|
|
8760
|
+
}, [
|
|
8761
|
+
createElementVNode("view", _hoisted_9$5, [
|
|
8762
|
+
renderSlot(_ctx.$slots, "day", {
|
|
8763
|
+
date: day.type == "curr" ? day : ""
|
|
8764
|
+
}, () => [
|
|
8765
|
+
createTextVNode(toDisplayString(day.type == "curr" ? day.day : ""), 1)
|
|
8766
|
+
])
|
|
8767
|
+
]),
|
|
8768
|
+
_ctx.topInfo ? (openBlock(), createElementBlock("view", _hoisted_10$3, [
|
|
8769
|
+
renderSlot(_ctx.$slots, "topInfo", {
|
|
8770
|
+
date: day.type == "curr" ? day : ""
|
|
8771
|
+
})
|
|
8772
|
+
])) : createCommentVNode("", true),
|
|
8773
|
+
_ctx.bottomInfo ? (openBlock(), createElementBlock("view", _hoisted_11$3, [
|
|
8774
|
+
renderSlot(_ctx.$slots, "bottomInfo", {
|
|
8775
|
+
date: day.type == "curr" ? day : ""
|
|
8776
|
+
})
|
|
8777
|
+
])) : createCommentVNode("", true),
|
|
8778
|
+
!_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(month, day.day) ? (openBlock(), createElementBlock("view", _hoisted_12$3, " \u4ECA\u5929 ")) : createCommentVNode("", true),
|
|
8779
|
+
_ctx.isStartTip(day, month) ? (openBlock(), createElementBlock("view", {
|
|
8780
|
+
key: 3,
|
|
8781
|
+
class: normalizeClass(["calendar-day-tip", { "calendar-curr-tips-top": _ctx.rangeTip(day, month) }])
|
|
8782
|
+
}, toDisplayString(_ctx.startText), 3)) : createCommentVNode("", true),
|
|
8783
|
+
_ctx.isEndTip(day, month) ? (openBlock(), createElementBlock("view", _hoisted_13$2, toDisplayString(_ctx.endText), 1)) : createCommentVNode("", true)
|
|
8784
|
+
], 10, _hoisted_8$7);
|
|
8785
|
+
}), 128))
|
|
8786
|
+
], 2)
|
|
8787
|
+
])
|
|
8788
|
+
]);
|
|
8789
|
+
}), 128))
|
|
8790
|
+
], 4)
|
|
7903
8791
|
], 512)
|
|
7904
8792
|
], 544),
|
|
7905
|
-
_ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view",
|
|
8793
|
+
_ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view", _hoisted_14$2, [
|
|
7906
8794
|
createElementVNode("view", {
|
|
7907
8795
|
class: "calendar-confirm-btn",
|
|
7908
|
-
onClick: _cache[
|
|
7909
|
-
},
|
|
8796
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirm && _ctx.confirm(...args))
|
|
8797
|
+
}, toDisplayString(_ctx.confirmText), 1)
|
|
7910
8798
|
])) : createCommentVNode("", true)
|
|
7911
8799
|
], 2);
|
|
7912
8800
|
}
|
|
@@ -7929,16 +8817,40 @@ const _sfc_main$B = create$B({
|
|
|
7929
8817
|
type: Boolean,
|
|
7930
8818
|
default: true
|
|
7931
8819
|
},
|
|
8820
|
+
showTitle: {
|
|
8821
|
+
type: Boolean,
|
|
8822
|
+
default: true
|
|
8823
|
+
},
|
|
8824
|
+
showSubTitle: {
|
|
8825
|
+
type: Boolean,
|
|
8826
|
+
default: true
|
|
8827
|
+
},
|
|
7932
8828
|
visible: {
|
|
7933
8829
|
type: Boolean,
|
|
7934
8830
|
default: false
|
|
7935
8831
|
},
|
|
8832
|
+
showToday: {
|
|
8833
|
+
type: Boolean,
|
|
8834
|
+
default: true
|
|
8835
|
+
},
|
|
7936
8836
|
title: {
|
|
7937
8837
|
type: String,
|
|
7938
8838
|
default: "\u65E5\u5386\u9009\u62E9"
|
|
7939
8839
|
},
|
|
8840
|
+
confirmText: {
|
|
8841
|
+
type: String,
|
|
8842
|
+
default: "\u786E\u8BA4"
|
|
8843
|
+
},
|
|
8844
|
+
startText: {
|
|
8845
|
+
type: String,
|
|
8846
|
+
default: "\u5F00\u59CB"
|
|
8847
|
+
},
|
|
8848
|
+
endText: {
|
|
8849
|
+
type: String,
|
|
8850
|
+
default: "\u7ED3\u675F"
|
|
8851
|
+
},
|
|
7940
8852
|
defaultValue: {
|
|
7941
|
-
type: String
|
|
8853
|
+
type: [String, Array]
|
|
7942
8854
|
},
|
|
7943
8855
|
startDate: {
|
|
7944
8856
|
type: String,
|
|
@@ -7949,8 +8861,20 @@ const _sfc_main$B = create$B({
|
|
|
7949
8861
|
default: Utils.getDay(365)
|
|
7950
8862
|
}
|
|
7951
8863
|
},
|
|
7952
|
-
emits: ["choose", "close", "update:visible"],
|
|
7953
|
-
setup(props, { emit }) {
|
|
8864
|
+
emits: ["choose", "close", "update:visible", "select"],
|
|
8865
|
+
setup(props, { emit, slots }) {
|
|
8866
|
+
const showTopBtn = computed(() => {
|
|
8867
|
+
return slots.btn;
|
|
8868
|
+
});
|
|
8869
|
+
const topInfo = computed(() => {
|
|
8870
|
+
return slots.topInfo;
|
|
8871
|
+
});
|
|
8872
|
+
const dayInfo = computed(() => {
|
|
8873
|
+
return slots.day;
|
|
8874
|
+
});
|
|
8875
|
+
const bottomInfo = computed(() => {
|
|
8876
|
+
return slots.bottomInfo;
|
|
8877
|
+
});
|
|
7954
8878
|
const calendarRef = ref(null);
|
|
7955
8879
|
const update = () => {
|
|
7956
8880
|
emit("update:visible", false);
|
|
@@ -7963,6 +8887,9 @@ const _sfc_main$B = create$B({
|
|
|
7963
8887
|
close();
|
|
7964
8888
|
emit("choose", param);
|
|
7965
8889
|
};
|
|
8890
|
+
const select = (param) => {
|
|
8891
|
+
emit("select", param);
|
|
8892
|
+
};
|
|
7966
8893
|
const closePopup = () => {
|
|
7967
8894
|
close();
|
|
7968
8895
|
};
|
|
@@ -7971,7 +8898,12 @@ const _sfc_main$B = create$B({
|
|
|
7971
8898
|
update,
|
|
7972
8899
|
close,
|
|
7973
8900
|
choose,
|
|
7974
|
-
|
|
8901
|
+
select,
|
|
8902
|
+
calendarRef,
|
|
8903
|
+
showTopBtn,
|
|
8904
|
+
topInfo,
|
|
8905
|
+
dayInfo,
|
|
8906
|
+
bottomInfo
|
|
7975
8907
|
};
|
|
7976
8908
|
}
|
|
7977
8909
|
});
|
|
@@ -7985,43 +8917,121 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7985
8917
|
round: "",
|
|
7986
8918
|
closeable: true,
|
|
7987
8919
|
onClickOverlay: _ctx.closePopup,
|
|
7988
|
-
onClickCloseIcon: _ctx.closePopup
|
|
8920
|
+
onClickCloseIcon: _ctx.closePopup,
|
|
8921
|
+
"destroy-on-close": true,
|
|
8922
|
+
style: { height: "85vh" }
|
|
7989
8923
|
}, {
|
|
7990
8924
|
default: withCtx(() => [
|
|
7991
|
-
|
|
8925
|
+
_ctx.visible ? (openBlock(), createBlock(_component_nut_calendar_item, {
|
|
8926
|
+
key: 0,
|
|
7992
8927
|
props: "",
|
|
7993
8928
|
ref: "calendarRef",
|
|
7994
8929
|
type: _ctx.type,
|
|
7995
8930
|
"is-auto-back-fill": _ctx.isAutoBackFill,
|
|
7996
8931
|
poppable: _ctx.poppable,
|
|
7997
8932
|
title: _ctx.title,
|
|
8933
|
+
"confirm-text": _ctx.confirmText,
|
|
8934
|
+
"start-text": _ctx.startText,
|
|
8935
|
+
"end-text": _ctx.endText,
|
|
7998
8936
|
"default-value": _ctx.defaultValue,
|
|
8937
|
+
"show-today": _ctx.showToday,
|
|
7999
8938
|
"start-date": _ctx.startDate,
|
|
8000
8939
|
"end-date": _ctx.endDate,
|
|
8001
8940
|
onUpdate: _ctx.update,
|
|
8002
8941
|
onClose: _ctx.close,
|
|
8003
|
-
onChoose: _ctx.choose
|
|
8004
|
-
|
|
8942
|
+
onChoose: _ctx.choose,
|
|
8943
|
+
onSelect: _ctx.select,
|
|
8944
|
+
"show-title": _ctx.showTitle,
|
|
8945
|
+
"show-sub-title": _ctx.showSubTitle
|
|
8946
|
+
}, createSlots({ _: 2 }, [
|
|
8947
|
+
_ctx.showTopBtn ? {
|
|
8948
|
+
name: "btn",
|
|
8949
|
+
fn: withCtx(() => [
|
|
8950
|
+
renderSlot(_ctx.$slots, "btn")
|
|
8951
|
+
])
|
|
8952
|
+
} : void 0,
|
|
8953
|
+
_ctx.dayInfo ? {
|
|
8954
|
+
name: "day",
|
|
8955
|
+
fn: withCtx((date) => [
|
|
8956
|
+
renderSlot(_ctx.$slots, "day", {
|
|
8957
|
+
date: date.date
|
|
8958
|
+
})
|
|
8959
|
+
])
|
|
8960
|
+
} : void 0,
|
|
8961
|
+
_ctx.topInfo ? {
|
|
8962
|
+
name: "topInfo",
|
|
8963
|
+
fn: withCtx((date) => [
|
|
8964
|
+
renderSlot(_ctx.$slots, "topInfo", {
|
|
8965
|
+
date: date.date
|
|
8966
|
+
})
|
|
8967
|
+
])
|
|
8968
|
+
} : void 0,
|
|
8969
|
+
_ctx.bottomInfo ? {
|
|
8970
|
+
name: "bottomInfo",
|
|
8971
|
+
fn: withCtx((date) => [
|
|
8972
|
+
renderSlot(_ctx.$slots, "bottomInfo", {
|
|
8973
|
+
date: date.date
|
|
8974
|
+
})
|
|
8975
|
+
])
|
|
8976
|
+
} : void 0
|
|
8977
|
+
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "show-today", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-title", "show-sub-title"])) : createCommentVNode("", true)
|
|
8005
8978
|
]),
|
|
8006
|
-
_:
|
|
8979
|
+
_: 3
|
|
8007
8980
|
}, 8, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
|
|
8008
8981
|
key: 1,
|
|
8009
8982
|
type: _ctx.type,
|
|
8010
8983
|
"is-auto-back-fill": _ctx.isAutoBackFill,
|
|
8011
8984
|
poppable: _ctx.poppable,
|
|
8012
8985
|
title: _ctx.title,
|
|
8986
|
+
"confirm-text": _ctx.confirmText,
|
|
8987
|
+
"start-text": _ctx.startText,
|
|
8988
|
+
"end-text": _ctx.endText,
|
|
8013
8989
|
"default-value": _ctx.defaultValue,
|
|
8014
8990
|
"start-date": _ctx.startDate,
|
|
8015
8991
|
"end-date": _ctx.endDate,
|
|
8016
8992
|
onClose: _ctx.close,
|
|
8017
|
-
onChoose: _ctx.choose
|
|
8018
|
-
|
|
8993
|
+
onChoose: _ctx.choose,
|
|
8994
|
+
onSelect: _ctx.select,
|
|
8995
|
+
"show-title": _ctx.showTitle,
|
|
8996
|
+
"show-sub-title": _ctx.showSubTitle
|
|
8997
|
+
}, createSlots({ _: 2 }, [
|
|
8998
|
+
_ctx.showTopBtn ? {
|
|
8999
|
+
name: "btn",
|
|
9000
|
+
fn: withCtx(() => [
|
|
9001
|
+
renderSlot(_ctx.$slots, "btn")
|
|
9002
|
+
])
|
|
9003
|
+
} : void 0,
|
|
9004
|
+
_ctx.dayInfo ? {
|
|
9005
|
+
name: "day",
|
|
9006
|
+
fn: withCtx((date) => [
|
|
9007
|
+
renderSlot(_ctx.$slots, "day", {
|
|
9008
|
+
date: date.date
|
|
9009
|
+
})
|
|
9010
|
+
])
|
|
9011
|
+
} : void 0,
|
|
9012
|
+
_ctx.topInfo ? {
|
|
9013
|
+
name: "topInfo",
|
|
9014
|
+
fn: withCtx((date) => [
|
|
9015
|
+
renderSlot(_ctx.$slots, "topInfo", {
|
|
9016
|
+
date: date.date
|
|
9017
|
+
})
|
|
9018
|
+
])
|
|
9019
|
+
} : void 0,
|
|
9020
|
+
_ctx.bottomInfo ? {
|
|
9021
|
+
name: "bottomInfo",
|
|
9022
|
+
fn: withCtx((date) => [
|
|
9023
|
+
renderSlot(_ctx.$slots, "bottomInfo", {
|
|
9024
|
+
date: date.date
|
|
9025
|
+
})
|
|
9026
|
+
])
|
|
9027
|
+
} : void 0
|
|
9028
|
+
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onClose", "onChoose", "onSelect", "show-title", "show-sub-title"]));
|
|
8019
9029
|
}
|
|
8020
9030
|
var Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$x]]);
|
|
8021
9031
|
const { create: create$A, componentName: componentName$r } = createComponent("checkbox");
|
|
8022
9032
|
const _sfc_main$A = create$A({
|
|
8023
9033
|
components: {
|
|
8024
|
-
nutIcon: _sfc_main$
|
|
9034
|
+
nutIcon: _sfc_main$1s
|
|
8025
9035
|
},
|
|
8026
9036
|
props: {
|
|
8027
9037
|
modelValue: {
|
|
@@ -8055,7 +9065,7 @@ const _sfc_main$A = create$A({
|
|
|
8055
9065
|
},
|
|
8056
9066
|
emits: ["change", "update:modelValue"],
|
|
8057
9067
|
setup(props, { emit, slots }) {
|
|
8058
|
-
const parent = inject("parent");
|
|
9068
|
+
const parent = inject("parent", null);
|
|
8059
9069
|
const hasParent = computed(() => !!parent);
|
|
8060
9070
|
const pValue = computed(() => {
|
|
8061
9071
|
if (hasParent.value) {
|
|
@@ -8077,7 +9087,7 @@ const _sfc_main$A = create$A({
|
|
|
8077
9087
|
};
|
|
8078
9088
|
const renderIcon = () => {
|
|
8079
9089
|
const { iconName, iconSize, iconActiveName } = props;
|
|
8080
|
-
return h(_sfc_main$
|
|
9090
|
+
return h(_sfc_main$1s, {
|
|
8081
9091
|
name: !pValue.value ? iconName : iconActiveName,
|
|
8082
9092
|
size: iconSize,
|
|
8083
9093
|
class: color.value
|
|
@@ -8161,7 +9171,7 @@ const _sfc_main$z = create$z({
|
|
|
8161
9171
|
watch(() => props.modelValue, (value) => {
|
|
8162
9172
|
emit("change", value);
|
|
8163
9173
|
});
|
|
8164
|
-
useExpose
|
|
9174
|
+
useExpose({ toggleAll });
|
|
8165
9175
|
return () => {
|
|
8166
9176
|
var _a;
|
|
8167
9177
|
return h("view", {
|
|
@@ -8809,7 +9819,6 @@ const _sfc_main$w = create$w({
|
|
|
8809
9819
|
return 0;
|
|
8810
9820
|
};
|
|
8811
9821
|
const columns = computed(() => {
|
|
8812
|
-
console.log(ranges.value);
|
|
8813
9822
|
const val = ranges.value.map((res) => {
|
|
8814
9823
|
return generateValue(res.range[0], res.range[1], getDateIndex(res.type), res.type);
|
|
8815
9824
|
});
|
|
@@ -9089,6 +10098,9 @@ const _sfc_main$u = create$u({
|
|
|
9089
10098
|
[`${prefixCls}-border`]: props.hasBorder
|
|
9090
10099
|
};
|
|
9091
10100
|
});
|
|
10101
|
+
const inputmode = computed(() => {
|
|
10102
|
+
return props.type === "digit" ? "decimal" : props.type === "number" ? "numeric" : "text";
|
|
10103
|
+
});
|
|
9092
10104
|
const styles = computed(() => {
|
|
9093
10105
|
return {
|
|
9094
10106
|
textAlign: props.textAlign
|
|
@@ -9135,6 +10147,7 @@ const _sfc_main$u = create$u({
|
|
|
9135
10147
|
active,
|
|
9136
10148
|
classes,
|
|
9137
10149
|
styles,
|
|
10150
|
+
inputmode,
|
|
9138
10151
|
valueChange,
|
|
9139
10152
|
valueFocus,
|
|
9140
10153
|
valueBlur,
|
|
@@ -9147,7 +10160,7 @@ const _hoisted_1$p = {
|
|
|
9147
10160
|
class: "nut-input-label"
|
|
9148
10161
|
};
|
|
9149
10162
|
const _hoisted_2$l = { class: "label-string" };
|
|
9150
|
-
const _hoisted_3$i = ["type", "maxlength", "placeholder", "disabled", "readonly", "value"];
|
|
10163
|
+
const _hoisted_3$i = ["type", "maxlength", "placeholder", "disabled", "readonly", "value", "inputmode"];
|
|
9151
10164
|
function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9152
10165
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
9153
10166
|
return openBlock(), createElementBlock("view", {
|
|
@@ -9165,6 +10178,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9165
10178
|
disabled: _ctx.disabled,
|
|
9166
10179
|
readonly: _ctx.readonly,
|
|
9167
10180
|
value: _ctx.modelValue,
|
|
10181
|
+
inputmode: _ctx.inputmode,
|
|
9168
10182
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
|
|
9169
10183
|
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
9170
10184
|
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
|
|
@@ -9213,7 +10227,7 @@ const _sfc_main$t = create$t({
|
|
|
9213
10227
|
}
|
|
9214
10228
|
},
|
|
9215
10229
|
setup(props, { emit, slots }) {
|
|
9216
|
-
let parent = inject("parent");
|
|
10230
|
+
let parent = inject("parent", null);
|
|
9217
10231
|
const isCurValue = computed(() => {
|
|
9218
10232
|
return parent.label.value == props.label;
|
|
9219
10233
|
});
|
|
@@ -9225,7 +10239,7 @@ const _sfc_main$t = create$t({
|
|
|
9225
10239
|
});
|
|
9226
10240
|
const renderIcon = () => {
|
|
9227
10241
|
const { iconName, iconSize, iconActiveName } = props;
|
|
9228
|
-
return h(_sfc_main$
|
|
10242
|
+
return h(_sfc_main$1s, {
|
|
9229
10243
|
name: isCurValue.value ? iconActiveName : iconName,
|
|
9230
10244
|
size: iconSize,
|
|
9231
10245
|
class: color.value
|
|
@@ -9482,7 +10496,10 @@ const _sfc_main$q = create$q({
|
|
|
9482
10496
|
});
|
|
9483
10497
|
watch(() => props.modelValue, (value) => {
|
|
9484
10498
|
realInput.value = value;
|
|
9485
|
-
|
|
10499
|
+
emit("update:modelValue", value);
|
|
10500
|
+
}, {
|
|
10501
|
+
deep: true,
|
|
10502
|
+
immediate: true
|
|
9486
10503
|
});
|
|
9487
10504
|
function changeValue(e) {
|
|
9488
10505
|
const input = e.target;
|
|
@@ -10804,7 +11821,6 @@ const _sfc_main$m = create$m({
|
|
|
10804
11821
|
},
|
|
10805
11822
|
emits: ["input", "delete", "close", "update:value"],
|
|
10806
11823
|
setup(props, { emit }) {
|
|
10807
|
-
console.log(props.overlay);
|
|
10808
11824
|
const clickKeyIndex = ref(void 0);
|
|
10809
11825
|
const show = ref(props.visible);
|
|
10810
11826
|
const root = ref();
|
|
@@ -11885,7 +12901,7 @@ const component$1 = {
|
|
|
11885
12901
|
};
|
|
11886
12902
|
});
|
|
11887
12903
|
const getStyle = () => {
|
|
11888
|
-
if (avatarSize
|
|
12904
|
+
if (avatarSize.value) {
|
|
11889
12905
|
return {
|
|
11890
12906
|
width: avatarSize.value,
|
|
11891
12907
|
height: avatarSize.value
|
|
@@ -11897,7 +12913,6 @@ const component$1 = {
|
|
|
11897
12913
|
};
|
|
11898
12914
|
};
|
|
11899
12915
|
onMounted(() => {
|
|
11900
|
-
console.log("row", props.row);
|
|
11901
12916
|
});
|
|
11902
12917
|
return {
|
|
11903
12918
|
avatarShape,
|
|
@@ -11914,7 +12929,10 @@ const _hoisted_2$c = {
|
|
|
11914
12929
|
key: 1,
|
|
11915
12930
|
class: "skeleton"
|
|
11916
12931
|
};
|
|
11917
|
-
const _hoisted_3$b =
|
|
12932
|
+
const _hoisted_3$b = {
|
|
12933
|
+
key: 0,
|
|
12934
|
+
class: "skeleton-animation"
|
|
12935
|
+
};
|
|
11918
12936
|
const _hoisted_4$a = { class: "content" };
|
|
11919
12937
|
const _hoisted_5$5 = { class: "content-line" };
|
|
11920
12938
|
const _hoisted_6$3 = {
|
|
@@ -11926,7 +12944,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11926
12944
|
return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1$e, [
|
|
11927
12945
|
renderSlot(_ctx.$slots, "default")
|
|
11928
12946
|
])) : (openBlock(), createElementBlock("view", _hoisted_2$c, [
|
|
11929
|
-
_hoisted_3$b,
|
|
12947
|
+
_ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3$b)) : createCommentVNode("", true),
|
|
11930
12948
|
createElementVNode("view", _hoisted_4$a, [
|
|
11931
12949
|
_ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
|
|
11932
12950
|
key: 0,
|
|
@@ -12117,7 +13135,7 @@ const _sfc_main$e = create$e({
|
|
|
12117
13135
|
const tree = ref(new Tree([], {}));
|
|
12118
13136
|
const panes = ref([]);
|
|
12119
13137
|
const isLazy = computed(() => configs.value.lazy && Boolean(configs.value.lazyLoad));
|
|
12120
|
-
const lazyLoadMap = new Map();
|
|
13138
|
+
const lazyLoadMap = /* @__PURE__ */ new Map();
|
|
12121
13139
|
let currentProcessNode;
|
|
12122
13140
|
const init = async () => {
|
|
12123
13141
|
lazyLoadMap.clear();
|
|
@@ -12460,6 +13478,10 @@ const { componentName: componentName$b, create: create$c } = createComponent("ad
|
|
|
12460
13478
|
const _sfc_main$c = create$c({
|
|
12461
13479
|
inheritAttrs: false,
|
|
12462
13480
|
props: {
|
|
13481
|
+
modelValue: {
|
|
13482
|
+
type: Array,
|
|
13483
|
+
default: () => []
|
|
13484
|
+
},
|
|
12463
13485
|
visible: {
|
|
12464
13486
|
type: Boolean,
|
|
12465
13487
|
default: false
|
|
@@ -12523,9 +13545,13 @@ const _sfc_main$c = create$c({
|
|
|
12523
13545
|
height: {
|
|
12524
13546
|
type: [String, Number],
|
|
12525
13547
|
default: "200px"
|
|
13548
|
+
},
|
|
13549
|
+
columnsPlaceholder: {
|
|
13550
|
+
type: [String, Array],
|
|
13551
|
+
default: "\u8BF7\u9009\u62E9"
|
|
12526
13552
|
}
|
|
12527
13553
|
},
|
|
12528
|
-
emits: ["update:visible", "type", "change", "selected", "close", "close-mask", "switch-module"],
|
|
13554
|
+
emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
|
|
12529
13555
|
setup(props, { emit }) {
|
|
12530
13556
|
const regionLine = ref(null);
|
|
12531
13557
|
const tabRegion = ref(null);
|
|
@@ -12533,6 +13559,7 @@ const _sfc_main$c = create$c({
|
|
|
12533
13559
|
const privateType = ref(props.type);
|
|
12534
13560
|
const tabIndex = ref(0);
|
|
12535
13561
|
const tabName = ref(["province", "city", "country", "town"]);
|
|
13562
|
+
const tabNameDefault = ref([""]);
|
|
12536
13563
|
const isCustom2 = computed(() => props.type === "custom2");
|
|
12537
13564
|
const transformData = (data) => {
|
|
12538
13565
|
if (!Array.isArray(data))
|
|
@@ -12580,13 +13607,55 @@ const _sfc_main$c = create$c({
|
|
|
12580
13607
|
let selectedExistAddress = reactive({});
|
|
12581
13608
|
const closeWay = ref("self");
|
|
12582
13609
|
const lineDistance = ref(20);
|
|
13610
|
+
onMounted(() => {
|
|
13611
|
+
customPlaceholder();
|
|
13612
|
+
});
|
|
13613
|
+
const initCustomSelected = () => {
|
|
13614
|
+
if (props.modelValue.length > 0) {
|
|
13615
|
+
tabIndex.value = props.modelValue.length - 1;
|
|
13616
|
+
for (let index = 0; index < props.modelValue.length; index++) {
|
|
13617
|
+
if (regionList[tabName.value[index]].length == 0) {
|
|
13618
|
+
tabIndex.value = index - 1;
|
|
13619
|
+
break;
|
|
13620
|
+
} else {
|
|
13621
|
+
const val = props.modelValue[index];
|
|
13622
|
+
const arr = regionList[tabName.value[index]];
|
|
13623
|
+
if (privateType.value == "custom") {
|
|
13624
|
+
selectedRegion[tabName.value[index]] = arr.filter((item) => item.id == val)[0];
|
|
13625
|
+
} else if (privateType.value == "custom2") {
|
|
13626
|
+
let sumArr = [];
|
|
13627
|
+
arr.map((item) => {
|
|
13628
|
+
sumArr.push(...item.list);
|
|
13629
|
+
});
|
|
13630
|
+
selectedRegion[tabName.value[index]] = sumArr.filter((item) => item.id == val)[0];
|
|
13631
|
+
}
|
|
13632
|
+
}
|
|
13633
|
+
}
|
|
13634
|
+
lineAnimation();
|
|
13635
|
+
}
|
|
13636
|
+
};
|
|
13637
|
+
const customPlaceholder = () => {
|
|
13638
|
+
let typeD = Object.prototype.toString.call(props.columnsPlaceholder);
|
|
13639
|
+
if (typeD == "[object String]") {
|
|
13640
|
+
tabNameDefault.value = new Array(4).fill(props.columnsPlaceholder);
|
|
13641
|
+
} else if (typeD == "[object Array]") {
|
|
13642
|
+
tabNameDefault.value = new Array(4).fill("");
|
|
13643
|
+
tabNameDefault.value.forEach((val, index) => {
|
|
13644
|
+
if (props.columnsPlaceholder[index]) {
|
|
13645
|
+
tabNameDefault.value[index] = props.columnsPlaceholder[index];
|
|
13646
|
+
} else {
|
|
13647
|
+
tabNameDefault.value[index] = "\u8BF7\u9009\u62E9";
|
|
13648
|
+
}
|
|
13649
|
+
});
|
|
13650
|
+
}
|
|
13651
|
+
};
|
|
12583
13652
|
const getTabName = (item, index) => {
|
|
12584
13653
|
if (item.name)
|
|
12585
13654
|
return item.name;
|
|
12586
13655
|
if (tabIndex.value < index) {
|
|
12587
13656
|
return item.name;
|
|
12588
13657
|
} else {
|
|
12589
|
-
return
|
|
13658
|
+
return tabNameDefault.value[index];
|
|
12590
13659
|
}
|
|
12591
13660
|
};
|
|
12592
13661
|
const handClose = (type = "self") => {
|
|
@@ -12599,7 +13668,6 @@ const _sfc_main$c = create$c({
|
|
|
12599
13668
|
closeWay.value = "mask";
|
|
12600
13669
|
};
|
|
12601
13670
|
const lineAnimation = () => {
|
|
12602
|
-
console.log("\u6ED1\u52A8\u7EA2\u7EBF");
|
|
12603
13671
|
nextTick(() => {
|
|
12604
13672
|
const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
|
|
12605
13673
|
if (name) {
|
|
@@ -12615,7 +13683,7 @@ const _sfc_main$c = create$c({
|
|
|
12615
13683
|
custom: tabName.value[tabIndex.value]
|
|
12616
13684
|
};
|
|
12617
13685
|
selectedRegion[tabName.value[tabIndex.value]] = item;
|
|
12618
|
-
for (let i = tabIndex.value; i <
|
|
13686
|
+
for (let i = tabIndex.value; i < 4; i++) {
|
|
12619
13687
|
selectedRegion[tabName.value[i + 1]] = {};
|
|
12620
13688
|
}
|
|
12621
13689
|
if (tabIndex.value < 3) {
|
|
@@ -12626,6 +13694,7 @@ const _sfc_main$c = create$c({
|
|
|
12626
13694
|
emit("change", calBack);
|
|
12627
13695
|
} else {
|
|
12628
13696
|
handClose();
|
|
13697
|
+
emit("update:modelValue");
|
|
12629
13698
|
}
|
|
12630
13699
|
};
|
|
12631
13700
|
const changeRegionTab = (item, key, index) => {
|
|
@@ -12708,6 +13777,8 @@ const _sfc_main$c = create$c({
|
|
|
12708
13777
|
watch(() => showPopup.value, (value) => {
|
|
12709
13778
|
if (value == false) {
|
|
12710
13779
|
close();
|
|
13780
|
+
} else {
|
|
13781
|
+
initCustomSelected();
|
|
12711
13782
|
}
|
|
12712
13783
|
});
|
|
12713
13784
|
watch(() => props.province, (value) => {
|
|
@@ -12817,7 +13888,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12817
13888
|
name: _ctx.backBtnIcon,
|
|
12818
13889
|
color: "#cccccc"
|
|
12819
13890
|
}, null, 8, ["name"]), [
|
|
12820
|
-
[vShow, _ctx.privateType == "custom" && _ctx.backBtnIcon]
|
|
13891
|
+
[vShow, _ctx.type == "exist" && _ctx.privateType == "custom" && _ctx.backBtnIcon]
|
|
12821
13892
|
])
|
|
12822
13893
|
]),
|
|
12823
13894
|
createElementVNode("view", _hoisted_3$9, toDisplayString(_ctx.privateType == "custom" ? _ctx.customAddressTitle : _ctx.existAddressTitle), 1),
|
|
@@ -13931,7 +15002,6 @@ const _sfc_main$1 = create$1({
|
|
|
13931
15002
|
}
|
|
13932
15003
|
},
|
|
13933
15004
|
setup(props, { emit, slots }) {
|
|
13934
|
-
console.log(slots["origin"]);
|
|
13935
15005
|
const isHaveSlot = (slot) => {
|
|
13936
15006
|
return slots[slot];
|
|
13937
15007
|
};
|
|
@@ -13999,7 +15069,7 @@ var RenderColumn = {
|
|
|
13999
15069
|
return () => h(`view`, {}, props.slots());
|
|
14000
15070
|
},
|
|
14001
15071
|
props: {
|
|
14002
|
-
slots:
|
|
15072
|
+
slots: Function
|
|
14003
15073
|
}
|
|
14004
15074
|
};
|
|
14005
15075
|
const component = (componentName2) => {
|
|
@@ -14164,7 +15234,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14164
15234
|
}
|
|
14165
15235
|
var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
14166
15236
|
function install(app) {
|
|
14167
|
-
const packages = [Avatar, Button, Cell, CellGroup, _sfc_main$
|
|
15237
|
+
const packages = [Avatar, Button, Cell, CellGroup, _sfc_main$1s, Price, OverLay, Divider, _sfc_main$1l, Col, Row, _ImagePreview, _sfc_main$1d, Swipe, ActionSheet, BackTop, Collapse, CollapseItem, Drag, _Dialog, InfiniteLoading, NotifyFunction, Range, PullRefresh, Video, Popup, _sfc_main$11, Step, Swiper, SwiperItem, Switch, ToastFunction, Progress, CircleProgress, NoticeBar, SearchBar, Empty, Audio, AudioOperate, Navbar, FixedNav, Menu, MenuItem, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, _sfc_main$H, GridItem, SideNavBar, SideNavBarItem, SubSideNavBar, Calendar, _sfc_main$A, _sfc_main$z, DatePicker, InputNumber, Input, _sfc_main$t, _sfc_main$s, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, CountUp, NumberKeyboard, CountDown, Badge, Tag, Popover, Form, FormItem, Skeleton, Cascader, Address, Barrage, Signature, TimeSelect, TimePannel, TimeDetail, Sku, Card, Table];
|
|
14168
15238
|
packages.forEach((item) => {
|
|
14169
15239
|
if (item.install) {
|
|
14170
15240
|
app.use(item);
|
|
@@ -14175,4 +15245,4 @@ function install(app) {
|
|
|
14175
15245
|
}
|
|
14176
15246
|
const version = "3.1.16";
|
|
14177
15247
|
var nutui_vue_build = { install, version };
|
|
14178
|
-
export { ActionSheet, Address, Avatar, BackTop, Badge, Barrage, Button, Calendar, Card, Cascader, Cell, CellGroup, _sfc_main$A as Checkbox, _sfc_main$z as CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, CountDown, CountUp, DatePicker, _Dialog as Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, _sfc_main$H as Grid, GridItem, _sfc_main$
|
|
15248
|
+
export { ActionSheet, Address, Audio, AudioOperate, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, _sfc_main$A as Checkbox, _sfc_main$z as CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, CountDown, CountUp, DatePicker, _Dialog as Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, _sfc_main$H as Grid, GridItem, _sfc_main$1s as Icon, _ImagePreview as ImagePreview, Indicator, InfiniteLoading, Input, InputNumber, _sfc_main$1l as Layout, Menu, MenuItem, Navbar, NoticeBar, NotifyFunction as Notify, NumberKeyboard, OverLay, Pagination, Picker, Popover, Popup, Price, Progress, PullRefresh, _sfc_main$t as Radio, _sfc_main$s as RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Sku, Step, _sfc_main$11 as Steps, _sfc_main$1d as Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, ToastFunction as Toast, Uploader, Video, nutui_vue_build as default, install, version };
|