uniapp-dyckui 4.1.2 → 4.1.4
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/assets/{style.BFlsbpSj.css → style.BEkFuBVh.css} +776 -774
- package/dist/{index.cjs.js → index.cjs} +841 -839
- package/dist/index.cjs.map +1 -0
- package/dist/{index.es.js → index.mjs} +841 -839
- package/dist/index.mjs.map +1 -0
- package/dist/src/components/MyComs/Button/index.vue.d.ts +6 -6
- package/dist/src/components/MyComs/Dialog/index.vue.d.ts +6 -6
- package/dist/src/components/MyComs/Divider/index.vue.d.ts +5 -5
- package/dist/src/components/MyComs/DropdownSelect/dropdownSelect.d.ts +2 -2
- package/dist/src/components/MyComs/DropdownSelect/index.vue.d.ts +3 -6
- package/dist/src/components/MyComs/DropdownWithBadge/index.vue.d.ts +3 -6
- package/dist/src/components/MyComs/FilterDrawer/index.vue.d.ts +3 -6
- package/dist/src/components/MyComs/FilterDrawer/useFilterDrawer.d.ts +1 -1
- package/dist/src/components/MyComs/InfiniteScroll/index.vue.d.ts +5 -5
- package/dist/src/components/MyComs/Popup/index.vue.d.ts +5 -5
- package/dist/src/components/MyComs/PullRefresh/index.vue.d.ts +5 -5
- package/dist/src/components/MyComs/Swiper/index.vue.d.ts +7 -7
- package/dist/src/components/MyComs/Toast/index.vue.d.ts +7 -7
- package/dist/src/components/MyComs/index.d.ts +1590 -17
- package/package.json +104 -97
- package/src/components/MyComs/Dialog/index.ts +3 -2
- package/src/components/MyComs/Divider/index.ts +3 -2
- package/src/components/MyComs/InfiniteScroll/index.ts +3 -2
- package/src/components/MyComs/Popup/index.ts +3 -2
- package/src/components/MyComs/Popup/index.vue +837 -835
- package/src/components/MyComs/PullRefresh/index.ts +3 -2
- package/src/components/MyComs/PullRefresh/index.vue +2 -1
- package/src/components/MyComs/Swiper/index.ts +3 -2
- package/src/components/MyComs/Swiper/index.vue +246 -245
- package/src/components/MyComs/Toast/index.ts +3 -2
- package/src/components/MyComs/Toast/index.vue +373 -372
- package/src/components/MyComs/index.ts +57 -20
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js.map +0 -1
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, createCommentVNode, Fragment, renderSlot,
|
|
2
|
-
const _withScopeId$4 = (n) => (pushScopeId("data-v-02c23a30"), n = n(), popScopeId(), n);
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, Fragment, renderSlot, useCssVars, ref, watch, withModifiers, toDisplayString, computed, resolveComponent, createBlock, normalizeProps, guardReactiveProps, unref, mergeProps, toHandlers, withCtx, withDirectives, vShow, isRef, onMounted, onUnmounted, normalizeStyle, nextTick, createTextVNode, renderList } from "vue";
|
|
3
2
|
const _hoisted_1$a = ["disabled"];
|
|
4
3
|
const _hoisted_2$9 = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "sw-button__loading"
|
|
7
6
|
};
|
|
8
|
-
const _hoisted_3$9 =
|
|
9
|
-
const _hoisted_4$7 = [
|
|
10
|
-
_hoisted_3$9
|
|
11
|
-
];
|
|
12
|
-
const _hoisted_5$5 = {
|
|
7
|
+
const _hoisted_3$9 = {
|
|
13
8
|
key: 0,
|
|
14
9
|
class: "sw-button__icon"
|
|
15
10
|
};
|
|
16
|
-
const
|
|
11
|
+
const _hoisted_4$6 = {
|
|
17
12
|
key: 2,
|
|
18
13
|
class: "sw-button__text"
|
|
19
14
|
};
|
|
@@ -46,31 +41,33 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
46
41
|
return (_ctx, _cache) => {
|
|
47
42
|
return openBlock(), createElementBlock("view", {
|
|
48
43
|
class: normalizeClass(["sw-button", [
|
|
49
|
-
`sw-button--${
|
|
50
|
-
`sw-button--${
|
|
51
|
-
`sw-button--${
|
|
52
|
-
{ "is-disabled":
|
|
53
|
-
{ "is-loading":
|
|
54
|
-
{ "is-block":
|
|
55
|
-
{ "is-round":
|
|
56
|
-
{ "is-plain":
|
|
57
|
-
{ "is-outline":
|
|
58
|
-
{ "is-link":
|
|
44
|
+
`sw-button--${__props.type}`,
|
|
45
|
+
`sw-button--${__props.size}`,
|
|
46
|
+
`sw-button--${__props.shape}`,
|
|
47
|
+
{ "is-disabled": __props.disabled },
|
|
48
|
+
{ "is-loading": __props.loading },
|
|
49
|
+
{ "is-block": __props.block },
|
|
50
|
+
{ "is-round": __props.round },
|
|
51
|
+
{ "is-plain": __props.plain },
|
|
52
|
+
{ "is-outline": __props.outline },
|
|
53
|
+
{ "is-link": __props.link }
|
|
59
54
|
]]),
|
|
60
|
-
disabled:
|
|
55
|
+
disabled: __props.disabled || __props.loading,
|
|
61
56
|
onClick: handleClick
|
|
62
57
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
__props.loading ? (openBlock(), createElementBlock("view", _hoisted_2$9, [..._cache[0] || (_cache[0] = [
|
|
59
|
+
createElementVNode("text", { class: "loading-spinner" }, null, -1)
|
|
60
|
+
])])) : createCommentVNode("", true),
|
|
61
|
+
!__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
62
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_3$9, [
|
|
66
63
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
67
64
|
])) : createCommentVNode("", true),
|
|
68
|
-
|
|
65
|
+
__props.icon ? (openBlock(), createElementBlock("text", {
|
|
69
66
|
key: 1,
|
|
70
|
-
class: normalizeClass(["sw-button__icon", [
|
|
67
|
+
class: normalizeClass(["sw-button__icon", [__props.icon]])
|
|
71
68
|
}, null, 2)) : createCommentVNode("", true)
|
|
72
69
|
], 64)) : createCommentVNode("", true),
|
|
73
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("text",
|
|
70
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("text", _hoisted_4$6, [
|
|
74
71
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
75
72
|
])) : createCommentVNode("", true)
|
|
76
73
|
], 10, _hoisted_1$a);
|
|
@@ -84,19 +81,17 @@ const _export_sfc = (sfc, props) => {
|
|
|
84
81
|
}
|
|
85
82
|
return target;
|
|
86
83
|
};
|
|
87
|
-
const
|
|
88
|
-
const _withScopeId$3 = (n) => (pushScopeId("data-v-a2785685"), n = n(), popScopeId(), n);
|
|
84
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-02c23a30"]]);
|
|
89
85
|
const _hoisted_1$9 = { class: "dialog-content" };
|
|
90
86
|
const _hoisted_2$8 = { class: "dialog-icon" };
|
|
91
87
|
const _hoisted_3$8 = ["src"];
|
|
92
|
-
const _hoisted_4$
|
|
88
|
+
const _hoisted_4$5 = {
|
|
93
89
|
key: 1,
|
|
94
90
|
class: "default-icon"
|
|
95
91
|
};
|
|
96
92
|
const _hoisted_5$4 = { class: "dialog-title" };
|
|
97
93
|
const _hoisted_6$4 = { class: "dialog-description" };
|
|
98
|
-
const _hoisted_7$
|
|
99
|
-
const _hoisted_8$4 = { class: "dialog-buttons" };
|
|
94
|
+
const _hoisted_7$2 = { class: "dialog-buttons" };
|
|
100
95
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
101
96
|
__name: "index",
|
|
102
97
|
props: {
|
|
@@ -112,7 +107,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
112
107
|
emits: ["update:modelValue", "confirm", "cancel"],
|
|
113
108
|
setup(__props, { emit: __emit }) {
|
|
114
109
|
useCssVars((_ctx) => ({
|
|
115
|
-
"
|
|
110
|
+
"v1f434a4e": _ctx.maskOpacity
|
|
116
111
|
}));
|
|
117
112
|
const props = __props;
|
|
118
113
|
const emit = __emit;
|
|
@@ -149,18 +144,18 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
149
144
|
}, [
|
|
150
145
|
createElementVNode("view", _hoisted_1$9, [
|
|
151
146
|
createElementVNode("view", _hoisted_2$8, [
|
|
152
|
-
|
|
147
|
+
__props.icon ? (openBlock(), createElementBlock("image", {
|
|
153
148
|
key: 0,
|
|
154
|
-
src:
|
|
149
|
+
src: __props.icon,
|
|
155
150
|
alt: "dialog-icon"
|
|
156
|
-
}, null, 8, _hoisted_3$8)) : (openBlock(), createElementBlock("view", _hoisted_4$
|
|
151
|
+
}, null, 8, _hoisted_3$8)) : (openBlock(), createElementBlock("view", _hoisted_4$5))
|
|
157
152
|
]),
|
|
158
|
-
createElementVNode("text", _hoisted_5$4, toDisplayString(
|
|
159
|
-
createElementVNode("text", _hoisted_6$4, toDisplayString(
|
|
153
|
+
createElementVNode("text", _hoisted_5$4, toDisplayString(__props.title), 1),
|
|
154
|
+
createElementVNode("text", _hoisted_6$4, toDisplayString(__props.description), 1)
|
|
160
155
|
]),
|
|
161
|
-
|
|
162
|
-
createElementVNode("view",
|
|
163
|
-
|
|
156
|
+
_cache[1] || (_cache[1] = createElementVNode("view", { class: "dialog-divider" }, null, -1)),
|
|
157
|
+
createElementVNode("view", _hoisted_7$2, [
|
|
158
|
+
__props.type === "open-app" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
164
159
|
createElementVNode("view", {
|
|
165
160
|
class: "dialog-button dialog-button-cancel",
|
|
166
161
|
onClick: handleCancel
|
|
@@ -169,11 +164,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
169
164
|
class: "dialog-button dialog-button-primary",
|
|
170
165
|
onClick: handleConfirm
|
|
171
166
|
}, " 打开app ")
|
|
172
|
-
], 64)) :
|
|
167
|
+
], 64)) : __props.type === "confirm" ? (openBlock(), createElementBlock("view", {
|
|
173
168
|
key: 1,
|
|
174
169
|
class: "dialog-button dialog-button-full dialog-button-primary",
|
|
175
170
|
onClick: handleConfirm
|
|
176
|
-
}, " 知道了 ")) :
|
|
171
|
+
}, " 知道了 ")) : __props.type === "continue" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
177
172
|
createElementVNode("view", {
|
|
178
173
|
class: "dialog-button dialog-button-cancel",
|
|
179
174
|
onClick: handleCancel
|
|
@@ -189,7 +184,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
189
184
|
};
|
|
190
185
|
}
|
|
191
186
|
});
|
|
192
|
-
const
|
|
187
|
+
const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-a2785685"]]);
|
|
193
188
|
const _hoisted_1$8 = {
|
|
194
189
|
key: 0,
|
|
195
190
|
class: "sw-divider__text"
|
|
@@ -207,9 +202,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
207
202
|
return (_ctx, _cache) => {
|
|
208
203
|
return openBlock(), createElementBlock("view", {
|
|
209
204
|
class: normalizeClass(["sw-divider", [
|
|
210
|
-
{ "is-vertical":
|
|
211
|
-
{ "is-dashed":
|
|
212
|
-
{ [`sw-divider--${
|
|
205
|
+
{ "is-vertical": __props.vertical },
|
|
206
|
+
{ "is-dashed": __props.dashed },
|
|
207
|
+
{ [`sw-divider--${__props.position}`]: __props.position !== "center" }
|
|
213
208
|
]])
|
|
214
209
|
}, [
|
|
215
210
|
_ctx.$slots.default ? (openBlock(), createElementBlock("text", _hoisted_1$8, [
|
|
@@ -219,576 +214,596 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
219
214
|
};
|
|
220
215
|
}
|
|
221
216
|
});
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
];
|
|
217
|
+
const Divider = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-b668cd0b"]]);
|
|
218
|
+
function useDropdownSelect(props, emit) {
|
|
219
|
+
const isOpen = ref(false);
|
|
220
|
+
const displayText = computed(() => {
|
|
221
|
+
var _a, _b;
|
|
222
|
+
if (!((_a = props.options) == null ? void 0 : _a.length)) {
|
|
223
|
+
return "请选择";
|
|
224
|
+
}
|
|
225
|
+
if (props.modelValue !== void 0 && props.modelValue !== null) {
|
|
226
|
+
const matched = props.options.find(
|
|
227
|
+
(opt) => opt.value === props.modelValue
|
|
228
|
+
);
|
|
229
|
+
if (matched)
|
|
230
|
+
return matched.text;
|
|
231
|
+
}
|
|
232
|
+
return ((_b = props.options[0]) == null ? void 0 : _b.text) || "请选择";
|
|
233
|
+
});
|
|
234
|
+
const internalValue = computed({
|
|
235
|
+
get() {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
if (props.modelValue !== void 0 && props.modelValue !== null) {
|
|
238
|
+
return props.modelValue;
|
|
239
|
+
}
|
|
240
|
+
return ((_b = (_a = props.options) == null ? void 0 : _a[0]) == null ? void 0 : _b.value) ?? "";
|
|
241
|
+
},
|
|
242
|
+
set(val) {
|
|
243
|
+
emit("update:modelValue", val);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
const handleChange = (value) => {
|
|
247
|
+
emit("change", value);
|
|
248
|
+
};
|
|
249
|
+
const handleOpen = () => {
|
|
250
|
+
isOpen.value = true;
|
|
251
|
+
};
|
|
252
|
+
const handleClose = () => {
|
|
253
|
+
isOpen.value = false;
|
|
254
|
+
};
|
|
255
|
+
return {
|
|
256
|
+
displayText,
|
|
257
|
+
internalValue,
|
|
258
|
+
isOpen,
|
|
259
|
+
handleChange,
|
|
260
|
+
handleOpen,
|
|
261
|
+
handleClose
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
const _hoisted_1$7 = { class: "dropdown-select" };
|
|
265
|
+
const _hoisted_2$7 = { class: "dropdown-title" };
|
|
266
|
+
const _hoisted_3$7 = { class: "dropdown-text" };
|
|
246
267
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
247
268
|
__name: "index",
|
|
248
269
|
props: {
|
|
249
|
-
modelValue: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
animation: { default: "slide" },
|
|
253
|
-
mask: { type: Boolean, default: true },
|
|
254
|
-
maskOpacity: { default: 0.5 },
|
|
255
|
-
closeOnMaskClick: { type: Boolean, default: true },
|
|
256
|
-
showCloseButton: { type: Boolean, default: true },
|
|
257
|
-
closeOnEsc: { type: Boolean, default: true },
|
|
258
|
-
showConfirmButton: { type: Boolean, default: false },
|
|
259
|
-
confirmText: { default: "确定" },
|
|
260
|
-
showCancelButton: { type: Boolean, default: false },
|
|
261
|
-
cancelText: { default: "取消" },
|
|
262
|
-
width: { default: "50%" },
|
|
263
|
-
height: { default: "100%" },
|
|
264
|
-
maxWidth: { default: "500px" },
|
|
265
|
-
lockScroll: { type: Boolean, default: true }
|
|
270
|
+
modelValue: {},
|
|
271
|
+
iconName: { default: "arrow-down" },
|
|
272
|
+
options: {}
|
|
266
273
|
},
|
|
267
|
-
emits: ["update:modelValue", "
|
|
274
|
+
emits: ["update:modelValue", "change"],
|
|
268
275
|
setup(__props, { emit: __emit }) {
|
|
269
276
|
const props = __props;
|
|
270
277
|
const emit = __emit;
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if (newVal) {
|
|
278
|
-
onOpen();
|
|
279
|
-
} else {
|
|
280
|
-
onClose();
|
|
281
|
-
}
|
|
278
|
+
const { displayText, internalValue, handleChange, handleOpen, handleClose } = useDropdownSelect(props, emit);
|
|
279
|
+
const isOpen = ref(false);
|
|
280
|
+
const selectedIndex = computed(() => {
|
|
281
|
+
if (!props.options || !props.options.length)
|
|
282
|
+
return 0;
|
|
283
|
+
return props.options.findIndex((opt) => opt.value === internalValue.value);
|
|
282
284
|
});
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (
|
|
286
|
-
|
|
285
|
+
function togglePicker() {
|
|
286
|
+
isOpen.value = !isOpen.value;
|
|
287
|
+
if (isOpen.value) {
|
|
288
|
+
handleOpen();
|
|
287
289
|
} else {
|
|
288
|
-
onClose();
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
function onOpen() {
|
|
292
|
-
if (props.lockScroll) {
|
|
293
|
-
lockScroll();
|
|
294
|
-
}
|
|
295
|
-
if (props.closeOnEsc) {
|
|
296
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
297
|
-
}
|
|
298
|
-
emit("open");
|
|
299
|
-
}
|
|
300
|
-
function onClose() {
|
|
301
|
-
if (props.lockScroll) {
|
|
302
|
-
unlockScroll();
|
|
303
|
-
}
|
|
304
|
-
window.removeEventListener("keydown", handleKeyDown);
|
|
305
|
-
emit("close");
|
|
306
|
-
}
|
|
307
|
-
function lockScroll() {
|
|
308
|
-
lastScrollY.value = window.scrollY;
|
|
309
|
-
document.body.style.position = "fixed";
|
|
310
|
-
document.body.style.top = `-${lastScrollY.value}px`;
|
|
311
|
-
document.body.style.left = "0";
|
|
312
|
-
document.body.style.right = "0";
|
|
313
|
-
document.body.style.overflow = "hidden";
|
|
314
|
-
uni.hideTabBar();
|
|
315
|
-
}
|
|
316
|
-
function unlockScroll() {
|
|
317
|
-
document.body.style.position = "";
|
|
318
|
-
document.body.style.top = "";
|
|
319
|
-
document.body.style.left = "";
|
|
320
|
-
document.body.style.right = "";
|
|
321
|
-
document.body.style.overflow = "";
|
|
322
|
-
window.scrollTo(0, lastScrollY.value);
|
|
323
|
-
uni.showTabBar();
|
|
324
|
-
}
|
|
325
|
-
function handleKeyDown(e) {
|
|
326
|
-
if (e.key === "Escape" && props.closeOnEsc && showPopup.value) {
|
|
327
|
-
handleClose();
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function handleMaskClick() {
|
|
331
|
-
if (props.closeOnMaskClick) {
|
|
332
290
|
handleClose();
|
|
333
291
|
}
|
|
334
|
-
emit("maskClick");
|
|
335
|
-
}
|
|
336
|
-
function handleClose() {
|
|
337
|
-
isClosing.value = true;
|
|
338
|
-
emit("closeButtonClick");
|
|
339
|
-
}
|
|
340
|
-
function handleAnimationEnd() {
|
|
341
|
-
if (isClosing.value) {
|
|
342
|
-
isClosing.value = false;
|
|
343
|
-
showPopup.value = false;
|
|
344
|
-
}
|
|
345
292
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
293
|
+
function onPickerChange(e) {
|
|
294
|
+
const index2 = e.detail.value;
|
|
295
|
+
const selectedOption = props.options[index2];
|
|
296
|
+
handleChange(selectedOption.value);
|
|
297
|
+
isOpen.value = false;
|
|
298
|
+
handleClose();
|
|
348
299
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
300
|
+
function onPickerCancel() {
|
|
301
|
+
isOpen.value = false;
|
|
351
302
|
handleClose();
|
|
352
303
|
}
|
|
353
|
-
onMounted(() => {
|
|
354
|
-
if (showPopup.value) {
|
|
355
|
-
onOpen();
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
onUnmounted(() => {
|
|
359
|
-
if (showPopup.value) {
|
|
360
|
-
onClose();
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
304
|
return (_ctx, _cache) => {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
"modal": _ctx.mask,
|
|
367
|
-
"non-modal": !_ctx.mask,
|
|
368
|
-
"closing": isClosing.value
|
|
369
|
-
}]),
|
|
370
|
-
onClick: withModifiers(handleMaskClick, ["self"])
|
|
371
|
-
}, [
|
|
372
|
-
_ctx.mask ? (openBlock(), createElementBlock("view", {
|
|
373
|
-
key: 0,
|
|
374
|
-
class: "popup-mask",
|
|
375
|
-
style: normalizeStyle({ opacity: _ctx.maskOpacity }),
|
|
376
|
-
onClick: handleMaskClick
|
|
377
|
-
}, null, 4)) : createCommentVNode("", true),
|
|
305
|
+
const _component_picker = resolveComponent("picker");
|
|
306
|
+
return openBlock(), createElementBlock("view", _hoisted_1$7, [
|
|
378
307
|
createElementVNode("view", {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
class: normalizeClass(["popup-container", [
|
|
382
|
-
`position-${_ctx.position}`,
|
|
383
|
-
`animation-${_ctx.animation}`,
|
|
384
|
-
{ closing: isClosing.value }
|
|
385
|
-
]]),
|
|
386
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
387
|
-
}, ["stop"])),
|
|
388
|
-
onTouchmove: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
389
|
-
}, ["stop"])),
|
|
390
|
-
onAnimationend: handleAnimationEnd
|
|
308
|
+
class: "dropdown-trigger",
|
|
309
|
+
onTap: togglePicker
|
|
391
310
|
}, [
|
|
392
|
-
_ctx.$slots
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
onClick: handleClose
|
|
418
|
-
}, _hoisted_8$3)) : createCommentVNode("", true)
|
|
419
|
-
], 34)
|
|
420
|
-
], 2)), [
|
|
421
|
-
[vShow, showPopup.value]
|
|
311
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ text: unref(displayText) })), () => [
|
|
312
|
+
createElementVNode("view", _hoisted_2$7, [
|
|
313
|
+
createElementVNode("text", _hoisted_3$7, toDisplayString(unref(displayText)), 1),
|
|
314
|
+
createElementVNode("text", {
|
|
315
|
+
class: normalizeClass(["dropdown-icon", { "is-active": isOpen.value }])
|
|
316
|
+
}, [
|
|
317
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
318
|
+
createElementVNode("view", {
|
|
319
|
+
class: normalizeClass(["uni-icon", __props.iconName])
|
|
320
|
+
}, null, 2)
|
|
321
|
+
])
|
|
322
|
+
], 2)
|
|
323
|
+
])
|
|
324
|
+
])
|
|
325
|
+
], 32),
|
|
326
|
+
isOpen.value ? (openBlock(), createBlock(_component_picker, {
|
|
327
|
+
key: 0,
|
|
328
|
+
mode: "selector",
|
|
329
|
+
range: __props.options,
|
|
330
|
+
"range-key": "text",
|
|
331
|
+
value: selectedIndex.value,
|
|
332
|
+
class: "dropdown-picker",
|
|
333
|
+
onChange: onPickerChange,
|
|
334
|
+
onCancel: onPickerCancel
|
|
335
|
+
}, null, 8, ["range", "value"])) : createCommentVNode("", true)
|
|
422
336
|
]);
|
|
423
337
|
};
|
|
424
338
|
}
|
|
425
339
|
});
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
};
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
const
|
|
340
|
+
function useDropdownWithBadge(props) {
|
|
341
|
+
const hasBadge = computed(() => {
|
|
342
|
+
return props.hideBadge(props.modelValue);
|
|
343
|
+
});
|
|
344
|
+
return { hasBadge };
|
|
345
|
+
}
|
|
346
|
+
const _hoisted_1$6 = { class: "dropdown-title" };
|
|
347
|
+
const _hoisted_2$6 = { class: "dropdown-text" };
|
|
348
|
+
const _hoisted_3$6 = { class: "dropdown-icon" };
|
|
349
|
+
const _hoisted_4$4 = { class: "dropdown-with-badge__dot" };
|
|
350
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
351
|
+
__name: "index",
|
|
352
|
+
props: {
|
|
353
|
+
hideBadge: { type: Function, default: (modelValue) => modelValue === "" || modelValue === null || modelValue === void 0 }
|
|
354
|
+
},
|
|
355
|
+
emits: ["update:modelValue", "change"],
|
|
356
|
+
setup(__props, { emit: __emit }) {
|
|
357
|
+
const props = __props;
|
|
358
|
+
const emit = __emit;
|
|
359
|
+
const { hasBadge } = useDropdownWithBadge(props);
|
|
360
|
+
return (_ctx, _cache) => {
|
|
361
|
+
return openBlock(), createBlock(unref(_sfc_main$7), mergeProps({ modelValue: _ctx.modelValue, options: _ctx.options }, { class: "dropdown-with-badge" }, toHandlers(emit)), {
|
|
362
|
+
default: withCtx(({ text }) => [
|
|
363
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ text })), () => [
|
|
364
|
+
createElementVNode("view", _hoisted_1$6, [
|
|
365
|
+
createElementVNode("text", _hoisted_2$6, toDisplayString(text), 1),
|
|
366
|
+
createElementVNode("text", _hoisted_3$6, [
|
|
367
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
368
|
+
createElementVNode("view", {
|
|
369
|
+
class: normalizeClass(["uni-icon", _ctx.iconName])
|
|
370
|
+
}, null, 2)
|
|
371
|
+
])
|
|
372
|
+
])
|
|
373
|
+
]),
|
|
374
|
+
withDirectives(createElementVNode("text", _hoisted_4$4, null, 512), [
|
|
375
|
+
[vShow, !unref(hasBadge)]
|
|
376
|
+
])
|
|
377
|
+
])
|
|
378
|
+
]),
|
|
379
|
+
_: 3
|
|
380
|
+
}, 16);
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
function useHasBadge(model) {
|
|
385
|
+
if (!model) {
|
|
386
|
+
return computed(() => false);
|
|
387
|
+
}
|
|
388
|
+
if (typeof model === "function") {
|
|
389
|
+
return computed(() => model());
|
|
390
|
+
}
|
|
391
|
+
if (isRef(model)) {
|
|
392
|
+
return computed(() => {
|
|
393
|
+
if (!model.value)
|
|
394
|
+
return false;
|
|
395
|
+
const obj = model.value;
|
|
396
|
+
for (const key in obj) {
|
|
397
|
+
if (obj[key]) {
|
|
398
|
+
return true;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return false;
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
return computed(() => {
|
|
405
|
+
for (const key in model) {
|
|
406
|
+
const val = model[key];
|
|
407
|
+
if (val) {
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return false;
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
function useFilterDrawer(props, emit) {
|
|
415
|
+
const visible = ref(false);
|
|
416
|
+
const hasBadge = useHasBadge(props.modelValue);
|
|
417
|
+
const openDrawer = () => {
|
|
418
|
+
visible.value = true;
|
|
419
|
+
};
|
|
420
|
+
const closeDrawer = () => {
|
|
421
|
+
visible.value = false;
|
|
422
|
+
};
|
|
423
|
+
const resetDrawer = () => {
|
|
424
|
+
emit("reset");
|
|
425
|
+
closeDrawer();
|
|
426
|
+
};
|
|
427
|
+
const queryDrawer = () => {
|
|
428
|
+
emit("query");
|
|
429
|
+
closeDrawer();
|
|
430
|
+
};
|
|
431
|
+
return {
|
|
432
|
+
visible,
|
|
433
|
+
openDrawer,
|
|
434
|
+
closeDrawer,
|
|
435
|
+
resetDrawer,
|
|
436
|
+
queryDrawer,
|
|
437
|
+
hasBadge
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
const _hoisted_1$5 = {
|
|
444
441
|
key: 0,
|
|
445
|
-
class: "
|
|
442
|
+
class: "filter-drawer__badge-dot"
|
|
446
443
|
};
|
|
447
|
-
const
|
|
444
|
+
const _hoisted_2$5 = {
|
|
448
445
|
key: 1,
|
|
449
|
-
class: "
|
|
446
|
+
class: "filter-drawer__popup",
|
|
447
|
+
style: { height: "100vh", width: "100vw" }
|
|
450
448
|
};
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
const _hoisted_3$5 = { class: "filter-drawer" };
|
|
450
|
+
const _hoisted_4$3 = { class: "filter-drawer__header" };
|
|
451
|
+
const _hoisted_5$3 = { class: "filter-drawer__body" };
|
|
452
|
+
const _hoisted_6$3 = { class: "filter-drawer__footer" };
|
|
453
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
454
|
+
__name: "index",
|
|
455
|
+
props: {
|
|
456
|
+
hasBadge: { type: Boolean, default: false },
|
|
457
|
+
modelValue: {}
|
|
458
|
+
},
|
|
459
|
+
emits: ["reset", "query"],
|
|
460
|
+
setup(__props, { emit: __emit }) {
|
|
461
|
+
const props = __props;
|
|
462
|
+
const emit = __emit;
|
|
463
|
+
const { visible, openDrawer, closeDrawer, resetDrawer, queryDrawer, hasBadge } = useFilterDrawer(props, emit);
|
|
464
|
+
return (_ctx, _cache) => {
|
|
465
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
466
|
+
createElementVNode("view", {
|
|
467
|
+
class: "filter-drawer__trigger",
|
|
468
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
469
|
+
(...args) => unref(openDrawer) && unref(openDrawer)(...args))
|
|
470
|
+
}, [
|
|
471
|
+
renderSlot(_ctx.$slots, "trigger", {}, () => [
|
|
472
|
+
_cache[5] || (_cache[5] = createElementVNode("view", { class: "uni-icon icon-filter-o" }, null, -1))
|
|
473
|
+
]),
|
|
474
|
+
unref(hasBadge) ? (openBlock(), createElementBlock("text", _hoisted_1$5)) : createCommentVNode("", true)
|
|
475
|
+
]),
|
|
476
|
+
unref(visible) ? (openBlock(), createElementBlock("view", {
|
|
477
|
+
key: 0,
|
|
478
|
+
class: "filter-drawer__popup-mask",
|
|
479
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
480
|
+
(...args) => unref(closeDrawer) && unref(closeDrawer)(...args))
|
|
481
|
+
})) : createCommentVNode("", true),
|
|
482
|
+
unref(visible) ? (openBlock(), createElementBlock("view", _hoisted_2$5, [
|
|
483
|
+
createElementVNode("view", {
|
|
484
|
+
class: "filter-drawer__close",
|
|
485
|
+
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
486
|
+
(...args) => unref(closeDrawer) && unref(closeDrawer)(...args))
|
|
487
|
+
}, " × "),
|
|
488
|
+
createElementVNode("view", _hoisted_3$5, [
|
|
489
|
+
createElementVNode("view", _hoisted_4$3, [
|
|
490
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
491
|
+
_cache[6] || (_cache[6] = createElementVNode("text", { class: "filter-drawer__title" }, "筛选", -1))
|
|
492
|
+
])
|
|
493
|
+
]),
|
|
494
|
+
createElementVNode("view", _hoisted_5$3, [
|
|
495
|
+
renderSlot(_ctx.$slots, "default")
|
|
496
|
+
]),
|
|
497
|
+
createElementVNode("view", _hoisted_6$3, [
|
|
498
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
499
|
+
createElementVNode("view", {
|
|
500
|
+
class: "filter-drawer__button filter-drawer__button--plain",
|
|
501
|
+
onClick: _cache[3] || (_cache[3] = //@ts-ignore
|
|
502
|
+
(...args) => unref(resetDrawer) && unref(resetDrawer)(...args))
|
|
503
|
+
}, " 重置条件 "),
|
|
504
|
+
createElementVNode("view", {
|
|
505
|
+
class: "filter-drawer__button",
|
|
506
|
+
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
507
|
+
(...args) => unref(queryDrawer) && unref(queryDrawer)(...args))
|
|
508
|
+
}, " 查询 ")
|
|
509
|
+
])
|
|
510
|
+
])
|
|
511
|
+
])
|
|
512
|
+
])) : createCommentVNode("", true)
|
|
513
|
+
], 64);
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
const _hoisted_1$4 = { class: "sw-infinite-scroll__content" };
|
|
518
|
+
const _hoisted_2$4 = {
|
|
519
|
+
key: 0,
|
|
520
|
+
class: "sw-infinite-scroll__loading"
|
|
454
521
|
};
|
|
455
|
-
const
|
|
456
|
-
key:
|
|
457
|
-
class: "sw-
|
|
522
|
+
const _hoisted_3$4 = {
|
|
523
|
+
key: 1,
|
|
524
|
+
class: "sw-infinite-scroll__finished"
|
|
458
525
|
};
|
|
459
|
-
const _sfc_main$
|
|
526
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
460
527
|
__name: "index",
|
|
461
528
|
props: {
|
|
462
|
-
modelValue: { type: Boolean, default: false },
|
|
463
|
-
type: { default: "text" },
|
|
464
|
-
position: { default: "middle" },
|
|
465
|
-
message: { default: "" },
|
|
466
|
-
duration: { default: 3e3 },
|
|
467
529
|
loading: { type: Boolean, default: false },
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
530
|
+
finished: { type: Boolean, default: false },
|
|
531
|
+
offset: { default: 100 },
|
|
532
|
+
loadingText: { default: "加载中..." },
|
|
533
|
+
finishedText: { default: "没有更多了" },
|
|
534
|
+
disabled: { type: Boolean, default: false },
|
|
535
|
+
height: { default: "auto" }
|
|
472
536
|
},
|
|
473
|
-
emits: ["
|
|
474
|
-
setup(__props, {
|
|
537
|
+
emits: ["load"],
|
|
538
|
+
setup(__props, { emit: __emit }) {
|
|
475
539
|
const props = __props;
|
|
476
540
|
const emit = __emit;
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
if (props.loading)
|
|
483
|
-
return true;
|
|
484
|
-
if (props.type === "text")
|
|
485
|
-
return props.icon;
|
|
486
|
-
return true;
|
|
541
|
+
const scrollContainer = ref(null);
|
|
542
|
+
const containerStyle = computed(() => {
|
|
543
|
+
return {
|
|
544
|
+
height: typeof props.height === "number" ? `${props.height}px` : props.height
|
|
545
|
+
};
|
|
487
546
|
});
|
|
488
|
-
function
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
function close() {
|
|
492
|
-
if (!showToast.value)
|
|
547
|
+
function handleScroll() {
|
|
548
|
+
if (!scrollContainer.value || props.loading || props.finished || props.disabled) {
|
|
493
549
|
return;
|
|
494
|
-
isClosing.value = true;
|
|
495
|
-
emit("close");
|
|
496
|
-
}
|
|
497
|
-
function startTimer() {
|
|
498
|
-
clearTimer();
|
|
499
|
-
if (props.duration > 0 && !props.loading) {
|
|
500
|
-
timer = setTimeout(() => {
|
|
501
|
-
close();
|
|
502
|
-
}, props.duration);
|
|
503
550
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
clearTimeout(timer);
|
|
508
|
-
timer = null;
|
|
551
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollContainer.value;
|
|
552
|
+
if (scrollHeight - scrollTop - clientHeight <= props.offset) {
|
|
553
|
+
emit("load");
|
|
509
554
|
}
|
|
510
555
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
emit("update:modelValue", false);
|
|
556
|
+
let resizeTimeout = null;
|
|
557
|
+
function handleResize() {
|
|
558
|
+
if (resizeTimeout) {
|
|
559
|
+
clearTimeout(resizeTimeout);
|
|
516
560
|
}
|
|
561
|
+
resizeTimeout = setTimeout(() => {
|
|
562
|
+
handleScroll();
|
|
563
|
+
}, 100);
|
|
517
564
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
565
|
+
onMounted(() => {
|
|
566
|
+
handleScroll();
|
|
567
|
+
window.addEventListener("resize", handleResize);
|
|
568
|
+
});
|
|
569
|
+
onUnmounted(() => {
|
|
570
|
+
window.removeEventListener("resize", handleResize);
|
|
571
|
+
if (resizeTimeout) {
|
|
572
|
+
clearTimeout(resizeTimeout);
|
|
525
573
|
}
|
|
526
574
|
});
|
|
527
|
-
watch(() => props.message, () => {
|
|
528
|
-
if (showToast.value && !props.loading) {
|
|
529
|
-
startTimer();
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
onMounted(() => {
|
|
533
|
-
if (props.modelValue) {
|
|
534
|
-
startTimer();
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
onUnmounted(() => {
|
|
538
|
-
clearTimer();
|
|
539
|
-
});
|
|
540
|
-
__expose({
|
|
541
|
-
/**
|
|
542
|
-
* 手动关闭Toast
|
|
543
|
-
*/
|
|
544
|
-
close
|
|
545
|
-
});
|
|
546
575
|
return (_ctx, _cache) => {
|
|
547
|
-
return
|
|
548
|
-
ref_key: "
|
|
549
|
-
ref:
|
|
550
|
-
class:
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
{ "sw-toast--large": _ctx.large },
|
|
554
|
-
{ "sw-toast--text": !showIcon.value && _ctx.type === "text" },
|
|
555
|
-
{ "sw-toast--show": showToast.value && !isClosing.value },
|
|
556
|
-
{ "sw-toast--hide": showToast.value && isClosing.value }
|
|
557
|
-
]]),
|
|
558
|
-
style: normalizeStyle(_ctx.customStyle),
|
|
559
|
-
onClick,
|
|
560
|
-
onTransitionend: handleTransitionEnd
|
|
576
|
+
return openBlock(), createElementBlock("view", {
|
|
577
|
+
ref_key: "scrollContainer",
|
|
578
|
+
ref: scrollContainer,
|
|
579
|
+
class: "sw-infinite-scroll",
|
|
580
|
+
style: normalizeStyle(containerStyle.value),
|
|
581
|
+
onScroll: handleScroll
|
|
561
582
|
}, [
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
])
|
|
565
|
-
|
|
583
|
+
createElementVNode("view", _hoisted_1$4, [
|
|
584
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
585
|
+
]),
|
|
586
|
+
__props.loading ? (openBlock(), createElementBlock("view", _hoisted_2$4, [
|
|
587
|
+
_cache[0] || (_cache[0] = createElementVNode("view", { class: "loading-spinner" }, null, -1)),
|
|
588
|
+
createElementVNode("text", null, toDisplayString(__props.loadingText), 1)
|
|
566
589
|
])) : createCommentVNode("", true),
|
|
567
|
-
|
|
568
|
-
],
|
|
569
|
-
[vShow, showToast.value]
|
|
570
|
-
]);
|
|
590
|
+
__props.finished && !__props.loading ? (openBlock(), createElementBlock("view", _hoisted_3$4, toDisplayString(__props.finishedText), 1)) : createCommentVNode("", true)
|
|
591
|
+
], 36);
|
|
571
592
|
};
|
|
572
593
|
}
|
|
573
594
|
});
|
|
574
|
-
const
|
|
575
|
-
const _hoisted_1$
|
|
576
|
-
const _hoisted_2$5 = {
|
|
595
|
+
const InfiniteScroll = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2e49050a"]]);
|
|
596
|
+
const _hoisted_1$3 = {
|
|
577
597
|
key: 0,
|
|
578
|
-
class: "
|
|
598
|
+
class: "popup-header"
|
|
579
599
|
};
|
|
580
|
-
const
|
|
581
|
-
|
|
600
|
+
const _hoisted_2$3 = {
|
|
601
|
+
key: 1,
|
|
602
|
+
class: "popup-header"
|
|
603
|
+
};
|
|
604
|
+
const _hoisted_3$3 = { class: "popup-title" };
|
|
605
|
+
const _hoisted_4$2 = { class: "popup-content" };
|
|
606
|
+
const _hoisted_5$2 = {
|
|
607
|
+
key: 2,
|
|
608
|
+
class: "popup-footer"
|
|
609
|
+
};
|
|
610
|
+
const _hoisted_6$2 = {
|
|
611
|
+
key: 3,
|
|
612
|
+
class: "popup-footer"
|
|
613
|
+
};
|
|
614
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
582
615
|
__name: "index",
|
|
583
616
|
props: {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
617
|
+
modelValue: { type: Boolean, default: false },
|
|
618
|
+
title: { default: "" },
|
|
619
|
+
position: { default: "center" },
|
|
620
|
+
animation: { default: "slide" },
|
|
621
|
+
mask: { type: Boolean, default: true },
|
|
622
|
+
maskOpacity: { default: 0.5 },
|
|
623
|
+
closeOnMaskClick: { type: Boolean, default: true },
|
|
624
|
+
showCloseButton: { type: Boolean, default: true },
|
|
625
|
+
closeOnEsc: { type: Boolean, default: true },
|
|
626
|
+
showConfirmButton: { type: Boolean, default: false },
|
|
627
|
+
confirmText: { default: "确定" },
|
|
628
|
+
showCancelButton: { type: Boolean, default: false },
|
|
629
|
+
cancelText: { default: "取消" },
|
|
630
|
+
width: { default: "50%" },
|
|
631
|
+
height: { default: "100%" },
|
|
632
|
+
maxWidth: { default: "500px" },
|
|
633
|
+
lockScroll: { type: Boolean, default: true }
|
|
592
634
|
},
|
|
593
|
-
emits: ["
|
|
594
|
-
setup(__props, {
|
|
635
|
+
emits: ["update:modelValue", "open", "close", "maskClick", "confirm", "cancel", "closeButtonClick"],
|
|
636
|
+
setup(__props, { emit: __emit }) {
|
|
595
637
|
const props = __props;
|
|
596
638
|
const emit = __emit;
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
639
|
+
const popupRef = ref(null);
|
|
640
|
+
const showPopup = ref(props.modelValue);
|
|
641
|
+
const isClosing = ref(false);
|
|
642
|
+
const lastScrollY = ref(0);
|
|
643
|
+
watch(() => props.modelValue, (newVal) => {
|
|
644
|
+
showPopup.value = newVal;
|
|
645
|
+
if (newVal) {
|
|
646
|
+
onOpen();
|
|
647
|
+
} else {
|
|
648
|
+
onClose();
|
|
604
649
|
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
650
|
+
});
|
|
651
|
+
watch(() => showPopup.value, (newVal) => {
|
|
652
|
+
emit("update:modelValue", newVal);
|
|
653
|
+
if (newVal) {
|
|
654
|
+
onOpen();
|
|
655
|
+
} else {
|
|
656
|
+
onClose();
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
function onOpen() {
|
|
660
|
+
if (props.lockScroll) {
|
|
661
|
+
lockScroll();
|
|
662
|
+
}
|
|
663
|
+
if (props.closeOnEsc) {
|
|
664
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
610
665
|
}
|
|
666
|
+
emit("open");
|
|
611
667
|
}
|
|
612
|
-
function
|
|
613
|
-
if (props.
|
|
614
|
-
|
|
615
|
-
} else if (currentIndex.value > 0) {
|
|
616
|
-
currentIndex.value--;
|
|
668
|
+
function onClose() {
|
|
669
|
+
if (props.lockScroll) {
|
|
670
|
+
unlockScroll();
|
|
617
671
|
}
|
|
618
|
-
|
|
619
|
-
emit("
|
|
672
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
673
|
+
emit("close");
|
|
620
674
|
}
|
|
621
|
-
function
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
675
|
+
function lockScroll() {
|
|
676
|
+
lastScrollY.value = window.scrollY;
|
|
677
|
+
document.body.style.position = "fixed";
|
|
678
|
+
document.body.style.top = `-${lastScrollY.value}px`;
|
|
679
|
+
document.body.style.left = "0";
|
|
680
|
+
document.body.style.right = "0";
|
|
681
|
+
document.body.style.overflow = "hidden";
|
|
682
|
+
uni.hideTabBar();
|
|
683
|
+
}
|
|
684
|
+
function unlockScroll() {
|
|
685
|
+
document.body.style.position = "";
|
|
686
|
+
document.body.style.top = "";
|
|
687
|
+
document.body.style.left = "";
|
|
688
|
+
document.body.style.right = "";
|
|
689
|
+
document.body.style.overflow = "";
|
|
690
|
+
window.scrollTo(0, lastScrollY.value);
|
|
691
|
+
uni.showTabBar();
|
|
692
|
+
}
|
|
693
|
+
function handleKeyDown(e) {
|
|
694
|
+
if (e.key === "Escape" && props.closeOnEsc && showPopup.value) {
|
|
695
|
+
handleClose();
|
|
626
696
|
}
|
|
627
|
-
emit("next", currentIndex.value);
|
|
628
|
-
emit("change", currentIndex.value);
|
|
629
697
|
}
|
|
630
|
-
|
|
631
|
-
if (
|
|
632
|
-
|
|
698
|
+
function handleMaskClick() {
|
|
699
|
+
if (props.closeOnMaskClick) {
|
|
700
|
+
handleClose();
|
|
633
701
|
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
702
|
+
emit("maskClick");
|
|
703
|
+
}
|
|
704
|
+
function handleClose() {
|
|
705
|
+
isClosing.value = true;
|
|
706
|
+
emit("closeButtonClick");
|
|
707
|
+
}
|
|
708
|
+
function handleAnimationEnd() {
|
|
709
|
+
if (isClosing.value) {
|
|
710
|
+
isClosing.value = false;
|
|
711
|
+
showPopup.value = false;
|
|
642
712
|
}
|
|
643
|
-
}
|
|
713
|
+
}
|
|
714
|
+
function handleConfirm() {
|
|
715
|
+
emit("confirm");
|
|
716
|
+
}
|
|
717
|
+
function handleCancel() {
|
|
718
|
+
emit("cancel");
|
|
719
|
+
handleClose();
|
|
720
|
+
}
|
|
644
721
|
onMounted(() => {
|
|
645
|
-
|
|
722
|
+
if (showPopup.value) {
|
|
723
|
+
onOpen();
|
|
724
|
+
}
|
|
646
725
|
});
|
|
647
726
|
onUnmounted(() => {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
prev,
|
|
652
|
-
next,
|
|
653
|
-
currentIndex
|
|
727
|
+
if (showPopup.value) {
|
|
728
|
+
onClose();
|
|
729
|
+
}
|
|
654
730
|
});
|
|
655
731
|
return (_ctx, _cache) => {
|
|
656
|
-
return openBlock(), createElementBlock("view",
|
|
732
|
+
return withDirectives((openBlock(), createElementBlock("view", {
|
|
733
|
+
class: normalizeClass(["popup-wrapper", {
|
|
734
|
+
"modal": __props.mask,
|
|
735
|
+
"non-modal": !__props.mask,
|
|
736
|
+
"closing": isClosing.value
|
|
737
|
+
}]),
|
|
738
|
+
onClick: withModifiers(handleMaskClick, ["self"])
|
|
739
|
+
}, [
|
|
740
|
+
__props.mask ? (openBlock(), createElementBlock("view", {
|
|
741
|
+
key: 0,
|
|
742
|
+
class: "popup-mask",
|
|
743
|
+
style: normalizeStyle({ opacity: __props.maskOpacity }),
|
|
744
|
+
onClick: handleMaskClick
|
|
745
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
657
746
|
createElementVNode("view", {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
747
|
+
ref_key: "popupRef",
|
|
748
|
+
ref: popupRef,
|
|
749
|
+
class: normalizeClass(["popup-container", [
|
|
750
|
+
`position-${__props.position}`,
|
|
751
|
+
`animation-${__props.animation}`,
|
|
752
|
+
{ closing: isClosing.value }
|
|
753
|
+
]]),
|
|
754
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
755
|
+
}, ["stop"])),
|
|
756
|
+
onTouchmove: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
757
|
+
}, ["stop"])),
|
|
758
|
+
onAnimationend: handleAnimationEnd
|
|
663
759
|
}, [
|
|
664
|
-
(openBlock(
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
760
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("view", _hoisted_1$3, [
|
|
761
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
762
|
+
])) : __props.title ? (openBlock(), createElementBlock("view", _hoisted_2$3, [
|
|
763
|
+
createElementVNode("text", _hoisted_3$3, toDisplayString(__props.title), 1)
|
|
764
|
+
])) : createCommentVNode("", true),
|
|
765
|
+
createElementVNode("view", _hoisted_4$2, [
|
|
766
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
767
|
+
]),
|
|
768
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("view", _hoisted_5$2, [
|
|
769
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
770
|
+
])) : __props.showConfirmButton || __props.showCancelButton ? (openBlock(), createElementBlock("view", _hoisted_6$2, [
|
|
771
|
+
__props.showCancelButton ? (openBlock(), createElementBlock("view", {
|
|
772
|
+
key: 0,
|
|
773
|
+
class: "popup-button popup-button-cancel",
|
|
774
|
+
onClick: handleCancel
|
|
775
|
+
}, toDisplayString(__props.cancelText), 1)) : createCommentVNode("", true),
|
|
776
|
+
__props.showConfirmButton ? (openBlock(), createElementBlock("view", {
|
|
777
|
+
key: 1,
|
|
778
|
+
class: "popup-button popup-button-confirm",
|
|
779
|
+
onClick: handleConfirm
|
|
780
|
+
}, toDisplayString(__props.confirmText), 1)) : createCommentVNode("", true)
|
|
781
|
+
])) : createCommentVNode("", true),
|
|
782
|
+
__props.showCloseButton ? (openBlock(), createElementBlock("view", {
|
|
783
|
+
key: 4,
|
|
784
|
+
class: "popup-close-button",
|
|
785
|
+
onClick: handleClose
|
|
786
|
+
}, [..._cache[2] || (_cache[2] = [
|
|
787
|
+
createElementVNode("text", { class: "close-icon" }, "×", -1)
|
|
788
|
+
])])) : createCommentVNode("", true)
|
|
789
|
+
], 34)
|
|
790
|
+
], 2)), [
|
|
791
|
+
[vShow, showPopup.value]
|
|
695
792
|
]);
|
|
696
793
|
};
|
|
697
794
|
}
|
|
698
795
|
});
|
|
699
|
-
const
|
|
700
|
-
const
|
|
701
|
-
const _hoisted_1$4 = { class: "sw-infinite-scroll__content" };
|
|
702
|
-
const _hoisted_2$4 = {
|
|
703
|
-
key: 0,
|
|
704
|
-
class: "sw-infinite-scroll__loading"
|
|
705
|
-
};
|
|
706
|
-
const _hoisted_3$4 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("view", { class: "loading-spinner" }, null, -1));
|
|
707
|
-
const _hoisted_4$3 = {
|
|
708
|
-
key: 1,
|
|
709
|
-
class: "sw-infinite-scroll__finished"
|
|
710
|
-
};
|
|
711
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
712
|
-
__name: "index",
|
|
713
|
-
props: {
|
|
714
|
-
loading: { type: Boolean, default: false },
|
|
715
|
-
finished: { type: Boolean, default: false },
|
|
716
|
-
offset: { default: 100 },
|
|
717
|
-
loadingText: { default: "加载中..." },
|
|
718
|
-
finishedText: { default: "没有更多了" },
|
|
719
|
-
disabled: { type: Boolean, default: false },
|
|
720
|
-
height: { default: "auto" }
|
|
721
|
-
},
|
|
722
|
-
emits: ["load"],
|
|
723
|
-
setup(__props, { emit: __emit }) {
|
|
724
|
-
const props = __props;
|
|
725
|
-
const emit = __emit;
|
|
726
|
-
const scrollContainer = ref(null);
|
|
727
|
-
const containerStyle = computed(() => {
|
|
728
|
-
return {
|
|
729
|
-
height: typeof props.height === "number" ? `${props.height}px` : props.height
|
|
730
|
-
};
|
|
731
|
-
});
|
|
732
|
-
function handleScroll() {
|
|
733
|
-
if (!scrollContainer.value || props.loading || props.finished || props.disabled) {
|
|
734
|
-
return;
|
|
735
|
-
}
|
|
736
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollContainer.value;
|
|
737
|
-
if (scrollHeight - scrollTop - clientHeight <= props.offset) {
|
|
738
|
-
emit("load");
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
let resizeTimeout = null;
|
|
742
|
-
function handleResize() {
|
|
743
|
-
if (resizeTimeout) {
|
|
744
|
-
clearTimeout(resizeTimeout);
|
|
745
|
-
}
|
|
746
|
-
resizeTimeout = setTimeout(() => {
|
|
747
|
-
handleScroll();
|
|
748
|
-
}, 100);
|
|
749
|
-
}
|
|
750
|
-
onMounted(() => {
|
|
751
|
-
handleScroll();
|
|
752
|
-
window.addEventListener("resize", handleResize);
|
|
753
|
-
});
|
|
754
|
-
onUnmounted(() => {
|
|
755
|
-
window.removeEventListener("resize", handleResize);
|
|
756
|
-
if (resizeTimeout) {
|
|
757
|
-
clearTimeout(resizeTimeout);
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
return (_ctx, _cache) => {
|
|
761
|
-
return openBlock(), createElementBlock("view", {
|
|
762
|
-
ref_key: "scrollContainer",
|
|
763
|
-
ref: scrollContainer,
|
|
764
|
-
class: "sw-infinite-scroll",
|
|
765
|
-
style: normalizeStyle(containerStyle.value),
|
|
766
|
-
onScroll: handleScroll
|
|
767
|
-
}, [
|
|
768
|
-
createElementVNode("view", _hoisted_1$4, [
|
|
769
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
770
|
-
]),
|
|
771
|
-
_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_2$4, [
|
|
772
|
-
_hoisted_3$4,
|
|
773
|
-
createElementVNode("text", null, toDisplayString(_ctx.loadingText), 1)
|
|
774
|
-
])) : createCommentVNode("", true),
|
|
775
|
-
_ctx.finished && !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_4$3, toDisplayString(_ctx.finishedText), 1)) : createCommentVNode("", true)
|
|
776
|
-
], 36);
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2e49050a"]]);
|
|
781
|
-
const _withScopeId = (n) => (pushScopeId("data-v-d2876eca"), n = n(), popScopeId(), n);
|
|
782
|
-
const _hoisted_1$3 = {
|
|
796
|
+
const Popup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a8084c82"]]);
|
|
797
|
+
const _hoisted_1$2 = {
|
|
783
798
|
key: 0,
|
|
784
799
|
class: "refresh-content"
|
|
785
800
|
};
|
|
786
|
-
const _hoisted_2$
|
|
787
|
-
const _hoisted_3$
|
|
801
|
+
const _hoisted_2$2 = { class: "refresh-icon" };
|
|
802
|
+
const _hoisted_3$2 = {
|
|
788
803
|
key: 0,
|
|
789
804
|
class: "refresh-loading"
|
|
790
805
|
};
|
|
791
|
-
const _hoisted_4$
|
|
806
|
+
const _hoisted_4$1 = {
|
|
792
807
|
key: 1,
|
|
793
808
|
class: "refresh-arrow"
|
|
794
809
|
};
|
|
@@ -799,27 +814,23 @@ const _hoisted_8$1 = {
|
|
|
799
814
|
key: 0,
|
|
800
815
|
class: "infinite-scroll-loading"
|
|
801
816
|
};
|
|
802
|
-
const _hoisted_9 =
|
|
803
|
-
|
|
804
|
-
], -1));
|
|
805
|
-
const _hoisted_10 = { class: "loading-text" };
|
|
806
|
-
const _hoisted_11 = {
|
|
817
|
+
const _hoisted_9 = { class: "loading-text" };
|
|
818
|
+
const _hoisted_10 = {
|
|
807
819
|
key: 1,
|
|
808
820
|
class: "infinite-scroll-error"
|
|
809
821
|
};
|
|
810
|
-
const
|
|
811
|
-
const
|
|
812
|
-
const _hoisted_14 = {
|
|
822
|
+
const _hoisted_11 = { class: "error-text" };
|
|
823
|
+
const _hoisted_12 = {
|
|
813
824
|
key: 2,
|
|
814
825
|
class: "infinite-scroll-no-more"
|
|
815
826
|
};
|
|
816
|
-
const
|
|
817
|
-
const
|
|
827
|
+
const _hoisted_13 = { class: "no-more-text" };
|
|
828
|
+
const _hoisted_14 = {
|
|
818
829
|
key: 3,
|
|
819
830
|
class: "infinite-scroll-trigger",
|
|
820
831
|
style: { height: `0px` }
|
|
821
832
|
};
|
|
822
|
-
const _sfc_main$
|
|
833
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
823
834
|
__name: "index",
|
|
824
835
|
props: {
|
|
825
836
|
loading: { type: Boolean, default: false },
|
|
@@ -1022,9 +1033,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1022
1033
|
class: "refresh-indicator",
|
|
1023
1034
|
style: normalizeStyle({ height: `${pullDistance.value}px` })
|
|
1024
1035
|
}, [
|
|
1025
|
-
refreshStatus.value !== "normal" && (refreshStatus.value === "refreshing" || pullDistance.value > 0) ? (openBlock(), createElementBlock("view", _hoisted_1$
|
|
1026
|
-
createElementVNode("view", _hoisted_2$
|
|
1027
|
-
props.refreshLoading ? (openBlock(), createElementBlock("text", _hoisted_3$
|
|
1036
|
+
refreshStatus.value !== "normal" && (refreshStatus.value === "refreshing" || pullDistance.value > 0) ? (openBlock(), createElementBlock("view", _hoisted_1$2, [
|
|
1037
|
+
createElementVNode("view", _hoisted_2$2, [
|
|
1038
|
+
props.refreshLoading ? (openBlock(), createElementBlock("text", _hoisted_3$2, "●")) : (openBlock(), createElementBlock("text", _hoisted_4$1, "↓"))
|
|
1028
1039
|
]),
|
|
1029
1040
|
createElementVNode("text", _hoisted_5$1, [
|
|
1030
1041
|
props.refreshLoading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -1041,340 +1052,331 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1041
1052
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1042
1053
|
]),
|
|
1043
1054
|
createElementVNode("view", _hoisted_7$1, [
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1055
|
+
__props.loading ? (openBlock(), createElementBlock("view", _hoisted_8$1, [
|
|
1056
|
+
_cache[1] || (_cache[1] = createElementVNode("view", { class: "loading-spinner" }, [
|
|
1057
|
+
createElementVNode("text", { class: "loading-icon" }, "●")
|
|
1058
|
+
], -1)),
|
|
1059
|
+
createElementVNode("text", _hoisted_9, toDisplayString(__props.loadingText), 1)
|
|
1060
|
+
])) : __props.error ? (openBlock(), createElementBlock("view", _hoisted_10, [
|
|
1061
|
+
_cache[2] || (_cache[2] = createElementVNode("text", { class: "error-icon" }, "×", -1)),
|
|
1062
|
+
createElementVNode("text", _hoisted_11, toDisplayString(__props.errorText), 1),
|
|
1050
1063
|
createElementVNode("view", {
|
|
1051
1064
|
class: "retry-btn",
|
|
1052
1065
|
onClick: onRetry
|
|
1053
|
-
}, toDisplayString(
|
|
1054
|
-
])) : !
|
|
1055
|
-
createElementVNode("text",
|
|
1056
|
-
])) : (openBlock(), createElementBlock("view",
|
|
1066
|
+
}, toDisplayString(__props.retryText), 1)
|
|
1067
|
+
])) : !__props.hasMore ? (openBlock(), createElementBlock("view", _hoisted_12, [
|
|
1068
|
+
createElementVNode("text", _hoisted_13, toDisplayString(__props.noMoreText), 1)
|
|
1069
|
+
])) : (openBlock(), createElementBlock("view", _hoisted_14))
|
|
1057
1070
|
])
|
|
1058
1071
|
], 544);
|
|
1059
1072
|
};
|
|
1060
1073
|
}
|
|
1061
1074
|
});
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
if (props.modelValue !== void 0 && props.modelValue !== null) {
|
|
1071
|
-
const matched = props.options.find(
|
|
1072
|
-
(opt) => opt.value === props.modelValue
|
|
1073
|
-
);
|
|
1074
|
-
if (matched)
|
|
1075
|
-
return matched.text;
|
|
1076
|
-
}
|
|
1077
|
-
return ((_b = props.options[0]) == null ? void 0 : _b.text) || "请选择";
|
|
1078
|
-
});
|
|
1079
|
-
const internalValue = computed({
|
|
1080
|
-
get() {
|
|
1081
|
-
var _a, _b;
|
|
1082
|
-
if (props.modelValue !== void 0 && props.modelValue !== null) {
|
|
1083
|
-
return props.modelValue;
|
|
1084
|
-
}
|
|
1085
|
-
return ((_b = (_a = props.options) == null ? void 0 : _a[0]) == null ? void 0 : _b.value) ?? "";
|
|
1086
|
-
},
|
|
1087
|
-
set(val) {
|
|
1088
|
-
emit("update:modelValue", val);
|
|
1089
|
-
}
|
|
1090
|
-
});
|
|
1091
|
-
const handleChange = (value) => {
|
|
1092
|
-
emit("change", value);
|
|
1093
|
-
};
|
|
1094
|
-
const handleOpen = () => {
|
|
1095
|
-
isOpen.value = true;
|
|
1096
|
-
};
|
|
1097
|
-
const handleClose = () => {
|
|
1098
|
-
isOpen.value = false;
|
|
1099
|
-
};
|
|
1100
|
-
return {
|
|
1101
|
-
displayText,
|
|
1102
|
-
internalValue,
|
|
1103
|
-
isOpen,
|
|
1104
|
-
handleChange,
|
|
1105
|
-
handleOpen,
|
|
1106
|
-
handleClose
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
|
-
const _hoisted_1$2 = { class: "dropdown-select" };
|
|
1110
|
-
const _hoisted_2$2 = { class: "dropdown-title" };
|
|
1111
|
-
const _hoisted_3$2 = { class: "dropdown-text" };
|
|
1112
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1075
|
+
const PullRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b591b189"]]);
|
|
1076
|
+
const _hoisted_1$1 = { class: "sw-swiper" };
|
|
1077
|
+
const _hoisted_2$1 = {
|
|
1078
|
+
key: 0,
|
|
1079
|
+
class: "swiper-indicators"
|
|
1080
|
+
};
|
|
1081
|
+
const _hoisted_3$1 = ["onClick"];
|
|
1082
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1113
1083
|
__name: "index",
|
|
1114
1084
|
props: {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1085
|
+
items: {},
|
|
1086
|
+
initialIndex: { default: 0 },
|
|
1087
|
+
autoPlay: { type: Boolean, default: true },
|
|
1088
|
+
interval: { default: 3e3 },
|
|
1089
|
+
duration: { default: 300 },
|
|
1090
|
+
showIndicators: { type: Boolean, default: true },
|
|
1091
|
+
showArrows: { type: Boolean, default: false },
|
|
1092
|
+
loop: { type: Boolean, default: true }
|
|
1118
1093
|
},
|
|
1119
|
-
emits: ["
|
|
1120
|
-
setup(__props, { emit: __emit }) {
|
|
1094
|
+
emits: ["change", "prev", "next"],
|
|
1095
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1121
1096
|
const props = __props;
|
|
1122
1097
|
const emit = __emit;
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
if (
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
function togglePicker() {
|
|
1131
|
-
isOpen.value = !isOpen.value;
|
|
1132
|
-
if (isOpen.value) {
|
|
1133
|
-
handleOpen();
|
|
1134
|
-
} else {
|
|
1135
|
-
handleClose();
|
|
1098
|
+
const currentIndex = ref(props.initialIndex);
|
|
1099
|
+
let timer = null;
|
|
1100
|
+
function startAutoPlay() {
|
|
1101
|
+
if (props.autoPlay && props.items.length > 1) {
|
|
1102
|
+
timer = setInterval(() => {
|
|
1103
|
+
next();
|
|
1104
|
+
}, props.interval);
|
|
1136
1105
|
}
|
|
1137
1106
|
}
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
handleClose();
|
|
1107
|
+
function stopAutoPlay() {
|
|
1108
|
+
if (timer) {
|
|
1109
|
+
clearInterval(timer);
|
|
1110
|
+
timer = null;
|
|
1111
|
+
}
|
|
1144
1112
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1147
|
-
|
|
1113
|
+
function prev() {
|
|
1114
|
+
if (props.loop) {
|
|
1115
|
+
currentIndex.value = currentIndex.value === 0 ? props.items.length - 1 : currentIndex.value - 1;
|
|
1116
|
+
} else if (currentIndex.value > 0) {
|
|
1117
|
+
currentIndex.value--;
|
|
1118
|
+
}
|
|
1119
|
+
emit("prev", currentIndex.value);
|
|
1120
|
+
emit("change", currentIndex.value);
|
|
1121
|
+
}
|
|
1122
|
+
function next() {
|
|
1123
|
+
if (props.loop) {
|
|
1124
|
+
currentIndex.value = currentIndex.value === props.items.length - 1 ? 0 : currentIndex.value + 1;
|
|
1125
|
+
} else if (currentIndex.value < props.items.length - 1) {
|
|
1126
|
+
currentIndex.value++;
|
|
1127
|
+
}
|
|
1128
|
+
emit("next", currentIndex.value);
|
|
1129
|
+
emit("change", currentIndex.value);
|
|
1148
1130
|
}
|
|
1131
|
+
watch(() => props.items, (newItems) => {
|
|
1132
|
+
if (newItems.length < currentIndex.value + 1) {
|
|
1133
|
+
currentIndex.value = Math.min(currentIndex.value, newItems.length - 1);
|
|
1134
|
+
}
|
|
1135
|
+
stopAutoPlay();
|
|
1136
|
+
startAutoPlay();
|
|
1137
|
+
}, { deep: true });
|
|
1138
|
+
watch(() => props.autoPlay, (autoPlay) => {
|
|
1139
|
+
if (autoPlay) {
|
|
1140
|
+
startAutoPlay();
|
|
1141
|
+
} else {
|
|
1142
|
+
stopAutoPlay();
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
onMounted(() => {
|
|
1146
|
+
startAutoPlay();
|
|
1147
|
+
});
|
|
1148
|
+
onUnmounted(() => {
|
|
1149
|
+
stopAutoPlay();
|
|
1150
|
+
});
|
|
1151
|
+
__expose({
|
|
1152
|
+
prev,
|
|
1153
|
+
next,
|
|
1154
|
+
currentIndex
|
|
1155
|
+
});
|
|
1149
1156
|
return (_ctx, _cache) => {
|
|
1150
|
-
|
|
1151
|
-
return openBlock(), createElementBlock("view", _hoisted_1$2, [
|
|
1157
|
+
return openBlock(), createElementBlock("view", _hoisted_1$1, [
|
|
1152
1158
|
createElementVNode("view", {
|
|
1153
|
-
class: "
|
|
1154
|
-
|
|
1159
|
+
class: "swiper-wrapper",
|
|
1160
|
+
style: normalizeStyle({
|
|
1161
|
+
transform: `translateX(-${currentIndex.value * 100}%)`,
|
|
1162
|
+
transition: `transform ${__props.duration}ms ease`
|
|
1163
|
+
})
|
|
1155
1164
|
}, [
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1165
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index2) => {
|
|
1166
|
+
return openBlock(), createElementBlock("view", {
|
|
1167
|
+
key: index2,
|
|
1168
|
+
class: "swiper-item"
|
|
1169
|
+
}, [
|
|
1170
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1171
|
+
item,
|
|
1172
|
+
index: index2
|
|
1173
|
+
}, void 0, true)
|
|
1174
|
+
]);
|
|
1175
|
+
}), 128))
|
|
1176
|
+
], 4),
|
|
1177
|
+
__props.showIndicators ? (openBlock(), createElementBlock("view", _hoisted_2$1, [
|
|
1178
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index2) => {
|
|
1179
|
+
return openBlock(), createElementBlock("view", {
|
|
1180
|
+
key: index2,
|
|
1181
|
+
class: normalizeClass(["indicator-item", { active: index2 === currentIndex.value }]),
|
|
1182
|
+
onClick: ($event) => currentIndex.value = index2
|
|
1183
|
+
}, null, 10, _hoisted_3$1);
|
|
1184
|
+
}), 128))
|
|
1185
|
+
])) : createCommentVNode("", true),
|
|
1186
|
+
__props.showArrows ? (openBlock(), createElementBlock("view", {
|
|
1187
|
+
key: 1,
|
|
1188
|
+
class: "swiper-arrow swiper-arrow-left",
|
|
1189
|
+
onClick: prev
|
|
1190
|
+
})) : createCommentVNode("", true),
|
|
1191
|
+
__props.showArrows ? (openBlock(), createElementBlock("view", {
|
|
1192
|
+
key: 2,
|
|
1193
|
+
class: "swiper-arrow swiper-arrow-right",
|
|
1194
|
+
onClick: next
|
|
1195
|
+
})) : createCommentVNode("", true)
|
|
1181
1196
|
]);
|
|
1182
1197
|
};
|
|
1183
1198
|
}
|
|
1184
1199
|
});
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}
|
|
1191
|
-
const _hoisted_1$1 = { class: "dropdown-title" };
|
|
1192
|
-
const _hoisted_2$1 = { class: "dropdown-text" };
|
|
1193
|
-
const _hoisted_3$1 = { class: "dropdown-icon" };
|
|
1194
|
-
const _hoisted_4$1 = { class: "dropdown-with-badge__dot" };
|
|
1195
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1196
|
-
__name: "index",
|
|
1197
|
-
props: {
|
|
1198
|
-
hideBadge: { type: Function, default: (modelValue) => modelValue === "" || modelValue === null || modelValue === void 0 }
|
|
1199
|
-
},
|
|
1200
|
-
emits: ["update:modelValue", "change"],
|
|
1201
|
-
setup(__props, { emit: __emit }) {
|
|
1202
|
-
const props = __props;
|
|
1203
|
-
const emit = __emit;
|
|
1204
|
-
const { hasBadge } = useDropdownWithBadge(props);
|
|
1205
|
-
return (_ctx, _cache) => {
|
|
1206
|
-
return openBlock(), createBlock(unref(_sfc_main$2), mergeProps({ modelValue: _ctx.modelValue, options: _ctx.options }, { class: "dropdown-with-badge" }, toHandlers(emit)), {
|
|
1207
|
-
default: withCtx(({ text }) => [
|
|
1208
|
-
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ text })), () => [
|
|
1209
|
-
createElementVNode("view", _hoisted_1$1, [
|
|
1210
|
-
createElementVNode("text", _hoisted_2$1, toDisplayString(text), 1),
|
|
1211
|
-
createElementVNode("text", _hoisted_3$1, [
|
|
1212
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1213
|
-
createElementVNode("view", {
|
|
1214
|
-
class: normalizeClass(["uni-icon", _ctx.iconName])
|
|
1215
|
-
}, null, 2)
|
|
1216
|
-
])
|
|
1217
|
-
])
|
|
1218
|
-
]),
|
|
1219
|
-
withDirectives(createElementVNode("text", _hoisted_4$1, null, 512), [
|
|
1220
|
-
[vShow, !unref(hasBadge)]
|
|
1221
|
-
])
|
|
1222
|
-
])
|
|
1223
|
-
]),
|
|
1224
|
-
_: 3
|
|
1225
|
-
}, 16);
|
|
1226
|
-
};
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
function useHasBadge(model) {
|
|
1230
|
-
if (!model) {
|
|
1231
|
-
return computed(() => false);
|
|
1232
|
-
}
|
|
1233
|
-
if (typeof model === "function") {
|
|
1234
|
-
return computed(() => model());
|
|
1235
|
-
}
|
|
1236
|
-
if (isRef(model)) {
|
|
1237
|
-
return computed(() => {
|
|
1238
|
-
if (!model.value)
|
|
1239
|
-
return false;
|
|
1240
|
-
const obj = model.value;
|
|
1241
|
-
for (const key in obj) {
|
|
1242
|
-
if (obj[key]) {
|
|
1243
|
-
return true;
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
return false;
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
return computed(() => {
|
|
1250
|
-
for (const key in model) {
|
|
1251
|
-
const val = model[key];
|
|
1252
|
-
if (val) {
|
|
1253
|
-
return true;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
return false;
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
function useFilterDrawer(props, emit) {
|
|
1260
|
-
const visible = ref(false);
|
|
1261
|
-
const hasBadge = useHasBadge(props.modelValue);
|
|
1262
|
-
const openDrawer = () => {
|
|
1263
|
-
visible.value = true;
|
|
1264
|
-
};
|
|
1265
|
-
const closeDrawer = () => {
|
|
1266
|
-
visible.value = false;
|
|
1267
|
-
};
|
|
1268
|
-
const resetDrawer = () => {
|
|
1269
|
-
emit("reset");
|
|
1270
|
-
closeDrawer();
|
|
1271
|
-
};
|
|
1272
|
-
const queryDrawer = () => {
|
|
1273
|
-
emit("query");
|
|
1274
|
-
closeDrawer();
|
|
1275
|
-
};
|
|
1276
|
-
return {
|
|
1277
|
-
visible,
|
|
1278
|
-
openDrawer,
|
|
1279
|
-
closeDrawer,
|
|
1280
|
-
resetDrawer,
|
|
1281
|
-
queryDrawer,
|
|
1282
|
-
hasBadge
|
|
1283
|
-
};
|
|
1284
|
-
}
|
|
1285
|
-
const _hoisted_1 = /* @__PURE__ */ createElementVNode("view", { class: "uni-icon icon-filter-o" }, null, -1);
|
|
1200
|
+
const Swiper = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4f860ae8"]]);
|
|
1201
|
+
const _hoisted_1 = {
|
|
1202
|
+
key: 0,
|
|
1203
|
+
class: "sw-toast__loading"
|
|
1204
|
+
};
|
|
1286
1205
|
const _hoisted_2 = {
|
|
1287
1206
|
key: 0,
|
|
1288
|
-
class: "
|
|
1207
|
+
class: "sw-toast__spinner"
|
|
1289
1208
|
};
|
|
1290
1209
|
const _hoisted_3 = {
|
|
1291
1210
|
key: 1,
|
|
1292
|
-
class: "
|
|
1293
|
-
|
|
1211
|
+
class: "sw-toast__custom-icon"
|
|
1212
|
+
};
|
|
1213
|
+
const _hoisted_4 = {
|
|
1214
|
+
key: 1,
|
|
1215
|
+
class: "sw-toast__icon"
|
|
1216
|
+
};
|
|
1217
|
+
const _hoisted_5 = {
|
|
1218
|
+
key: 0,
|
|
1219
|
+
class: "sw-toast__icon--success"
|
|
1220
|
+
};
|
|
1221
|
+
const _hoisted_6 = {
|
|
1222
|
+
key: 1,
|
|
1223
|
+
class: "sw-toast__icon--fail"
|
|
1224
|
+
};
|
|
1225
|
+
const _hoisted_7 = {
|
|
1226
|
+
key: 2,
|
|
1227
|
+
class: "sw-toast__custom-icon"
|
|
1228
|
+
};
|
|
1229
|
+
const _hoisted_8 = {
|
|
1230
|
+
key: 2,
|
|
1231
|
+
class: "sw-toast__text"
|
|
1294
1232
|
};
|
|
1295
|
-
const _hoisted_4 = { class: "filter-drawer" };
|
|
1296
|
-
const _hoisted_5 = { class: "filter-drawer__header" };
|
|
1297
|
-
const _hoisted_6 = /* @__PURE__ */ createElementVNode("text", { class: "filter-drawer__title" }, "筛选", -1);
|
|
1298
|
-
const _hoisted_7 = { class: "filter-drawer__body" };
|
|
1299
|
-
const _hoisted_8 = { class: "filter-drawer__footer" };
|
|
1300
1233
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1301
1234
|
__name: "index",
|
|
1302
1235
|
props: {
|
|
1303
|
-
|
|
1304
|
-
|
|
1236
|
+
modelValue: { type: Boolean, default: false },
|
|
1237
|
+
type: { default: "text" },
|
|
1238
|
+
position: { default: "middle" },
|
|
1239
|
+
message: { default: "" },
|
|
1240
|
+
duration: { default: 3e3 },
|
|
1241
|
+
loading: { type: Boolean, default: false },
|
|
1242
|
+
icon: { type: Boolean, default: true },
|
|
1243
|
+
customIcon: { default: "" },
|
|
1244
|
+
large: { type: Boolean, default: false },
|
|
1245
|
+
customStyle: { default: () => ({}) }
|
|
1305
1246
|
},
|
|
1306
|
-
emits: ["
|
|
1307
|
-
setup(__props, { emit: __emit }) {
|
|
1247
|
+
emits: ["update:modelValue", "close", "click"],
|
|
1248
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1308
1249
|
const props = __props;
|
|
1309
1250
|
const emit = __emit;
|
|
1310
|
-
const
|
|
1251
|
+
const toastRef = ref(null);
|
|
1252
|
+
let timer = null;
|
|
1253
|
+
const showToast = ref(props.modelValue);
|
|
1254
|
+
const isClosing = ref(false);
|
|
1255
|
+
const showIcon = computed(() => {
|
|
1256
|
+
if (props.loading)
|
|
1257
|
+
return true;
|
|
1258
|
+
if (props.type === "text")
|
|
1259
|
+
return props.icon;
|
|
1260
|
+
return true;
|
|
1261
|
+
});
|
|
1262
|
+
function onClick() {
|
|
1263
|
+
emit("click");
|
|
1264
|
+
}
|
|
1265
|
+
function close() {
|
|
1266
|
+
if (!showToast.value)
|
|
1267
|
+
return;
|
|
1268
|
+
isClosing.value = true;
|
|
1269
|
+
emit("close");
|
|
1270
|
+
}
|
|
1271
|
+
function startTimer() {
|
|
1272
|
+
clearTimer();
|
|
1273
|
+
if (props.duration > 0 && !props.loading) {
|
|
1274
|
+
timer = setTimeout(() => {
|
|
1275
|
+
close();
|
|
1276
|
+
}, props.duration);
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
function clearTimer() {
|
|
1280
|
+
if (timer) {
|
|
1281
|
+
clearTimeout(timer);
|
|
1282
|
+
timer = null;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function handleTransitionEnd() {
|
|
1286
|
+
if (isClosing.value) {
|
|
1287
|
+
showToast.value = false;
|
|
1288
|
+
isClosing.value = false;
|
|
1289
|
+
emit("update:modelValue", false);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
watch(() => props.modelValue, (newVal) => {
|
|
1293
|
+
if (newVal) {
|
|
1294
|
+
showToast.value = true;
|
|
1295
|
+
isClosing.value = false;
|
|
1296
|
+
startTimer();
|
|
1297
|
+
} else {
|
|
1298
|
+
close();
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
watch(() => props.message, () => {
|
|
1302
|
+
if (showToast.value && !props.loading) {
|
|
1303
|
+
startTimer();
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
onMounted(() => {
|
|
1307
|
+
if (props.modelValue) {
|
|
1308
|
+
startTimer();
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
onUnmounted(() => {
|
|
1312
|
+
clearTimer();
|
|
1313
|
+
});
|
|
1314
|
+
__expose({
|
|
1315
|
+
/**
|
|
1316
|
+
* 手动关闭Toast
|
|
1317
|
+
*/
|
|
1318
|
+
close
|
|
1319
|
+
});
|
|
1311
1320
|
return (_ctx, _cache) => {
|
|
1312
|
-
return openBlock(), createElementBlock(
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
]),
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
createElementVNode("view", _hoisted_5, [
|
|
1337
|
-
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1338
|
-
_hoisted_6
|
|
1339
|
-
])
|
|
1340
|
-
]),
|
|
1341
|
-
createElementVNode("view", _hoisted_7, [
|
|
1342
|
-
renderSlot(_ctx.$slots, "default")
|
|
1343
|
-
]),
|
|
1344
|
-
createElementVNode("view", _hoisted_8, [
|
|
1345
|
-
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
1346
|
-
createElementVNode("view", {
|
|
1347
|
-
class: "filter-drawer__button filter-drawer__button--plain",
|
|
1348
|
-
onClick: _cache[3] || (_cache[3] = //@ts-ignore
|
|
1349
|
-
(...args) => unref(resetDrawer) && unref(resetDrawer)(...args))
|
|
1350
|
-
}, " 重置条件 "),
|
|
1351
|
-
createElementVNode("view", {
|
|
1352
|
-
class: "filter-drawer__button",
|
|
1353
|
-
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
1354
|
-
(...args) => unref(queryDrawer) && unref(queryDrawer)(...args))
|
|
1355
|
-
}, " 查询 ")
|
|
1356
|
-
])
|
|
1357
|
-
])
|
|
1358
|
-
])
|
|
1359
|
-
])) : createCommentVNode("", true)
|
|
1360
|
-
], 64);
|
|
1321
|
+
return withDirectives((openBlock(), createElementBlock("view", {
|
|
1322
|
+
ref_key: "toastRef",
|
|
1323
|
+
ref: toastRef,
|
|
1324
|
+
class: normalizeClass(["sw-toast", [
|
|
1325
|
+
`sw-toast--${__props.type}`,
|
|
1326
|
+
`sw-toast--${__props.position}`,
|
|
1327
|
+
{ "sw-toast--large": __props.large },
|
|
1328
|
+
{ "sw-toast--text": !showIcon.value && __props.type === "text" },
|
|
1329
|
+
{ "sw-toast--show": showToast.value && !isClosing.value },
|
|
1330
|
+
{ "sw-toast--hide": showToast.value && isClosing.value }
|
|
1331
|
+
]]),
|
|
1332
|
+
style: normalizeStyle(__props.customStyle),
|
|
1333
|
+
onClick,
|
|
1334
|
+
onTransitionend: handleTransitionEnd
|
|
1335
|
+
}, [
|
|
1336
|
+
__props.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
1337
|
+
!__props.customIcon ? (openBlock(), createElementBlock("text", _hoisted_2)) : (openBlock(), createElementBlock("text", _hoisted_3, toDisplayString(__props.customIcon), 1))
|
|
1338
|
+
])) : showIcon.value ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
1339
|
+
__props.type === "success" ? (openBlock(), createElementBlock("text", _hoisted_5, "✓")) : __props.type === "fail" ? (openBlock(), createElementBlock("text", _hoisted_6, "✗")) : __props.customIcon ? (openBlock(), createElementBlock("text", _hoisted_7, toDisplayString(__props.customIcon), 1)) : createCommentVNode("", true)
|
|
1340
|
+
])) : createCommentVNode("", true),
|
|
1341
|
+
__props.message ? (openBlock(), createElementBlock("text", _hoisted_8, toDisplayString(__props.message), 1)) : createCommentVNode("", true)
|
|
1342
|
+
], 38)), [
|
|
1343
|
+
[vShow, showToast.value]
|
|
1344
|
+
]);
|
|
1361
1345
|
};
|
|
1362
1346
|
}
|
|
1363
1347
|
});
|
|
1348
|
+
const Toast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-482db7a0"]]);
|
|
1349
|
+
const index = {
|
|
1350
|
+
Button,
|
|
1351
|
+
Dialog,
|
|
1352
|
+
Divider,
|
|
1353
|
+
useDropdownSelect,
|
|
1354
|
+
DropdownSelect: _sfc_main$7,
|
|
1355
|
+
useDropdownWithBadge,
|
|
1356
|
+
DropdownWithBadge: _sfc_main$6,
|
|
1357
|
+
FilterDrawer: _sfc_main$5,
|
|
1358
|
+
useFilterDrawer,
|
|
1359
|
+
InfiniteScroll,
|
|
1360
|
+
Popup,
|
|
1361
|
+
PullRefresh,
|
|
1362
|
+
Swiper,
|
|
1363
|
+
Toast
|
|
1364
|
+
};
|
|
1364
1365
|
export {
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
_sfc_main$
|
|
1369
|
-
_sfc_main$
|
|
1370
|
-
_sfc_main as FilterDrawer,
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1366
|
+
Button,
|
|
1367
|
+
Dialog,
|
|
1368
|
+
Divider,
|
|
1369
|
+
_sfc_main$7 as DropdownSelect,
|
|
1370
|
+
_sfc_main$6 as DropdownWithBadge,
|
|
1371
|
+
_sfc_main$5 as FilterDrawer,
|
|
1372
|
+
InfiniteScroll,
|
|
1373
|
+
Popup,
|
|
1374
|
+
PullRefresh,
|
|
1375
|
+
Swiper,
|
|
1376
|
+
Toast,
|
|
1377
|
+
index as default,
|
|
1376
1378
|
useDropdownSelect,
|
|
1377
1379
|
useDropdownWithBadge,
|
|
1378
1380
|
useFilterDrawer
|
|
1379
1381
|
};
|
|
1380
|
-
//# sourceMappingURL=index.
|
|
1382
|
+
//# sourceMappingURL=index.mjs.map
|