@hbis-uni/components 2.12.0 → 2.13.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/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +807 -647
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -1
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, nextTick, onUnmounted, withModifiers, withDirectives, vModelText, useSlots, useCssVars, withKeys } from "vue";
|
|
2
|
-
const _sfc_main$
|
|
2
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3
3
|
__name: "C1",
|
|
4
4
|
props: {
|
|
5
5
|
title: { default: "C1 Component" },
|
|
6
6
|
primary: { type: Boolean, default: !1 }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
8
|
+
setup(o) {
|
|
9
9
|
return (y, n) => (openBlock(), createElementBlock("div", {
|
|
10
|
-
class: normalizeClass(["c1-container", { "c1-primary":
|
|
10
|
+
class: normalizeClass(["c1-container", { "c1-primary": o.primary }])
|
|
11
11
|
}, [
|
|
12
12
|
renderSlot(y.$slots, "default", {}, () => [
|
|
13
|
-
createTextVNode(toDisplayString(
|
|
13
|
+
createTextVNode(toDisplayString(o.title), 1)
|
|
14
14
|
], !0)
|
|
15
15
|
], 2));
|
|
16
16
|
}
|
|
17
|
-
}), _export_sfc = (
|
|
18
|
-
const n =
|
|
17
|
+
}), _export_sfc = (o, y) => {
|
|
18
|
+
const n = o.__vccOpts || o;
|
|
19
19
|
for (const [t, r] of y)
|
|
20
20
|
n[t] = r;
|
|
21
21
|
return n;
|
|
22
|
-
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22
|
+
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e2028f64"]]), _hoisted_1$b = { class: "c2-container" }, _hoisted_2$a = { class: "c2-title" }, _hoisted_3$8 = { class: "c2-content" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
23
23
|
__name: "C2",
|
|
24
24
|
props: {
|
|
25
25
|
title: { default: "C2 Component" },
|
|
@@ -27,33 +27,33 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
buttonText: { default: "Click Me" }
|
|
28
28
|
},
|
|
29
29
|
emits: ["click"],
|
|
30
|
-
setup(
|
|
30
|
+
setup(o, { emit: y }) {
|
|
31
31
|
const n = y, t = (r) => {
|
|
32
32
|
n("click", r);
|
|
33
33
|
};
|
|
34
|
-
return (r, u) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
35
|
-
createElementVNode("h2", _hoisted_2$
|
|
36
|
-
createElementVNode("div", _hoisted_3$
|
|
34
|
+
return (r, u) => (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
35
|
+
createElementVNode("h2", _hoisted_2$a, toDisplayString(o.title), 1),
|
|
36
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
37
37
|
renderSlot(r.$slots, "default", {}, void 0, !0)
|
|
38
38
|
]),
|
|
39
|
-
|
|
39
|
+
o.showButton ? (openBlock(), createElementBlock("button", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "c2-button",
|
|
42
42
|
onClick: t
|
|
43
|
-
}, toDisplayString(
|
|
43
|
+
}, toDisplayString(o.buttonText), 1)) : createCommentVNode("", !0)
|
|
44
44
|
]));
|
|
45
45
|
}
|
|
46
|
-
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
46
|
+
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b1d573ae"]]), _hoisted_1$a = { key: 0 }, _hoisted_2$9 = { class: "hbis-date-strip__weekdays" }, _hoisted_3$7 = { class: "hbis-date-strip__dates" }, _hoisted_4$5 = ["onClick"], _hoisted_5$4 = { class: "hbis-date-strip__date-number" }, _hoisted_6$4 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$4 = {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "hbis-date-strip__scroll-wrapper"
|
|
49
|
-
}, _hoisted_8$2 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9$1 = { class: "hbis-date-strip__weekdays" }, _hoisted_10$1 = { class: "hbis-date-strip__dates" }, _hoisted_11$1 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$
|
|
49
|
+
}, _hoisted_8$2 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9$1 = { class: "hbis-date-strip__weekdays" }, _hoisted_10$1 = { class: "hbis-date-strip__dates" }, _hoisted_11$1 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
50
50
|
__name: "hbis-dateStrip",
|
|
51
51
|
props: {
|
|
52
52
|
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
53
53
|
startDate: { default: () => /* @__PURE__ */ new Date() },
|
|
54
54
|
endDate: { default: () => {
|
|
55
|
-
const
|
|
56
|
-
return
|
|
55
|
+
const o = /* @__PURE__ */ new Date();
|
|
56
|
+
return o.setDate(o.getDate() + 30), o;
|
|
57
57
|
} },
|
|
58
58
|
highlightType: { default: "bg" },
|
|
59
59
|
showToday: { type: Boolean, default: !0 },
|
|
@@ -67,8 +67,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
visibleDays: { default: 7 }
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:modelValue", "dateClick"],
|
|
70
|
-
setup(
|
|
71
|
-
const n =
|
|
70
|
+
setup(o, { emit: y }) {
|
|
71
|
+
const n = o, t = y, r = computed(() => {
|
|
72
72
|
if (console.log("props:", {
|
|
73
73
|
startDate: n.startDate,
|
|
74
74
|
endDate: n.endDate,
|
|
@@ -76,22 +76,22 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
76
76
|
}), n.scrollable)
|
|
77
77
|
return console.log("显式设置了scrollable为true,允许滚动"), !0;
|
|
78
78
|
try {
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const d = new Date(n.startDate);
|
|
80
|
+
d.setHours(0, 0, 0, 0);
|
|
81
81
|
const m = new Date(n.endDate);
|
|
82
|
-
if (m.setHours(0, 0, 0, 0), isNaN(
|
|
82
|
+
if (m.setHours(0, 0, 0, 0), isNaN(d.getTime()) || isNaN(m.getTime()))
|
|
83
83
|
return console.log("无效的日期对象,使用默认滚动行为"), !1;
|
|
84
|
-
const e = m.getTime() -
|
|
84
|
+
const e = m.getTime() - d.getTime(), x = Math.ceil(e / (1e3 * 60 * 60 * 24)), g = x + 1;
|
|
85
85
|
return console.log("日期范围天数计算:", {
|
|
86
|
-
start:
|
|
86
|
+
start: d.toLocaleDateString(),
|
|
87
87
|
end: m.toLocaleDateString(),
|
|
88
88
|
diffTime: e,
|
|
89
|
-
diffDays:
|
|
90
|
-
totalDays:
|
|
91
|
-
shouldScroll:
|
|
92
|
-
}),
|
|
93
|
-
} catch (
|
|
94
|
-
return console.error("计算日期范围时出错:",
|
|
89
|
+
diffDays: x,
|
|
90
|
+
totalDays: g,
|
|
91
|
+
shouldScroll: g > 7
|
|
92
|
+
}), g > 7;
|
|
93
|
+
} catch (d) {
|
|
94
|
+
return console.error("计算日期范围时出错:", d), !1;
|
|
95
95
|
}
|
|
96
96
|
}), u = [
|
|
97
97
|
{ value: 0, label: "日", isWeekend: !0 },
|
|
@@ -102,42 +102,42 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
{ value: 5, label: "五", isWeekend: !1 },
|
|
103
103
|
{ value: 6, label: "六", isWeekend: !0 }
|
|
104
104
|
], a = computed(() => {
|
|
105
|
-
const
|
|
106
|
-
if (!
|
|
105
|
+
const d = h.value[0];
|
|
106
|
+
if (!d)
|
|
107
107
|
return u;
|
|
108
|
-
const m =
|
|
109
|
-
for (let
|
|
110
|
-
const
|
|
111
|
-
e.push(u[
|
|
108
|
+
const m = d.weekday, e = [];
|
|
109
|
+
for (let x = 0; x < 7; x++) {
|
|
110
|
+
const g = (m + x) % 7;
|
|
111
|
+
e.push(u[g]);
|
|
112
112
|
}
|
|
113
113
|
return e;
|
|
114
114
|
});
|
|
115
115
|
ref((() => {
|
|
116
|
-
const
|
|
117
|
-
return
|
|
116
|
+
const d = n.startDate || /* @__PURE__ */ new Date(), m = d.getDay(), e = d.getDate() - (m === 0 ? 6 : m - 1), x = new Date(d);
|
|
117
|
+
return x.setDate(e), x;
|
|
118
118
|
})()), onMounted(() => {
|
|
119
119
|
console.log("props:", n), console.log("highlightType:", n.highlightType);
|
|
120
120
|
}), watch(
|
|
121
121
|
() => n.highlightType,
|
|
122
|
-
(
|
|
123
|
-
console.log("highlightType changed:",
|
|
122
|
+
(d) => {
|
|
123
|
+
console.log("highlightType changed:", d);
|
|
124
124
|
}
|
|
125
125
|
), watch(
|
|
126
126
|
() => n.modelValue,
|
|
127
|
-
(
|
|
128
|
-
console.log("modelValue changed:",
|
|
127
|
+
(d) => {
|
|
128
|
+
console.log("modelValue changed:", d);
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
const
|
|
132
|
-
const
|
|
131
|
+
const p = computed(() => {
|
|
132
|
+
const d = [];
|
|
133
133
|
try {
|
|
134
134
|
const m = n.startDate, e = n.endDate;
|
|
135
135
|
if (isNaN(m.getTime()) || isNaN(e.getTime()))
|
|
136
|
-
return console.log("无效的日期对象,返回空数组"),
|
|
137
|
-
const
|
|
138
|
-
for (let
|
|
136
|
+
return console.log("无效的日期对象,返回空数组"), d;
|
|
137
|
+
const x = Math.ceil((e.getTime() - m.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
138
|
+
for (let g = 0; g < x; g++) {
|
|
139
139
|
const w = new Date(m);
|
|
140
|
-
w.setDate(m.getDate() +
|
|
140
|
+
w.setDate(m.getDate() + g), isNaN(w.getTime()) || d.push({
|
|
141
141
|
date: w,
|
|
142
142
|
dateString: l(w),
|
|
143
143
|
day: w.getDate(),
|
|
@@ -150,64 +150,64 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
150
150
|
} catch (m) {
|
|
151
151
|
console.error("生成日期数组时出错:", m);
|
|
152
152
|
}
|
|
153
|
-
return
|
|
154
|
-
}),
|
|
155
|
-
const m =
|
|
153
|
+
return d;
|
|
154
|
+
}), h = computed(() => p.value.filter((d) => !!(d && d.date && d.dateString && !isNaN(d.date.getTime()) && typeof d.dateString == "string" && typeof d.day == "number"))), l = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`, i = (d) => {
|
|
155
|
+
const m = d.dateString;
|
|
156
156
|
return n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : l(e) === m) : isNaN(n.modelValue.getTime()) ? !1 : l(n.modelValue) === m : !1;
|
|
157
|
-
},
|
|
157
|
+
}, f = (d) => {
|
|
158
158
|
const m = l(/* @__PURE__ */ new Date());
|
|
159
|
-
return
|
|
160
|
-
}, c = (
|
|
161
|
-
const m =
|
|
159
|
+
return d.dateString === m;
|
|
160
|
+
}, c = (d) => {
|
|
161
|
+
const m = d.date;
|
|
162
162
|
return n.disablePast && m < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || n.disableFuture && m > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : m >= n.startDate && m <= n.endDate;
|
|
163
|
-
},
|
|
163
|
+
}, _ = (d) => {
|
|
164
164
|
var m;
|
|
165
|
-
return ((m = u.find((e) => e.value ===
|
|
166
|
-
},
|
|
167
|
-
c(
|
|
165
|
+
return ((m = u.find((e) => e.value === d)) == null ? void 0 : m.label) || "";
|
|
166
|
+
}, v = (d) => {
|
|
167
|
+
c(d) && (t("dateClick", d), t("update:modelValue", d.date));
|
|
168
168
|
};
|
|
169
|
-
return (
|
|
169
|
+
return (d, m) => (openBlock(), createElementBlock("div", {
|
|
170
170
|
class: normalizeClass(["hbis-date-strip", {
|
|
171
|
-
"hbis-date-strip--highlight-bg":
|
|
172
|
-
"hbis-date-strip--highlight-dot":
|
|
173
|
-
"hbis-date-strip--highlight-round":
|
|
171
|
+
"hbis-date-strip--highlight-bg": o.highlightType === "bg",
|
|
172
|
+
"hbis-date-strip--highlight-dot": o.highlightType === "dot",
|
|
173
|
+
"hbis-date-strip--highlight-round": o.highlightType === "round",
|
|
174
174
|
"hbis-date-strip--scrollable": r.value
|
|
175
175
|
}])
|
|
176
176
|
}, [
|
|
177
177
|
r.value ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
|
|
178
178
|
createElementVNode("div", _hoisted_8$2, [
|
|
179
179
|
createElementVNode("div", _hoisted_9$1, [
|
|
180
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
180
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (e) => (openBlock(), createElementBlock("div", {
|
|
181
181
|
key: e.dateString + "-weekday",
|
|
182
182
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
183
183
|
"hbis-date-strip__weekday--weekend": e.isWeekend
|
|
184
184
|
}])
|
|
185
|
-
}, toDisplayString(
|
|
185
|
+
}, toDisplayString(_(e.weekday)), 3))), 128))
|
|
186
186
|
]),
|
|
187
187
|
createElementVNode("div", _hoisted_10$1, [
|
|
188
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
188
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (e) => (openBlock(), createElementBlock("div", {
|
|
189
189
|
key: e.dateString,
|
|
190
190
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
191
191
|
"hbis-date-strip__date--selected": i(e),
|
|
192
|
-
"hbis-date-strip__date--today":
|
|
192
|
+
"hbis-date-strip__date--today": f(e),
|
|
193
193
|
"hbis-date-strip__date--disabled": !c(e),
|
|
194
194
|
"hbis-date-strip__date--weekend": e.isWeekend
|
|
195
195
|
}]),
|
|
196
196
|
style: normalizeStyle({
|
|
197
|
-
color: i(e) ?
|
|
198
|
-
backgroundColor: i(e) ?
|
|
197
|
+
color: i(e) ? o.selectedColor : o.normalColor,
|
|
198
|
+
backgroundColor: i(e) ? o.selectedBgColor : o.normalBgColor
|
|
199
199
|
}),
|
|
200
|
-
onClick: (
|
|
200
|
+
onClick: (x) => v(e)
|
|
201
201
|
}, [
|
|
202
202
|
createElementVNode("div", _hoisted_12, toDisplayString(e.day), 1),
|
|
203
203
|
createElementVNode("div", _hoisted_13, [
|
|
204
|
-
renderSlot(
|
|
204
|
+
renderSlot(d.$slots, "default", { date: e }, void 0, !0)
|
|
205
205
|
])
|
|
206
206
|
], 14, _hoisted_11$1))), 128))
|
|
207
207
|
])
|
|
208
208
|
])
|
|
209
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
210
|
-
createElementVNode("div", _hoisted_2$
|
|
209
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
210
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
211
211
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (e) => (openBlock(), createElementBlock("div", {
|
|
212
212
|
key: e.value,
|
|
213
213
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
@@ -215,41 +215,41 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
215
215
|
}])
|
|
216
216
|
}, toDisplayString(e.label), 3))), 128))
|
|
217
217
|
]),
|
|
218
|
-
createElementVNode("div", _hoisted_3$
|
|
219
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
218
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
219
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (e) => (openBlock(), createElementBlock("div", {
|
|
220
220
|
key: e.dateString,
|
|
221
221
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
222
222
|
"hbis-date-strip__date--selected": i(e),
|
|
223
|
-
"hbis-date-strip__date--today":
|
|
223
|
+
"hbis-date-strip__date--today": f(e),
|
|
224
224
|
"hbis-date-strip__date--disabled": !c(e),
|
|
225
225
|
"hbis-date-strip__date--weekend": e.isWeekend
|
|
226
226
|
}]),
|
|
227
227
|
style: normalizeStyle({
|
|
228
|
-
color: i(e) ?
|
|
229
|
-
backgroundColor: i(e) ?
|
|
228
|
+
color: i(e) ? o.selectedColor : o.normalColor,
|
|
229
|
+
backgroundColor: i(e) ? o.selectedBgColor : o.normalBgColor
|
|
230
230
|
}),
|
|
231
|
-
onClick: (
|
|
231
|
+
onClick: (x) => v(e)
|
|
232
232
|
}, [
|
|
233
233
|
createElementVNode("div", _hoisted_5$4, toDisplayString(e.day), 1),
|
|
234
234
|
createElementVNode("div", _hoisted_6$4, [
|
|
235
|
-
renderSlot(
|
|
235
|
+
renderSlot(d.$slots, "default", { date: e }, void 0, !0)
|
|
236
236
|
])
|
|
237
237
|
], 14, _hoisted_4$5))), 128))
|
|
238
238
|
])
|
|
239
239
|
]))
|
|
240
240
|
], 2));
|
|
241
241
|
}
|
|
242
|
-
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
242
|
+
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2e8258eb"]]), _hoisted_1$9 = { class: "image-preview" }, _hoisted_2$8 = {
|
|
243
243
|
key: 0,
|
|
244
244
|
class: "counter"
|
|
245
|
-
}, _hoisted_3$
|
|
245
|
+
}, _hoisted_3$6 = { class: "counter-text" }, _hoisted_4$4 = { class: "swiper-container" }, _hoisted_5$3 = ["onWheel"], _hoisted_6$3 = ["src", "onLoad"], _hoisted_7$3 = ["disabled"], _hoisted_8$1 = ["disabled"], _sfc_main$b = {
|
|
246
246
|
__name: "hbis-previewImage",
|
|
247
247
|
props: {
|
|
248
248
|
// 图片集合
|
|
249
249
|
images: {
|
|
250
250
|
type: Array,
|
|
251
251
|
required: !0,
|
|
252
|
-
validator: (
|
|
252
|
+
validator: (o) => o.every((y) => typeof y == "string")
|
|
253
253
|
},
|
|
254
254
|
// 当前显示的图片索引
|
|
255
255
|
initialIndex: {
|
|
@@ -278,113 +278,113 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
emits: ["close", "change", "update:initialIndex"],
|
|
281
|
-
setup(
|
|
282
|
-
const n =
|
|
281
|
+
setup(o, { emit: y }) {
|
|
282
|
+
const n = o, t = y, r = ref(n.initialIndex), u = ref(null), a = ref(!1), s = ref(!1), p = ref(0), h = ref(0), l = ref(0), i = ref(window.innerWidth), f = ref(window.innerHeight), c = ref(n.images.map(() => ({
|
|
283
283
|
scale: 1,
|
|
284
284
|
translateX: 0,
|
|
285
285
|
translateY: 0,
|
|
286
286
|
naturalWidth: 0,
|
|
287
287
|
naturalHeight: 0,
|
|
288
288
|
isLoaded: !1
|
|
289
|
-
}))),
|
|
289
|
+
}))), _ = ref(0), v = ref(0), d = ref(0), m = ref(0), e = ref(0), x = computed(() => ({
|
|
290
290
|
transform: `translateX(${l.value}px)`,
|
|
291
291
|
transition: a.value ? "none" : "transform 0.3s ease"
|
|
292
|
-
})),
|
|
292
|
+
})), g = computed(() => ({
|
|
293
293
|
width: `${i.value}px`,
|
|
294
|
-
height: `${
|
|
294
|
+
height: `${f.value}px`
|
|
295
295
|
}));
|
|
296
|
-
watch(() => n.initialIndex, (
|
|
297
|
-
|
|
296
|
+
watch(() => n.initialIndex, (b) => {
|
|
297
|
+
b !== r.value && (r.value = b, w());
|
|
298
298
|
}), onMounted(() => {
|
|
299
|
-
const
|
|
300
|
-
i.value = window.innerWidth,
|
|
299
|
+
const b = () => {
|
|
300
|
+
i.value = window.innerWidth, f.value = window.innerHeight, w();
|
|
301
301
|
};
|
|
302
|
-
return window.addEventListener("resize",
|
|
303
|
-
window.removeEventListener("resize",
|
|
302
|
+
return window.addEventListener("resize", b), b(), () => {
|
|
303
|
+
window.removeEventListener("resize", b);
|
|
304
304
|
};
|
|
305
305
|
});
|
|
306
306
|
const w = () => {
|
|
307
307
|
l.value = -r.value * i.value;
|
|
308
308
|
}, N = () => {
|
|
309
|
-
r.value > 0 && (r.value--, w(),
|
|
309
|
+
r.value > 0 && (r.value--, w(), A(), t("change", r.value), t("update:initialIndex", r.value));
|
|
310
310
|
}, S = () => {
|
|
311
|
-
r.value < n.images.length - 1 && (r.value++, w(),
|
|
312
|
-
},
|
|
311
|
+
r.value < n.images.length - 1 && (r.value++, w(), A(), t("change", r.value), t("update:initialIndex", r.value));
|
|
312
|
+
}, A = () => {
|
|
313
313
|
c.value[r.value] = {
|
|
314
314
|
...c.value[r.value],
|
|
315
315
|
scale: 1,
|
|
316
316
|
translateX: 0,
|
|
317
317
|
translateY: 0
|
|
318
318
|
};
|
|
319
|
-
},
|
|
320
|
-
const k = c.value[
|
|
319
|
+
}, O = (b) => {
|
|
320
|
+
const k = c.value[b];
|
|
321
321
|
return {
|
|
322
322
|
transform: `scale(${k.scale}) translate(${k.translateX}px, ${k.translateY}px)`,
|
|
323
|
-
transition:
|
|
323
|
+
transition: s.value ? "none" : "transform 0.1s ease",
|
|
324
324
|
opacity: k.isLoaded ? 1 : 0
|
|
325
325
|
};
|
|
326
|
-
}, M = (
|
|
326
|
+
}, M = (b) => {
|
|
327
327
|
const k = event.target;
|
|
328
|
-
c.value[
|
|
329
|
-
...c.value[
|
|
328
|
+
c.value[b] = {
|
|
329
|
+
...c.value[b],
|
|
330
330
|
naturalWidth: k.naturalWidth,
|
|
331
331
|
naturalHeight: k.naturalHeight,
|
|
332
332
|
isLoaded: !0
|
|
333
333
|
};
|
|
334
|
-
}, F = (
|
|
335
|
-
|
|
336
|
-
}, D = (
|
|
337
|
-
if (
|
|
338
|
-
const k =
|
|
334
|
+
}, F = (b) => {
|
|
335
|
+
b.target.tagName === "IMG" ? (s.value = !0, p.value = b.clientX - c.value[r.value].translateX, h.value = b.clientY - c.value[r.value].translateY) : (a.value = !0, p.value = b.clientX - l.value), b.preventDefault();
|
|
336
|
+
}, D = (b) => {
|
|
337
|
+
if (s.value) {
|
|
338
|
+
const k = b.clientX - p.value, T = b.clientY - h.value;
|
|
339
339
|
c.value[r.value] = {
|
|
340
340
|
...c.value[r.value],
|
|
341
341
|
translateX: k,
|
|
342
|
-
translateY:
|
|
342
|
+
translateY: T
|
|
343
343
|
};
|
|
344
344
|
} else if (a.value && n.enableSwipe) {
|
|
345
|
-
const k =
|
|
345
|
+
const k = b.clientX - p.value;
|
|
346
346
|
l.value = k;
|
|
347
347
|
}
|
|
348
|
-
},
|
|
348
|
+
}, E = () => {
|
|
349
349
|
if (a.value && n.enableSwipe) {
|
|
350
|
-
const
|
|
351
|
-
Math.abs(l.value + r.value * i.value) >
|
|
350
|
+
const b = i.value * 0.3;
|
|
351
|
+
Math.abs(l.value + r.value * i.value) > b ? l.value > 0 ? N() : S() : w();
|
|
352
352
|
}
|
|
353
|
-
a.value = !1,
|
|
354
|
-
},
|
|
355
|
-
const k =
|
|
356
|
-
|
|
357
|
-
}, V = (
|
|
358
|
-
const k =
|
|
353
|
+
a.value = !1, s.value = !1;
|
|
354
|
+
}, C = (b) => {
|
|
355
|
+
const k = b.touches[0];
|
|
356
|
+
_.value = k.clientX, v.value = k.clientY, d.value = Date.now();
|
|
357
|
+
}, V = (b) => {
|
|
358
|
+
const k = b.touches[0];
|
|
359
359
|
m.value = k.clientX, e.value = k.clientY;
|
|
360
|
-
const
|
|
361
|
-
if (Math.abs(
|
|
362
|
-
|
|
360
|
+
const T = m.value - _.value, B = e.value - v.value;
|
|
361
|
+
if (Math.abs(T) > Math.abs(B))
|
|
362
|
+
b.preventDefault(), a.value = !0, l.value = -r.value * i.value + T;
|
|
363
363
|
else if (c.value[r.value].scale > 1) {
|
|
364
|
-
|
|
365
|
-
const z =
|
|
364
|
+
b.preventDefault(), s.value = !0;
|
|
365
|
+
const z = T + c.value[r.value].translateX, L = B + c.value[r.value].translateY;
|
|
366
366
|
c.value[r.value] = {
|
|
367
367
|
...c.value[r.value],
|
|
368
368
|
translateX: z,
|
|
369
369
|
translateY: L
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
},
|
|
372
|
+
}, $ = () => {
|
|
373
373
|
if (a.value) {
|
|
374
|
-
const
|
|
375
|
-
Math.abs(
|
|
374
|
+
const b = m.value - _.value, k = Date.now() - d.value, T = i.value * 0.2, B = Math.abs(b) / k;
|
|
375
|
+
Math.abs(b) > T || B > 0.5 ? b > 0 ? N() : S() : w();
|
|
376
376
|
}
|
|
377
|
-
a.value = !1,
|
|
378
|
-
}, I = (
|
|
377
|
+
a.value = !1, s.value = !1;
|
|
378
|
+
}, I = (b, k) => {
|
|
379
379
|
if (k !== r.value) return;
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
R(B, z,
|
|
383
|
-
}, R = (
|
|
380
|
+
b.preventDefault();
|
|
381
|
+
const T = b.deltaY > 0 ? -0.1 : 0.1, B = b.clientX, z = b.clientY;
|
|
382
|
+
R(B, z, T);
|
|
383
|
+
}, R = (b, k, T) => {
|
|
384
384
|
const B = c.value[r.value], z = Math.max(
|
|
385
385
|
n.minScale,
|
|
386
|
-
Math.min(n.maxScale, B.scale +
|
|
387
|
-
), L = event.target.getBoundingClientRect(), P =
|
|
386
|
+
Math.min(n.maxScale, B.scale + T)
|
|
387
|
+
), L = event.target.getBoundingClientRect(), P = b - L.left, j = k - L.top, W = z - B.scale, H = B.translateX + (P - B.translateX) * (W / B.scale), U = B.translateY + (j - B.translateY) * (W / B.scale);
|
|
388
388
|
c.value[r.value] = {
|
|
389
389
|
...B,
|
|
390
390
|
scale: z,
|
|
@@ -392,14 +392,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
392
392
|
translateY: U
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
return (
|
|
396
|
-
|
|
397
|
-
createElementVNode("span", _hoisted_3$
|
|
395
|
+
return (b, k) => (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
396
|
+
o.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
397
|
+
createElementVNode("span", _hoisted_3$6, toDisplayString(r.value + 1) + "/" + toDisplayString(o.images.length), 1)
|
|
398
398
|
])) : createCommentVNode("", !0),
|
|
399
|
-
|
|
399
|
+
o.showCloseBtn ? (openBlock(), createElementBlock("button", {
|
|
400
400
|
key: 1,
|
|
401
401
|
class: "close-btn",
|
|
402
|
-
onClick: k[0] || (k[0] = (
|
|
402
|
+
onClick: k[0] || (k[0] = (T) => t("close"))
|
|
403
403
|
}, [...k[1] || (k[1] = [
|
|
404
404
|
createElementVNode("svg", {
|
|
405
405
|
width: "24",
|
|
@@ -428,29 +428,29 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
428
428
|
class: "swiper-wrapper",
|
|
429
429
|
ref_key: "swiperWrapper",
|
|
430
430
|
ref: u,
|
|
431
|
-
style: normalizeStyle(
|
|
432
|
-
onTouchstart:
|
|
431
|
+
style: normalizeStyle(x.value),
|
|
432
|
+
onTouchstart: C,
|
|
433
433
|
onTouchmove: V,
|
|
434
|
-
onTouchend:
|
|
434
|
+
onTouchend: $,
|
|
435
435
|
onMousedown: F,
|
|
436
436
|
onMousemove: D,
|
|
437
|
-
onMouseup:
|
|
438
|
-
onMouseleave:
|
|
437
|
+
onMouseup: E,
|
|
438
|
+
onMouseleave: E
|
|
439
439
|
}, [
|
|
440
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
440
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.images, (T, B) => (openBlock(), createElementBlock("div", {
|
|
441
441
|
key: B,
|
|
442
442
|
class: "swiper-slide",
|
|
443
|
-
style: normalizeStyle(
|
|
443
|
+
style: normalizeStyle(g.value)
|
|
444
444
|
}, [
|
|
445
445
|
createElementVNode("div", {
|
|
446
446
|
class: "image-container",
|
|
447
447
|
onWheel: (z) => I(z, B)
|
|
448
448
|
}, [
|
|
449
449
|
createElementVNode("img", {
|
|
450
|
-
src:
|
|
450
|
+
src: T,
|
|
451
451
|
alt: "Preview image",
|
|
452
452
|
class: "preview-image",
|
|
453
|
-
style: normalizeStyle(
|
|
453
|
+
style: normalizeStyle(O(B)),
|
|
454
454
|
onLoad: (z) => M(B),
|
|
455
455
|
loading: "lazy"
|
|
456
456
|
}, null, 44, _hoisted_6$3)
|
|
@@ -477,7 +477,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
477
477
|
createElementVNode("button", {
|
|
478
478
|
class: "nav-btn next-btn",
|
|
479
479
|
onClick: S,
|
|
480
|
-
disabled: r.value ===
|
|
480
|
+
disabled: r.value === o.images.length - 1
|
|
481
481
|
}, [...k[3] || (k[3] = [
|
|
482
482
|
createElementVNode("svg", {
|
|
483
483
|
width: "24",
|
|
@@ -492,7 +492,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
492
492
|
])], 8, _hoisted_8$1)
|
|
493
493
|
]));
|
|
494
494
|
}
|
|
495
|
-
}, _sfc_main$
|
|
495
|
+
}, _sfc_main$a = {
|
|
496
496
|
__name: "hbis-auto-scroll-list",
|
|
497
497
|
props: {
|
|
498
498
|
// 列表数据数组
|
|
@@ -509,7 +509,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
509
509
|
direction: {
|
|
510
510
|
type: String,
|
|
511
511
|
default: "vertical",
|
|
512
|
-
validator: (
|
|
512
|
+
validator: (o) => ["vertical", "horizontal"].includes(o)
|
|
513
513
|
},
|
|
514
514
|
// 鼠标悬停是否暂停
|
|
515
515
|
pauseOnHover: {
|
|
@@ -553,8 +553,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
|
|
556
|
-
setup(
|
|
557
|
-
const t =
|
|
556
|
+
setup(o, { expose: y, emit: n }) {
|
|
557
|
+
const t = o, r = n, u = ref(null), a = ref(null), s = ref(!1), p = ref(null), h = ref(0), l = ref([]), i = ref(!1), f = ref(0), c = ref(0), _ = ref(0), v = ref(!1), d = computed(() => ({
|
|
558
558
|
// 动态设置容器高度和宽度
|
|
559
559
|
height: typeof t.containerHeight == "number" ? `${t.containerHeight}px` : t.containerHeight,
|
|
560
560
|
width: typeof t.containerWidth == "number" ? `${t.containerWidth}px` : t.containerWidth,
|
|
@@ -563,7 +563,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
563
563
|
position: "relative"
|
|
564
564
|
// 相对定位,为绝对定位的内容容器提供参考
|
|
565
565
|
})), m = computed(() => {
|
|
566
|
-
const
|
|
566
|
+
const b = {
|
|
567
567
|
with: "100%",
|
|
568
568
|
position: "absolute",
|
|
569
569
|
// 绝对定位,实现自由移动
|
|
@@ -572,140 +572,140 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
572
572
|
willChange: "transform"
|
|
573
573
|
// 告诉浏览器将要变化的属性,优化性能
|
|
574
574
|
};
|
|
575
|
-
return t.direction === "vertical" ?
|
|
575
|
+
return t.direction === "vertical" ? b.transform = `translateY(${h.value}px)` : b.transform = `translateX(${h.value}px)`, b;
|
|
576
576
|
}), e = () => {
|
|
577
577
|
if (!t.data || t.data.length === 0) {
|
|
578
578
|
l.value = [];
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
t.loop ? l.value = [...t.data, ...t.data] : l.value = [...t.data];
|
|
582
|
-
},
|
|
583
|
-
if (
|
|
584
|
-
|
|
582
|
+
}, x = () => {
|
|
583
|
+
if (s.value || i.value) {
|
|
584
|
+
p.value = requestAnimationFrame(x);
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
-
const
|
|
588
|
-
if (!
|
|
589
|
-
|
|
587
|
+
const b = u.value, k = a.value;
|
|
588
|
+
if (!b || !k) {
|
|
589
|
+
p.value = requestAnimationFrame(x);
|
|
590
590
|
return;
|
|
591
591
|
}
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
Math.abs(
|
|
592
|
+
const T = t.direction === "vertical" ? b.offsetHeight : b.offsetWidth, z = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
|
|
593
|
+
if (h.value -= t.speed, t.loop)
|
|
594
|
+
Math.abs(h.value) >= z && (h.value = 0);
|
|
595
595
|
else {
|
|
596
|
-
const L = -(z -
|
|
597
|
-
if (
|
|
598
|
-
|
|
596
|
+
const L = -(z - T);
|
|
597
|
+
if (h.value <= L) {
|
|
598
|
+
h.value = L, s.value = !0, r("scroll", h.value);
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
r("scroll",
|
|
603
|
-
},
|
|
604
|
-
|
|
602
|
+
r("scroll", h.value), p.value = requestAnimationFrame(x);
|
|
603
|
+
}, g = () => {
|
|
604
|
+
p.value && cancelAnimationFrame(p.value), p.value = requestAnimationFrame(x);
|
|
605
605
|
}, w = () => {
|
|
606
|
-
|
|
606
|
+
p.value && (cancelAnimationFrame(p.value), p.value = null);
|
|
607
607
|
}, N = () => {
|
|
608
|
-
|
|
608
|
+
s.value = !0, r("pause");
|
|
609
609
|
}, S = () => {
|
|
610
|
-
|
|
611
|
-
},
|
|
610
|
+
s.value = !1, r("resume");
|
|
611
|
+
}, A = () => {
|
|
612
612
|
t.pauseOnHover && N();
|
|
613
|
-
},
|
|
613
|
+
}, O = () => {
|
|
614
614
|
t.pauseOnHover && !i.value && S();
|
|
615
|
-
}, M = (
|
|
616
|
-
i.value = !0,
|
|
617
|
-
}, F = (
|
|
615
|
+
}, M = (b) => {
|
|
616
|
+
i.value = !0, v.value = s.value, s.value = !0, f.value = t.direction === "vertical" ? b.clientY : b.clientX, c.value = f.value, _.value = h.value, r("dragStart"), document.addEventListener("mousemove", F), document.addEventListener("mouseup", D);
|
|
617
|
+
}, F = (b) => {
|
|
618
618
|
if (!i.value) return;
|
|
619
|
-
c.value = t.direction === "vertical" ?
|
|
620
|
-
const k = c.value -
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
624
|
-
const z = t.direction === "vertical" ?
|
|
619
|
+
c.value = t.direction === "vertical" ? b.clientY : b.clientX;
|
|
620
|
+
const k = c.value - f.value;
|
|
621
|
+
h.value = _.value + k;
|
|
622
|
+
const T = u.value, B = a.value;
|
|
623
|
+
if (T && B) {
|
|
624
|
+
const z = t.direction === "vertical" ? T.offsetHeight : T.offsetWidth, P = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
|
|
625
625
|
if (t.loop)
|
|
626
|
-
|
|
626
|
+
h.value > 0 ? h.value = 0 : Math.abs(h.value) > P && (h.value = -P);
|
|
627
627
|
else {
|
|
628
628
|
const j = -(P - z);
|
|
629
|
-
|
|
629
|
+
h.value > 0 ? h.value = 0 : h.value < j && (h.value = j);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
r("scroll",
|
|
632
|
+
r("scroll", h.value);
|
|
633
633
|
}, D = () => {
|
|
634
|
-
i.value && (i.value = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", D),
|
|
635
|
-
},
|
|
636
|
-
const k =
|
|
637
|
-
i.value = !0,
|
|
638
|
-
},
|
|
634
|
+
i.value && (i.value = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", D), v.value || (s.value = !1), r("dragEnd"));
|
|
635
|
+
}, E = (b) => {
|
|
636
|
+
const k = b.touches[0];
|
|
637
|
+
i.value = !0, v.value = s.value, s.value = !0, f.value = t.direction === "vertical" ? k.clientY : k.clientX, c.value = f.value, _.value = h.value, r("dragStart");
|
|
638
|
+
}, C = (b) => {
|
|
639
639
|
if (!i.value) return;
|
|
640
|
-
|
|
641
|
-
const k =
|
|
640
|
+
b.preventDefault();
|
|
641
|
+
const k = b.touches[0];
|
|
642
642
|
c.value = t.direction === "vertical" ? k.clientY : k.clientX;
|
|
643
|
-
const
|
|
644
|
-
|
|
643
|
+
const T = c.value - f.value;
|
|
644
|
+
h.value = _.value + T;
|
|
645
645
|
const B = u.value, z = a.value;
|
|
646
646
|
if (B && z) {
|
|
647
647
|
const L = t.direction === "vertical" ? B.offsetHeight : B.offsetWidth, j = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
|
|
648
648
|
if (t.loop)
|
|
649
|
-
|
|
649
|
+
h.value > 0 ? h.value = 0 : Math.abs(h.value) > j && (h.value = -j);
|
|
650
650
|
else {
|
|
651
651
|
const W = -(j - L);
|
|
652
|
-
|
|
652
|
+
h.value > 0 ? h.value = 0 : h.value < W && (h.value = W);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
r("scroll",
|
|
655
|
+
r("scroll", h.value);
|
|
656
656
|
}, V = () => {
|
|
657
|
-
i.value && (i.value = !1,
|
|
658
|
-
},
|
|
659
|
-
|
|
657
|
+
i.value && (i.value = !1, v.value || (s.value = !1), r("dragEnd"));
|
|
658
|
+
}, $ = (b) => {
|
|
659
|
+
h.value = b;
|
|
660
660
|
}, I = () => {
|
|
661
|
-
|
|
661
|
+
h.value = 0;
|
|
662
662
|
}, R = () => {
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
663
|
+
const b = u.value;
|
|
664
|
+
if (b) {
|
|
665
665
|
const k = a.value;
|
|
666
666
|
if (k) {
|
|
667
|
-
const
|
|
668
|
-
|
|
667
|
+
const T = t.direction === "vertical" ? k.offsetHeight : k.offsetWidth;
|
|
668
|
+
h.value = -(T - b.offsetHeight);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
672
|
return watch(() => t.data, () => {
|
|
673
|
-
e(),
|
|
673
|
+
e(), h.value = 0;
|
|
674
674
|
}, { deep: !0 }), watch(() => t.speed, () => {
|
|
675
|
-
|
|
675
|
+
s.value || (w(), g());
|
|
676
676
|
}), onMounted(() => {
|
|
677
677
|
e(), nextTick(() => {
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
678
|
+
g();
|
|
679
|
+
const b = u.value;
|
|
680
|
+
b && (b.addEventListener("mouseenter", A), b.addEventListener("mouseleave", O));
|
|
681
681
|
});
|
|
682
682
|
}), onUnmounted(() => {
|
|
683
683
|
w();
|
|
684
|
-
const
|
|
685
|
-
|
|
684
|
+
const b = u.value;
|
|
685
|
+
b && (b.removeEventListener("mouseenter", A), b.removeEventListener("mouseleave", O)), document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", D);
|
|
686
686
|
}), y({
|
|
687
687
|
pause: N,
|
|
688
688
|
// 暂停滚动
|
|
689
689
|
resume: S,
|
|
690
690
|
// 恢复滚动
|
|
691
|
-
scrollTo:
|
|
691
|
+
scrollTo: $,
|
|
692
692
|
// 滚动到指定位置
|
|
693
693
|
scrollToTop: I,
|
|
694
694
|
// 滚动到顶部
|
|
695
695
|
scrollToBottom: R,
|
|
696
696
|
// 滚动到底部
|
|
697
|
-
isPaused:
|
|
697
|
+
isPaused: s,
|
|
698
698
|
// 是否暂停(响应式)
|
|
699
699
|
isDragging: i
|
|
700
700
|
// 是否正在拖拽(响应式)
|
|
701
|
-
}), (
|
|
701
|
+
}), (b, k) => (openBlock(), createElementBlock("div", {
|
|
702
702
|
class: "hbis-auto-scroll-list",
|
|
703
703
|
ref_key: "containerRef",
|
|
704
704
|
ref: u,
|
|
705
|
-
style: normalizeStyle(
|
|
705
|
+
style: normalizeStyle(d.value),
|
|
706
706
|
onMousedown: M,
|
|
707
|
-
onTouchstart:
|
|
708
|
-
onTouchmove:
|
|
707
|
+
onTouchstart: E,
|
|
708
|
+
onTouchmove: C,
|
|
709
709
|
onTouchend: V
|
|
710
710
|
}, [
|
|
711
711
|
createElementVNode("div", {
|
|
@@ -714,28 +714,28 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
714
714
|
ref: a,
|
|
715
715
|
style: normalizeStyle(m.value)
|
|
716
716
|
}, [
|
|
717
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (
|
|
718
|
-
item:
|
|
717
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (T, B) => renderSlot(b.$slots, "item", {
|
|
718
|
+
item: T,
|
|
719
719
|
index: B
|
|
720
720
|
}, () => [
|
|
721
721
|
createElementVNode("div", {
|
|
722
722
|
class: "default-item",
|
|
723
|
-
style: normalizeStyle(
|
|
724
|
-
}, toDisplayString(
|
|
723
|
+
style: normalizeStyle(o.itemStyle)
|
|
724
|
+
}, toDisplayString(T), 5)
|
|
725
725
|
], !0)), 256))
|
|
726
726
|
], 4)
|
|
727
727
|
], 36));
|
|
728
728
|
}
|
|
729
|
-
}, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
729
|
+
}, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-5b76d8eb"]]), _hoisted_1$8 = {
|
|
730
730
|
key: 0,
|
|
731
731
|
class: "circular-spinner"
|
|
732
|
-
}, _hoisted_2$
|
|
732
|
+
}, _hoisted_2$7 = {
|
|
733
733
|
key: 1,
|
|
734
734
|
class: "dots-spinner"
|
|
735
|
-
}, _hoisted_3$
|
|
735
|
+
}, _hoisted_3$5 = {
|
|
736
736
|
key: 2,
|
|
737
737
|
class: "bars-spinner"
|
|
738
|
-
}, _sfc_main$
|
|
738
|
+
}, _sfc_main$9 = {
|
|
739
739
|
__name: "hbis-loading",
|
|
740
740
|
props: {
|
|
741
741
|
// 控制加载组件是否显示
|
|
@@ -770,8 +770,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
772
|
emits: ["update:visible", "close"],
|
|
773
|
-
setup(
|
|
774
|
-
const t =
|
|
773
|
+
setup(o, { expose: y, emit: n }) {
|
|
774
|
+
const t = o, r = n, u = () => {
|
|
775
775
|
t.touchDismiss && (r("update:visible", !1), r("close"));
|
|
776
776
|
};
|
|
777
777
|
return watch(() => t.visible, (a) => {
|
|
@@ -783,42 +783,42 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
783
783
|
hide: () => {
|
|
784
784
|
r("update:visible", !1), r("close");
|
|
785
785
|
}
|
|
786
|
-
}), (a,
|
|
786
|
+
}), (a, s) => o.visible ? (openBlock(), createElementBlock("div", {
|
|
787
787
|
key: 0,
|
|
788
|
-
class: normalizeClass(["hbis-loading-container", { "touch-dismissible":
|
|
788
|
+
class: normalizeClass(["hbis-loading-container", { "touch-dismissible": o.touchDismiss }]),
|
|
789
789
|
onClick: u
|
|
790
790
|
}, [
|
|
791
791
|
createElementVNode("div", {
|
|
792
792
|
class: "hbis-loading-wrapper",
|
|
793
|
-
onClick:
|
|
793
|
+
onClick: s[0] || (s[0] = withModifiers(() => {
|
|
794
794
|
}, ["stop"]))
|
|
795
795
|
}, [
|
|
796
796
|
renderSlot(a.$slots, "spinner", {}, () => [
|
|
797
797
|
createElementVNode("div", {
|
|
798
|
-
class: normalizeClass(["hbis-loading-spinner",
|
|
798
|
+
class: normalizeClass(["hbis-loading-spinner", o.spinnerType])
|
|
799
799
|
}, [
|
|
800
|
-
|
|
800
|
+
o.spinnerType === "circular" ? (openBlock(), createElementBlock("div", _hoisted_1$8, [...s[1] || (s[1] = [
|
|
801
801
|
createElementVNode("div", { class: "circle" }, null, -1)
|
|
802
|
-
])])) :
|
|
802
|
+
])])) : o.spinnerType === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$7, [...s[2] || (s[2] = [
|
|
803
803
|
createElementVNode("div", { class: "dot" }, null, -1),
|
|
804
804
|
createElementVNode("div", { class: "dot" }, null, -1),
|
|
805
805
|
createElementVNode("div", { class: "dot" }, null, -1)
|
|
806
|
-
])])) :
|
|
806
|
+
])])) : o.spinnerType === "bars" ? (openBlock(), createElementBlock("div", _hoisted_3$5, [...s[3] || (s[3] = [
|
|
807
807
|
createElementVNode("div", { class: "bar" }, null, -1),
|
|
808
808
|
createElementVNode("div", { class: "bar" }, null, -1),
|
|
809
809
|
createElementVNode("div", { class: "bar" }, null, -1)
|
|
810
810
|
])])) : createCommentVNode("", !0)
|
|
811
811
|
], 2)
|
|
812
812
|
], !0),
|
|
813
|
-
|
|
813
|
+
o.text ? (openBlock(), createElementBlock("div", {
|
|
814
814
|
key: 0,
|
|
815
815
|
class: "hbis-loading-text",
|
|
816
|
-
style: normalizeStyle(
|
|
817
|
-
}, toDisplayString(
|
|
816
|
+
style: normalizeStyle(o.textStyle)
|
|
817
|
+
}, toDisplayString(o.text), 5)) : createCommentVNode("", !0)
|
|
818
818
|
])
|
|
819
819
|
], 2)) : createCommentVNode("", !0);
|
|
820
820
|
}
|
|
821
|
-
}, hbisLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
821
|
+
}, hbisLoading = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d5965f87"]]), _hoisted_1$7 = { class: "parent-view" }, _sfc_main$8 = {
|
|
822
822
|
__name: "hbis-sms-input",
|
|
823
823
|
props: {
|
|
824
824
|
/* 倒计时时间
|
|
@@ -877,8 +877,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
877
877
|
}
|
|
878
878
|
},
|
|
879
879
|
emits: ["custom-event"],
|
|
880
|
-
setup(
|
|
881
|
-
const t =
|
|
880
|
+
setup(o, { expose: y, emit: n }) {
|
|
881
|
+
const t = o, r = n, u = ref(!0), a = ref(""), s = ref(t.countDownTime), p = () => {
|
|
882
882
|
if (console.log("验证码isSendSMS:" + u.value), !u.value) {
|
|
883
883
|
console.log("请" + t.countDownTime + "秒后再重试。");
|
|
884
884
|
return;
|
|
@@ -887,46 +887,46 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
887
887
|
};
|
|
888
888
|
return y({
|
|
889
889
|
countDown: () => {
|
|
890
|
-
|
|
890
|
+
s.value = t.countDownTime;
|
|
891
891
|
let l = setInterval(() => {
|
|
892
|
-
u.value = !1,
|
|
892
|
+
u.value = !1, s.value--, s.value === 0 && (u.value = !0, clearInterval(l));
|
|
893
893
|
}, 1e3);
|
|
894
894
|
},
|
|
895
895
|
smsCode: a
|
|
896
|
-
}), (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
896
|
+
}), (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
897
897
|
createElementVNode("div", {
|
|
898
898
|
class: "input_view_sms_code",
|
|
899
|
-
style: normalizeStyle({ background:
|
|
899
|
+
style: normalizeStyle({ background: o.inputColor })
|
|
900
900
|
}, [
|
|
901
901
|
withDirectives(createElementVNode("input", {
|
|
902
902
|
type: "text",
|
|
903
903
|
class: "view_sms_code",
|
|
904
904
|
"placeholder-style": "color:#999",
|
|
905
905
|
placeholder: "请输入验证码",
|
|
906
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
907
|
-
style: normalizeStyle({ color:
|
|
906
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => a.value = f),
|
|
907
|
+
style: normalizeStyle({ color: o.inputTextColor })
|
|
908
908
|
}, null, 4), [
|
|
909
909
|
[vModelText, a.value]
|
|
910
910
|
]),
|
|
911
911
|
u.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
912
912
|
key: 0,
|
|
913
913
|
class: normalizeClass(["sms_code_btn", { disabled: !u.value }]),
|
|
914
|
-
style: normalizeStyle({ color:
|
|
915
|
-
onClick:
|
|
916
|
-
}, toDisplayString(
|
|
914
|
+
style: normalizeStyle({ color: o.smsCodeBtnTextColor, background: o.smsCodeBtnColor }),
|
|
915
|
+
onClick: p
|
|
916
|
+
}, toDisplayString(s.value) + " " + toDisplayString(o.smsCodeTimeText), 7)),
|
|
917
917
|
u.value ? (openBlock(), createElementBlock("div", {
|
|
918
918
|
key: 1,
|
|
919
919
|
class: "sms_code_btn",
|
|
920
|
-
style: normalizeStyle({ color:
|
|
921
|
-
onClick:
|
|
922
|
-
}, toDisplayString(
|
|
920
|
+
style: normalizeStyle({ color: o.smsCodeBtnTextColor, background: o.smsCodeBtnColor }),
|
|
921
|
+
onClick: p
|
|
922
|
+
}, toDisplayString(o.smsCodeBtnText), 5)) : createCommentVNode("", !0)
|
|
923
923
|
], 4)
|
|
924
924
|
]));
|
|
925
925
|
}
|
|
926
|
-
}, HbisSmsInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
926
|
+
}, HbisSmsInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-3eedbbcc"]]), _hoisted_1$6 = { class: "waterfall-debug" }, _hoisted_2$6 = { class: "waterfall-container" }, _hoisted_3$4 = { class: "column-debug" }, _hoisted_4$3 = {
|
|
927
927
|
key: 0,
|
|
928
928
|
class: "waterfall-item-with-slot"
|
|
929
|
-
}, _hoisted_5$2 = ["src"], _hoisted_6$2 = { class: "waterfall-content" }, _hoisted_7$2 = ["src"], _sfc_main$
|
|
929
|
+
}, _hoisted_5$2 = ["src"], _hoisted_6$2 = { class: "waterfall-content" }, _hoisted_7$2 = ["src"], _sfc_main$7 = /* @__PURE__ */ Object.assign({
|
|
930
930
|
name: "HbisWaterfall"
|
|
931
931
|
}, {
|
|
932
932
|
__name: "hbis-waterfall",
|
|
@@ -944,7 +944,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
944
944
|
column: {
|
|
945
945
|
type: Number,
|
|
946
946
|
default: 2,
|
|
947
|
-
validator: (
|
|
947
|
+
validator: (o) => o >= 2
|
|
948
948
|
},
|
|
949
949
|
/**
|
|
950
950
|
* 最大列数
|
|
@@ -983,93 +983,93 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
983
983
|
}
|
|
984
984
|
},
|
|
985
985
|
emits: ["load", "error"],
|
|
986
|
-
setup(
|
|
987
|
-
const t = useSlots(), r = ref(null), u =
|
|
986
|
+
setup(o, { expose: y, emit: n }) {
|
|
987
|
+
const t = useSlots(), r = ref(null), u = o, a = n;
|
|
988
988
|
useCssVars(() => ({
|
|
989
989
|
columnGap: String(u.columnGap) + "px",
|
|
990
990
|
rowGap: String(u.rowGap) + "px"
|
|
991
991
|
}));
|
|
992
|
-
const
|
|
992
|
+
const s = ref([]), p = ref(2), h = computed(() => t.default !== void 0), l = (_) => (r.value && r.value.offsetWidth, Math.min(u.column, u.maxColumn), parseInt(u.columnGap), parseInt(u.rowGap), 200 + Math.floor(Math.random() * 100) + 20), i = () => {
|
|
993
993
|
console.log("开始分配数据,总数据量:", u.data.length);
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
const
|
|
997
|
-
for (let
|
|
998
|
-
|
|
994
|
+
const _ = Math.min(u.column, u.maxColumn);
|
|
995
|
+
p.value = _;
|
|
996
|
+
const v = [];
|
|
997
|
+
for (let d = 0; d < _; d++)
|
|
998
|
+
v.push({
|
|
999
999
|
items: [],
|
|
1000
1000
|
height: 0
|
|
1001
1001
|
});
|
|
1002
|
-
|
|
1002
|
+
s.value = v, u.data.forEach((d, m) => {
|
|
1003
1003
|
const e = l();
|
|
1004
|
-
let
|
|
1005
|
-
for (let w = 0; w <
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}), console.log("分配完成,各列数据量:",
|
|
1009
|
-
},
|
|
1010
|
-
a("load",
|
|
1011
|
-
}, c = (
|
|
1012
|
-
a("error",
|
|
1004
|
+
let x = 1 / 0, g = 0;
|
|
1005
|
+
for (let w = 0; w < _; w++)
|
|
1006
|
+
s.value[w].height < x && (x = s.value[w].height, g = w);
|
|
1007
|
+
s.value[g].items.push(d), s.value[g].height += e, console.log("分配数据到列:", { itemIndex: m, columnIndex: g, itemHeight: e, columnHeight: s.value[g].height });
|
|
1008
|
+
}), console.log("分配完成,各列数据量:", s.value.map((d, m) => `列${m + 1}: ${d.items.length}个`)), console.log("分配完成,各列高度:", s.value.map((d, m) => `列${m + 1}: ${d.height}px`));
|
|
1009
|
+
}, f = (_) => {
|
|
1010
|
+
a("load", _);
|
|
1011
|
+
}, c = (_) => {
|
|
1012
|
+
a("error", _);
|
|
1013
1013
|
};
|
|
1014
1014
|
return watch(() => u.data, () => {
|
|
1015
1015
|
console.log("数据变化,重新分配数据"), i();
|
|
1016
1016
|
}, { deep: !0 }), watch(() => [u.column, u.maxColumn], () => {
|
|
1017
|
-
console.log("列数变化,更新列数"),
|
|
1017
|
+
console.log("列数变化,更新列数"), p.value = Math.min(u.column, u.maxColumn), i();
|
|
1018
1018
|
}), watch(() => [u.columnGap, u.rowGap], () => {
|
|
1019
1019
|
console.log("间距变化,重新计算高度和分配数据"), i();
|
|
1020
1020
|
}), onMounted(() => {
|
|
1021
1021
|
console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:", u.data.length);
|
|
1022
1022
|
try {
|
|
1023
1023
|
i(), console.log("===== 组件挂载完成 =====");
|
|
1024
|
-
} catch (
|
|
1025
|
-
console.error("refresh函数执行失败:",
|
|
1024
|
+
} catch (_) {
|
|
1025
|
+
console.error("refresh函数执行失败:", _), console.log("===== 组件挂载失败 =====");
|
|
1026
1026
|
}
|
|
1027
1027
|
}), y({
|
|
1028
1028
|
refresh: i
|
|
1029
|
-
}), (
|
|
1029
|
+
}), (_, v) => (openBlock(), createElementBlock("div", {
|
|
1030
1030
|
ref_key: "waterfallRef",
|
|
1031
1031
|
ref: r
|
|
1032
1032
|
}, [
|
|
1033
|
-
createElementVNode("div", _hoisted_1$
|
|
1034
|
-
createTextVNode(" 列数: " + toDisplayString(
|
|
1035
|
-
|
|
1036
|
-
createTextVNode(" 数据总量: " + toDisplayString(
|
|
1037
|
-
|
|
1038
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1039
|
-
createTextVNode(" 列" + toDisplayString(m + 1) + "数据量: " + toDisplayString(
|
|
1040
|
-
|
|
1033
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
1034
|
+
createTextVNode(" 列数: " + toDisplayString(p.value) + " ", 1),
|
|
1035
|
+
v[1] || (v[1] = createElementVNode("br", null, null, -1)),
|
|
1036
|
+
createTextVNode(" 数据总量: " + toDisplayString(o.data.length) + " ", 1),
|
|
1037
|
+
v[2] || (v[2] = createElementVNode("br", null, null, -1)),
|
|
1038
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (d, m) => (openBlock(), createElementBlock(Fragment, { key: m }, [
|
|
1039
|
+
createTextVNode(" 列" + toDisplayString(m + 1) + "数据量: " + toDisplayString(d.items.length), 1),
|
|
1040
|
+
v[0] || (v[0] = createElementVNode("br", null, null, -1))
|
|
1041
1041
|
], 64))), 128))
|
|
1042
1042
|
]),
|
|
1043
|
-
createElementVNode("div", _hoisted_2$
|
|
1044
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1043
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
1044
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (d, m) => (openBlock(), createElementBlock("div", {
|
|
1045
1045
|
key: m,
|
|
1046
1046
|
class: "waterfall-column"
|
|
1047
1047
|
}, [
|
|
1048
|
-
createElementVNode("div", _hoisted_3$
|
|
1049
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1050
|
-
key: e[
|
|
1048
|
+
createElementVNode("div", _hoisted_3$4, " 列" + toDisplayString(m + 1) + ": " + toDisplayString(d.items.length) + "个元素 ", 1),
|
|
1049
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.items, (e, x) => (openBlock(), createElementBlock("div", {
|
|
1050
|
+
key: e[o.itemKey] || `col${m}-${x}`,
|
|
1051
1051
|
class: "waterfall-item"
|
|
1052
1052
|
}, [
|
|
1053
|
-
|
|
1053
|
+
h.value ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
1054
1054
|
createElementVNode("img", {
|
|
1055
|
-
src: e[
|
|
1055
|
+
src: e[o.imageKey],
|
|
1056
1056
|
class: "waterfall-image",
|
|
1057
1057
|
style: normalizeStyle({ height: l() + "px" }),
|
|
1058
|
-
onLoad:
|
|
1058
|
+
onLoad: f,
|
|
1059
1059
|
onError: c
|
|
1060
1060
|
}, null, 44, _hoisted_5$2),
|
|
1061
1061
|
createElementVNode("div", _hoisted_6$2, [
|
|
1062
|
-
renderSlot(
|
|
1062
|
+
renderSlot(_.$slots, "default", {
|
|
1063
1063
|
item: e,
|
|
1064
|
-
index:
|
|
1064
|
+
index: x
|
|
1065
1065
|
}, void 0, !0)
|
|
1066
1066
|
])
|
|
1067
1067
|
])) : (openBlock(), createElementBlock("img", {
|
|
1068
1068
|
key: 1,
|
|
1069
|
-
src: e[
|
|
1069
|
+
src: e[o.imageKey],
|
|
1070
1070
|
class: "waterfall-image",
|
|
1071
1071
|
style: normalizeStyle({ height: l() + "px" }),
|
|
1072
|
-
onLoad:
|
|
1072
|
+
onLoad: f,
|
|
1073
1073
|
onError: c
|
|
1074
1074
|
}, null, 44, _hoisted_7$2))
|
|
1075
1075
|
]))), 128))
|
|
@@ -1077,7 +1077,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1077
1077
|
])
|
|
1078
1078
|
], 512));
|
|
1079
1079
|
}
|
|
1080
|
-
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1080
|
+
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-20459ccd"]]);
|
|
1081
1081
|
var svga_lite_min = { exports: {} };
|
|
1082
1082
|
/*!
|
|
1083
1083
|
* svga.lite
|
|
@@ -1088,25 +1088,25 @@ var svga_lite_min = { exports: {} };
|
|
|
1088
1088
|
* Released under the MIT License.
|
|
1089
1089
|
*/
|
|
1090
1090
|
(function(module, exports$1) {
|
|
1091
|
-
(function(
|
|
1091
|
+
(function(o, y) {
|
|
1092
1092
|
module.exports = y();
|
|
1093
1093
|
})(window, function() {
|
|
1094
|
-
return function(
|
|
1094
|
+
return function(o) {
|
|
1095
1095
|
var y = {};
|
|
1096
1096
|
function n(t) {
|
|
1097
1097
|
if (y[t]) return y[t].exports;
|
|
1098
1098
|
var r = y[t] = { i: t, l: !1, exports: {} };
|
|
1099
|
-
return
|
|
1099
|
+
return o[t].call(r.exports, r, r.exports, n), r.l = !0, r.exports;
|
|
1100
1100
|
}
|
|
1101
|
-
return n.m =
|
|
1101
|
+
return n.m = o, n.c = y, n.d = function(t, r, u) {
|
|
1102
1102
|
n.o(t, r) || Object.defineProperty(t, r, { enumerable: !0, get: u });
|
|
1103
1103
|
}, n.r = function(t) {
|
|
1104
1104
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
|
|
1105
1105
|
}, n.t = function(t, r) {
|
|
1106
1106
|
if (1 & r && (t = n(t)), 8 & r || 4 & r && typeof t == "object" && t && t.__esModule) return t;
|
|
1107
1107
|
var u = /* @__PURE__ */ Object.create(null);
|
|
1108
|
-
if (n.r(u), Object.defineProperty(u, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string") for (var a in t) n.d(u, a, (function(
|
|
1109
|
-
return t[
|
|
1108
|
+
if (n.r(u), Object.defineProperty(u, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string") for (var a in t) n.d(u, a, (function(s) {
|
|
1109
|
+
return t[s];
|
|
1110
1110
|
}).bind(null, a));
|
|
1111
1111
|
return u;
|
|
1112
1112
|
}, n.n = function(t) {
|
|
@@ -1119,17 +1119,17 @@ var svga_lite_min = { exports: {} };
|
|
|
1119
1119
|
}, n.o = function(t, r) {
|
|
1120
1120
|
return Object.prototype.hasOwnProperty.call(t, r);
|
|
1121
1121
|
}, n.p = "", n(n.s = 1);
|
|
1122
|
-
}([function(
|
|
1122
|
+
}([function(o, y, n) {
|
|
1123
1123
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1124
1124
|
var t = function(r, u, a) {
|
|
1125
1125
|
this._d = r, this._transform = u, this._styles = a;
|
|
1126
1126
|
};
|
|
1127
1127
|
y.default = t;
|
|
1128
|
-
}, function(
|
|
1128
|
+
}, function(o, y, n) {
|
|
1129
1129
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1130
1130
|
var t = n(2), r = n(3), u = n(4), a = { Downloader: t.default, Parser: r.default, Player: u.default };
|
|
1131
1131
|
y.default = a;
|
|
1132
|
-
}, function(
|
|
1132
|
+
}, function(o, y, n) {
|
|
1133
1133
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1134
1134
|
var t = function() {
|
|
1135
1135
|
function r() {
|
|
@@ -1138,13 +1138,13 @@ var svga_lite_min = { exports: {} };
|
|
|
1138
1138
|
return r.prototype.get = function(u) {
|
|
1139
1139
|
var a = this;
|
|
1140
1140
|
if (!u) throw new Error("download link undefined");
|
|
1141
|
-
return new Promise(function(
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
!
|
|
1145
|
-
},
|
|
1146
|
-
return h
|
|
1147
|
-
},
|
|
1141
|
+
return new Promise(function(s, p) {
|
|
1142
|
+
var h = new XMLHttpRequest();
|
|
1143
|
+
h.open("GET", u, !0), h.responseType = "arraybuffer", h.onloadend = function() {
|
|
1144
|
+
!h.response || h.status !== 200 && h.status !== 304 ? p(h) : s(h.response);
|
|
1145
|
+
}, h.onerror = function() {
|
|
1146
|
+
return p(h.response);
|
|
1147
|
+
}, h.send(), a.request = h;
|
|
1148
1148
|
});
|
|
1149
1149
|
}, r.prototype.cancel = function() {
|
|
1150
1150
|
this.request && this.request.abort();
|
|
@@ -1162,29 +1162,29 @@ var svga_lite_min = { exports: {} };
|
|
|
1162
1162
|
var disableWorker = (_a === void 0 ? { disableWorker: !1 } : _a).disableWorker;
|
|
1163
1163
|
disableWorker ? (eval(WORKER), this.worker = window.SVGAParserMockWorker) : this.worker = new Worker(window.URL.createObjectURL(new Blob([WORKER])));
|
|
1164
1164
|
}
|
|
1165
|
-
return Parser.prototype.do = function(
|
|
1166
|
-
var y = this, n = new Uint8Array(
|
|
1165
|
+
return Parser.prototype.do = function(o) {
|
|
1166
|
+
var y = this, n = new Uint8Array(o, 0, 4);
|
|
1167
1167
|
if (n[0] == 80 && n[1] == 75 && n[2] == 3 && n[3] == 4) throw "this parser not support version@1.x of svga.";
|
|
1168
|
-
if (!
|
|
1168
|
+
if (!o) throw new Error("Parser Data not found");
|
|
1169
1169
|
if (!this.worker) throw new Error("Parser Worker not found");
|
|
1170
1170
|
return new Promise(function(t, r) {
|
|
1171
1171
|
var u;
|
|
1172
1172
|
y.worker.disableWorker ? ((u = y.worker).onmessageCallback = function(a) {
|
|
1173
1173
|
t(a);
|
|
1174
|
-
}, u.onmessage({ data:
|
|
1175
|
-
var
|
|
1176
|
-
t(
|
|
1174
|
+
}, u.onmessage({ data: o })) : ((u = y.worker).postMessage(o), u.onmessage = function(a) {
|
|
1175
|
+
var s = a.data;
|
|
1176
|
+
t(s);
|
|
1177
1177
|
});
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Parser.prototype.destroy = function() {
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1180
|
+
var o = this.worker;
|
|
1181
|
+
o.terminate && o.terminate();
|
|
1182
1182
|
}, Parser;
|
|
1183
1183
|
}();
|
|
1184
1184
|
exports$1.default = Parser;
|
|
1185
|
-
}, function(
|
|
1185
|
+
}, function(o, y, n) {
|
|
1186
1186
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1187
|
-
var t, r, u, a = n(5),
|
|
1187
|
+
var t, r, u, a = n(5), s = n(9);
|
|
1188
1188
|
(function(l) {
|
|
1189
1189
|
l.START = "start", l.RESUME = "resume", l.PROCESS = "process", l.PAUSE = "pause", l.STOP = "stop", l.END = "end", l.CLEAR = "clear";
|
|
1190
1190
|
})(t || (t = {})), function(l) {
|
|
@@ -1192,9 +1192,9 @@ var svga_lite_min = { exports: {} };
|
|
|
1192
1192
|
}(r || (r = {})), function(l) {
|
|
1193
1193
|
l.FORWARDS = "forwards", l.FALLBACKS = "fallbacks";
|
|
1194
1194
|
}(u || (u = {}));
|
|
1195
|
-
var
|
|
1196
|
-
function l(i,
|
|
1197
|
-
if (this.videoItem =
|
|
1195
|
+
var p = typeof window < "u" && "IntersectionObserver" in window, h = function() {
|
|
1196
|
+
function l(i, f, c) {
|
|
1197
|
+
if (this.videoItem = f, this.loop = !0, this.fillMode = r.FORWARDS, this.playMode = u.FORWARDS, this.progress = 0, this.currentFrame = 0, this.totalFramesCount = 0, this.startFrame = 0, this.endFrame = 0, this.cacheFrames = !1, this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0, this._intersectionObserver = null, this.$onEvent = { start: function() {
|
|
1198
1198
|
}, resume: function() {
|
|
1199
1199
|
}, process: function() {
|
|
1200
1200
|
}, pause: function() {
|
|
@@ -1203,17 +1203,17 @@ var svga_lite_min = { exports: {} };
|
|
|
1203
1203
|
}, clear: function() {
|
|
1204
1204
|
} }, this.container = typeof i == "string" ? document.body.querySelector(i) : i, !this.container) throw new Error("container undefined.");
|
|
1205
1205
|
if (!this.container.getContext) throw new Error("container should be HTMLCanvasElement.");
|
|
1206
|
-
this._renderer = new a.default(this), this._animator = new
|
|
1206
|
+
this._renderer = new a.default(this), this._animator = new s.default(), this.videoItem && this.mount(f), c && this.set(c);
|
|
1207
1207
|
}
|
|
1208
1208
|
return l.prototype.set = function(i) {
|
|
1209
|
-
var
|
|
1210
|
-
i.loop !== void 0 && (this.loop = i.loop), i.fillMode && (this.fillMode = i.fillMode), i.playMode && (this.playMode = i.playMode), i.cacheFrames !== void 0 && (this.cacheFrames = i.cacheFrames), this.startFrame = i.startFrame ? i.startFrame : this.startFrame, this.endFrame = i.endFrame ? i.endFrame : this.endFrame, i.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = i.intersectionObserverRender),
|
|
1211
|
-
c[0].intersectionRatio <= 0 ?
|
|
1209
|
+
var f = this;
|
|
1210
|
+
i.loop !== void 0 && (this.loop = i.loop), i.fillMode && (this.fillMode = i.fillMode), i.playMode && (this.playMode = i.playMode), i.cacheFrames !== void 0 && (this.cacheFrames = i.cacheFrames), this.startFrame = i.startFrame ? i.startFrame : this.startFrame, this.endFrame = i.endFrame ? i.endFrame : this.endFrame, i.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = i.intersectionObserverRender), p && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(c) {
|
|
1211
|
+
c[0].intersectionRatio <= 0 ? f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !1) : !f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !0);
|
|
1212
1212
|
}, { rootMargin: "0px", threshold: [0, 0.5, 1] }), this._intersectionObserver.observe(this.container)) : (this._intersectionObserver && this._intersectionObserver.disconnect(), this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0), this._animator.noExecutionDelay = i.noExecutionDelay;
|
|
1213
1213
|
}, l.prototype.mount = function(i) {
|
|
1214
|
-
var
|
|
1215
|
-
return new Promise(function(c,
|
|
1216
|
-
|
|
1214
|
+
var f = this;
|
|
1215
|
+
return new Promise(function(c, _) {
|
|
1216
|
+
f.currentFrame = 0, f.progress = 0, f.totalFramesCount = i.frames - 1, f.videoItem = i, f._renderer.prepare().then(c), f._renderer.clear(), f._setSize();
|
|
1217
1217
|
});
|
|
1218
1218
|
}, l.prototype.start = function() {
|
|
1219
1219
|
if (!this.videoItem) throw new Error("video item undefined.");
|
|
@@ -1229,134 +1229,134 @@ var svga_lite_min = { exports: {} };
|
|
|
1229
1229
|
this._animator && this._animator.stop(), this._renderer.clear(), this.$onEvent.clear();
|
|
1230
1230
|
}, l.prototype.destroy = function() {
|
|
1231
1231
|
this._animator && this._animator.stop(), this._renderer.clear(), this._animator = null, this._renderer = null, this.videoItem = null;
|
|
1232
|
-
}, l.prototype.$on = function(i,
|
|
1232
|
+
}, l.prototype.$on = function(i, f) {
|
|
1233
1233
|
var c = this;
|
|
1234
|
-
return this.$onEvent[i] =
|
|
1234
|
+
return this.$onEvent[i] = f, i === "end" && (this._animator.onEnd = function() {
|
|
1235
1235
|
return c.$onEvent.end();
|
|
1236
1236
|
}), this;
|
|
1237
1237
|
}, l.prototype._startAnimation = function() {
|
|
1238
|
-
var i = this,
|
|
1239
|
-
this.currentFrame ===
|
|
1238
|
+
var i = this, f = this, c = f.playMode, _ = f.totalFramesCount, v = f.startFrame, d = f.endFrame, m = f.videoItem;
|
|
1239
|
+
this.currentFrame === _ && (this.currentFrame = v || 0), this._animator.startValue = c === "fallbacks" ? d || _ : v || 0, this._animator.endValue = c === "fallbacks" ? v || 0 : d || _;
|
|
1240
1240
|
var e = m.frames;
|
|
1241
|
-
|
|
1242
|
-
|
|
1241
|
+
d > 0 && d > v ? e = d - v : d <= 0 && v > 0 && (e = m.frames - v), this._animator.duration = e * (1 / m.FPS) * 1e3, this._animator.loop = this.loop === !0 || this.loop <= 0 ? 1 / 0 : this.loop === !1 ? 1 : this.loop, this._animator.fillRule = this.fillMode === "backwards" ? 1 : 0, this._animator.onUpdate = function(x) {
|
|
1242
|
+
x = Math.floor(x), i.currentFrame !== x && (i.currentFrame = x, i.progress = parseFloat((x + 1).toString()) / parseFloat(m.frames.toString()) * 100, i._renderer.drawFrame(i.currentFrame), i.$onEvent.process());
|
|
1243
1243
|
}, this._animator.start(this.currentFrame);
|
|
1244
1244
|
}, l.prototype._setSize = function() {
|
|
1245
1245
|
var i = this.videoItem.videoSize;
|
|
1246
1246
|
this.container.width = i.width, this.container.height = i.height;
|
|
1247
1247
|
}, l;
|
|
1248
1248
|
}();
|
|
1249
|
-
y.default =
|
|
1250
|
-
}, function(
|
|
1249
|
+
y.default = h;
|
|
1250
|
+
}, function(o, y, n) {
|
|
1251
1251
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1252
1252
|
var t = n(6), r = function() {
|
|
1253
1253
|
function u(a) {
|
|
1254
1254
|
this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = a;
|
|
1255
|
-
var
|
|
1256
|
-
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(
|
|
1255
|
+
var s = this._player.container;
|
|
1256
|
+
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(s.width, s.height) : document.createElement("canvas");
|
|
1257
1257
|
}
|
|
1258
1258
|
return u.prototype.prepare = function() {
|
|
1259
1259
|
var a = this;
|
|
1260
|
-
return new Promise(function(
|
|
1260
|
+
return new Promise(function(s, p) {
|
|
1261
1261
|
if (a._bitmapCache = {}, a._player.videoItem.images && Object.keys(a._player.videoItem.images).length != 0) {
|
|
1262
1262
|
a._player.videoItem.dynamicElements && (a._dynamicElements = a._player.videoItem.dynamicElements);
|
|
1263
|
-
var
|
|
1263
|
+
var h = 0, l = 0;
|
|
1264
1264
|
for (var i in a._player.videoItem.images) {
|
|
1265
|
-
var
|
|
1266
|
-
if (typeof
|
|
1265
|
+
var f = a._player.videoItem.images[i];
|
|
1266
|
+
if (typeof f != "string" || f.indexOf("iVBO") !== 0 && f.indexOf("/9j/2w") !== 0) a._bitmapCache[i] = f;
|
|
1267
1267
|
else {
|
|
1268
|
-
|
|
1268
|
+
h++;
|
|
1269
1269
|
var c = document.createElement("img");
|
|
1270
|
-
c.src = "data:image/png;base64," +
|
|
1271
|
-
++l ===
|
|
1270
|
+
c.src = "data:image/png;base64," + f, a._bitmapCache[i] = c, c.onload = function() {
|
|
1271
|
+
++l === h && s();
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
} else
|
|
1275
|
+
} else s();
|
|
1276
1276
|
});
|
|
1277
1277
|
}, u.prototype.clear = function() {
|
|
1278
1278
|
this._player.container.width = this._player.container.width;
|
|
1279
1279
|
}, u.prototype.drawFrame = function(a) {
|
|
1280
|
-
var
|
|
1281
|
-
if (!
|
|
1280
|
+
var s = this._player;
|
|
1281
|
+
if (!s.intersectionObserverRender || s.intersectionObserverRenderShow) {
|
|
1282
1282
|
this.clear();
|
|
1283
|
-
var
|
|
1283
|
+
var p = s.container.getContext("2d");
|
|
1284
1284
|
if (this._player.cacheFrames && this._frames[a]) {
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1285
|
+
var h = this._frames[a];
|
|
1286
|
+
p.drawImage(h, 0, 0, h.width, h.height, 0, 0, h.width, h.height);
|
|
1287
1287
|
} else {
|
|
1288
1288
|
var l = this._ofsCanvas;
|
|
1289
|
-
if (l.width = this._player.container.width, l.height = this._player.container.height, t.default(l, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame),
|
|
1290
|
-
var i = l.toDataURL(),
|
|
1291
|
-
|
|
1289
|
+
if (l.width = this._player.container.width, l.height = this._player.container.height, t.default(l, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), p.drawImage(l, 0, 0, l.width, l.height, 0, 0, l.width, l.height), this._player.cacheFrames) if ("toDataURL" in l) {
|
|
1290
|
+
var i = l.toDataURL(), f = new Image();
|
|
1291
|
+
f.src = i, this._frames[a] = f;
|
|
1292
1292
|
} else this._frames[a] = l.transferToImageBitmap();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
}, u;
|
|
1296
1296
|
}();
|
|
1297
1297
|
y.default = r;
|
|
1298
|
-
}, function(
|
|
1298
|
+
}, function(o, y, n) {
|
|
1299
1299
|
Object.defineProperty(y, "__esModule", { value: !0 }), y.default = void 0;
|
|
1300
1300
|
var t = a(n(0)), r = a(n(7)), u = a(n(8));
|
|
1301
1301
|
function a(i) {
|
|
1302
1302
|
return i && i.__esModule ? i : { default: i };
|
|
1303
1303
|
}
|
|
1304
|
-
var
|
|
1305
|
-
function
|
|
1306
|
-
var c =
|
|
1304
|
+
var s = "MLHVCSQRZmlhvcsqrz";
|
|
1305
|
+
function p(i, f) {
|
|
1306
|
+
var c = f._styles;
|
|
1307
1307
|
c !== void 0 && (c && c.stroke ? i.strokeStyle = "rgba(".concat(parseInt((255 * c.stroke[0]).toString()), ", ").concat(parseInt((255 * c.stroke[1]).toString()), ", ").concat(parseInt((255 * c.stroke[2]).toString()), ", ").concat(c.stroke[3], ")") : i.strokeStyle = "transparent", c && (i.lineWidth = c.strokeWidth || void 0, i.lineCap = c.lineCap || void 0, i.lineJoin = c.lineJoin || void 0, i.miterLimit = c.miterLimit || void 0), c && c.fill ? i.fillStyle = "rgba(".concat(parseInt((255 * c.fill[0]).toString()), ", ").concat(parseInt((255 * c.fill[1]).toString()), ", ").concat(parseInt((255 * c.fill[2]).toString()), ", ").concat(c.fill[3], ")") : i.fillStyle = "transparent", c && c.lineDash && i.setLineDash(c.lineDash));
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
i.save(),
|
|
1309
|
+
function h(i, f) {
|
|
1310
|
+
i.save(), p(i, f), f._transform !== void 0 && f._transform !== null && i.transform(f._transform.a || 1, f._transform.b || 0, f._transform.c || 0, f._transform.d || 1, f._transform.tx || 0, f._transform.ty || 0);
|
|
1311
1311
|
var c = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
|
|
1312
|
-
i.beginPath(),
|
|
1313
|
-
if (
|
|
1314
|
-
var
|
|
1315
|
-
if (
|
|
1316
|
-
var
|
|
1317
|
-
(function(m, e,
|
|
1318
|
-
switch (
|
|
1312
|
+
i.beginPath(), f._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(_) {
|
|
1313
|
+
if (_.length != 0) {
|
|
1314
|
+
var v = _.substr(0, 1);
|
|
1315
|
+
if (s.indexOf(v) >= 0) {
|
|
1316
|
+
var d = _.substr(1).trim().split(" ");
|
|
1317
|
+
(function(m, e, x, g) {
|
|
1318
|
+
switch (x) {
|
|
1319
1319
|
case "M":
|
|
1320
|
-
e.x = Number(
|
|
1320
|
+
e.x = Number(g[0]), e.y = Number(g[1]), m.moveTo(e.x, e.y);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "m":
|
|
1323
|
-
e.x += Number(
|
|
1323
|
+
e.x += Number(g[0]), e.y += Number(g[1]), m.moveTo(e.x, e.y);
|
|
1324
1324
|
break;
|
|
1325
1325
|
case "L":
|
|
1326
|
-
e.x = Number(
|
|
1326
|
+
e.x = Number(g[0]), e.y = Number(g[1]), m.lineTo(e.x, e.y);
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "l":
|
|
1329
|
-
e.x += Number(
|
|
1329
|
+
e.x += Number(g[0]), e.y += Number(g[1]), m.lineTo(e.x, e.y);
|
|
1330
1330
|
break;
|
|
1331
1331
|
case "H":
|
|
1332
|
-
e.x = Number(
|
|
1332
|
+
e.x = Number(g[0]), m.lineTo(e.x, e.y);
|
|
1333
1333
|
break;
|
|
1334
1334
|
case "h":
|
|
1335
|
-
e.x += Number(
|
|
1335
|
+
e.x += Number(g[0]), m.lineTo(e.x, e.y);
|
|
1336
1336
|
break;
|
|
1337
1337
|
case "V":
|
|
1338
|
-
e.y = Number(
|
|
1338
|
+
e.y = Number(g[0]), m.lineTo(e.x, e.y);
|
|
1339
1339
|
break;
|
|
1340
1340
|
case "v":
|
|
1341
|
-
e.y += Number(
|
|
1341
|
+
e.y += Number(g[0]), m.lineTo(e.x, e.y);
|
|
1342
1342
|
break;
|
|
1343
1343
|
case "C":
|
|
1344
|
-
e.x1 = Number(
|
|
1344
|
+
e.x1 = Number(g[0]), e.y1 = Number(g[1]), e.x2 = Number(g[2]), e.y2 = Number(g[3]), e.x = Number(g[4]), e.y = Number(g[5]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
|
|
1345
1345
|
break;
|
|
1346
1346
|
case "c":
|
|
1347
|
-
e.x1 = e.x + Number(
|
|
1347
|
+
e.x1 = e.x + Number(g[0]), e.y1 = e.y + Number(g[1]), e.x2 = e.x + Number(g[2]), e.y2 = e.y + Number(g[3]), e.x += Number(g[4]), e.y += Number(g[5]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
|
|
1348
1348
|
break;
|
|
1349
1349
|
case "S":
|
|
1350
|
-
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(
|
|
1350
|
+
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(g[0]), e.y2 = Number(g[1]), e.x = Number(g[2]), e.y = Number(g[3]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(g[0]), e.y1 = Number(g[1]), e.x = Number(g[2]), e.y = Number(g[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
|
|
1351
1351
|
break;
|
|
1352
1352
|
case "s":
|
|
1353
|
-
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(
|
|
1353
|
+
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(g[0]), e.y2 = e.y + Number(g[1]), e.x += Number(g[2]), e.y += Number(g[3]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(g[0]), e.y1 = e.y + Number(g[1]), e.x += Number(g[2]), e.y += Number(g[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
|
|
1354
1354
|
break;
|
|
1355
1355
|
case "Q":
|
|
1356
|
-
e.x1 = Number(
|
|
1356
|
+
e.x1 = Number(g[0]), e.y1 = Number(g[1]), e.x = Number(g[2]), e.y = Number(g[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
|
|
1357
1357
|
break;
|
|
1358
1358
|
case "q":
|
|
1359
|
-
e.x1 = e.x + Number(
|
|
1359
|
+
e.x1 = e.x + Number(g[0]), e.y1 = e.y + Number(g[1]), e.x += Number(g[2]), e.y += Number(g[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
|
|
1360
1360
|
break;
|
|
1361
1361
|
case "A":
|
|
1362
1362
|
case "a":
|
|
@@ -1365,80 +1365,80 @@ var svga_lite_min = { exports: {} };
|
|
|
1365
1365
|
case "z":
|
|
1366
1366
|
m.closePath();
|
|
1367
1367
|
}
|
|
1368
|
-
})(i, c,
|
|
1368
|
+
})(i, c, v, d);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
-
}),
|
|
1371
|
+
}), f._styles && f._styles.fill ? i.fill() : f._styles && f._styles.stroke && i.stroke(), i.restore();
|
|
1372
1372
|
}
|
|
1373
|
-
var l = function(i,
|
|
1374
|
-
var
|
|
1375
|
-
return
|
|
1376
|
-
var e = m.frames[
|
|
1373
|
+
var l = function(i, f, c, _, v) {
|
|
1374
|
+
var d = i.getContext("2d");
|
|
1375
|
+
return _.sprites.forEach(function(m) {
|
|
1376
|
+
var e = m.frames[v];
|
|
1377
1377
|
if (!(e.alpha < 0.05)) {
|
|
1378
|
-
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
w.type === "shape" && w.pathArgs && w.pathArgs.d ? d
|
|
1384
|
-
N.save(),
|
|
1385
|
-
var
|
|
1386
|
-
N.beginPath(), N.moveTo(
|
|
1387
|
-
}(
|
|
1388
|
-
N.save(),
|
|
1389
|
-
var
|
|
1390
|
-
M < 2 * D && (D = M / 2), F < 2 * D && (D = F / 2), N.beginPath(), N.moveTo(
|
|
1391
|
-
}(
|
|
1392
|
-
}),
|
|
1378
|
+
d.save(), d.globalAlpha = e.alpha, d.transform(e.transform.a || 1, e.transform.b || 0, e.transform.c || 0, e.transform.d || 1, e.transform.tx || 0, e.transform.ty || 0);
|
|
1379
|
+
var x = f[m.imageKey];
|
|
1380
|
+
x && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, h(d, e.maskPath), d.clip()), d.drawImage(x, 0, 0));
|
|
1381
|
+
var g = c[m.imageKey];
|
|
1382
|
+
g && d.drawImage(g, (e.layout.width - g.width) / 2, (e.layout.height - g.height) / 2), e.shapes && e.shapes.forEach(function(w) {
|
|
1383
|
+
w.type === "shape" && w.pathArgs && w.pathArgs.d ? h(d, new t.default(w.pathArgs.d, w.transform, w.styles)) : w.type === "ellipse" && w.pathArgs ? function(N, S) {
|
|
1384
|
+
N.save(), p(N, S), S._transform !== void 0 && S._transform !== null && N.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
|
|
1385
|
+
var A = S._x - S._radiusX, O = S._y - S._radiusY, M = 2 * S._radiusX, F = 2 * S._radiusY, D = M / 2 * 0.5522848, E = F / 2 * 0.5522848, C = A + M, V = O + F, $ = A + M / 2, I = O + F / 2;
|
|
1386
|
+
N.beginPath(), N.moveTo(A, I), N.bezierCurveTo(A, I - E, $ - D, O, $, O), N.bezierCurveTo($ + D, O, C, I - E, C, I), N.bezierCurveTo(C, I + E, $ + D, V, $, V), N.bezierCurveTo($ - D, V, A, I + E, A, I), S._styles && S._styles.fill ? N.fill() : S._styles && S._styles.stroke && N.stroke(), N.restore();
|
|
1387
|
+
}(d, new r.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.radiusX) || 0, parseFloat(w.pathArgs.radiusY) || 0, w.transform, w.styles)) : w.type === "rect" && w.pathArgs && function(N, S) {
|
|
1388
|
+
N.save(), p(N, S), S._transform !== void 0 && S._transform !== null && N.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
|
|
1389
|
+
var A = S._x, O = S._y, M = S._width, F = S._height, D = S._cornerRadius;
|
|
1390
|
+
M < 2 * D && (D = M / 2), F < 2 * D && (D = F / 2), N.beginPath(), N.moveTo(A + D, O), N.arcTo(A + M, O, A + M, O + F, D), N.arcTo(A + M, O + F, A, O + F, D), N.arcTo(A, O + F, A, O, D), N.arcTo(A, O, A + M, O, D), N.closePath(), S._styles && S._styles.fill ? N.fill() : S._styles && S._styles.stroke && N.stroke(), N.restore();
|
|
1391
|
+
}(d, new u.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.width) || 0, parseFloat(w.pathArgs.height) || 0, parseFloat(w.pathArgs.cornerRadius) || 0, w.transform, w.styles));
|
|
1392
|
+
}), d.restore();
|
|
1393
1393
|
}
|
|
1394
1394
|
}), i;
|
|
1395
1395
|
};
|
|
1396
1396
|
y.default = l;
|
|
1397
|
-
}, function(
|
|
1398
|
-
var t, r = (t = function(a,
|
|
1399
|
-
return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
1400
|
-
|
|
1401
|
-
} || function(
|
|
1402
|
-
for (var l in
|
|
1403
|
-
})(a,
|
|
1404
|
-
}, function(a,
|
|
1405
|
-
function
|
|
1397
|
+
}, function(o, y, n) {
|
|
1398
|
+
var t, r = (t = function(a, s) {
|
|
1399
|
+
return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, h) {
|
|
1400
|
+
p.__proto__ = h;
|
|
1401
|
+
} || function(p, h) {
|
|
1402
|
+
for (var l in h) Object.prototype.hasOwnProperty.call(h, l) && (p[l] = h[l]);
|
|
1403
|
+
})(a, s);
|
|
1404
|
+
}, function(a, s) {
|
|
1405
|
+
function p() {
|
|
1406
1406
|
this.constructor = a;
|
|
1407
1407
|
}
|
|
1408
|
-
t(a,
|
|
1408
|
+
t(a, s), a.prototype = s === null ? Object.create(s) : (p.prototype = s.prototype, new p());
|
|
1409
1409
|
});
|
|
1410
1410
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1411
1411
|
var u = function(a) {
|
|
1412
|
-
function
|
|
1413
|
-
var
|
|
1414
|
-
return
|
|
1412
|
+
function s(p, h, l, i, f, c) {
|
|
1413
|
+
var _ = a.call(this) || this;
|
|
1414
|
+
return _._x = p, _._y = h, _._radiusX = l, _._radiusY = i, _._transform = f, _._styles = c, _;
|
|
1415
1415
|
}
|
|
1416
|
-
return r(
|
|
1416
|
+
return r(s, a), s;
|
|
1417
1417
|
}(n(0).default);
|
|
1418
1418
|
y.default = u;
|
|
1419
|
-
}, function(
|
|
1420
|
-
var t, r = (t = function(a,
|
|
1421
|
-
return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
1422
|
-
|
|
1423
|
-
} || function(
|
|
1424
|
-
for (var l in
|
|
1425
|
-
})(a,
|
|
1426
|
-
}, function(a,
|
|
1427
|
-
function
|
|
1419
|
+
}, function(o, y, n) {
|
|
1420
|
+
var t, r = (t = function(a, s) {
|
|
1421
|
+
return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, h) {
|
|
1422
|
+
p.__proto__ = h;
|
|
1423
|
+
} || function(p, h) {
|
|
1424
|
+
for (var l in h) Object.prototype.hasOwnProperty.call(h, l) && (p[l] = h[l]);
|
|
1425
|
+
})(a, s);
|
|
1426
|
+
}, function(a, s) {
|
|
1427
|
+
function p() {
|
|
1428
1428
|
this.constructor = a;
|
|
1429
1429
|
}
|
|
1430
|
-
t(a,
|
|
1430
|
+
t(a, s), a.prototype = s === null ? Object.create(s) : (p.prototype = s.prototype, new p());
|
|
1431
1431
|
});
|
|
1432
1432
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1433
1433
|
var u = function(a) {
|
|
1434
|
-
function
|
|
1435
|
-
var
|
|
1436
|
-
return
|
|
1434
|
+
function s(p, h, l, i, f, c, _) {
|
|
1435
|
+
var v = a.call(this) || this;
|
|
1436
|
+
return v._x = p, v._y = h, v._width = l, v._height = i, v._cornerRadius = f, v._transform = c, v._styles = _, v;
|
|
1437
1437
|
}
|
|
1438
|
-
return r(
|
|
1438
|
+
return r(s, a), s;
|
|
1439
1439
|
}(n(0).default);
|
|
1440
1440
|
y.default = u;
|
|
1441
|
-
}, function(
|
|
1441
|
+
}, function(o, y, n) {
|
|
1442
1442
|
Object.defineProperty(y, "__esModule", { value: !0 });
|
|
1443
1443
|
var t = function() {
|
|
1444
1444
|
function r() {
|
|
@@ -1472,7 +1472,7 @@ var svga_lite_min = { exports: {} };
|
|
|
1472
1472
|
});
|
|
1473
1473
|
})(svga_lite_min);
|
|
1474
1474
|
var svga_lite_minExports = svga_lite_min.exports;
|
|
1475
|
-
const _sfc_main$
|
|
1475
|
+
const _sfc_main$6 = {
|
|
1476
1476
|
__name: "hbis-svgaPlayer",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
/**
|
|
@@ -1551,55 +1551,55 @@ const _sfc_main$5 = {
|
|
|
1551
1551
|
*/
|
|
1552
1552
|
"error"
|
|
1553
1553
|
],
|
|
1554
|
-
setup(
|
|
1554
|
+
setup(o, { expose: y, emit: n }) {
|
|
1555
1555
|
useCssVars((e) => ({
|
|
1556
|
-
|
|
1557
|
-
|
|
1556
|
+
v5ce75b7f: o.width,
|
|
1557
|
+
v26351a8e: o.height
|
|
1558
1558
|
}));
|
|
1559
|
-
const t =
|
|
1560
|
-
let
|
|
1559
|
+
const t = o, r = n, u = ref(null), a = ref(null);
|
|
1560
|
+
let s = null, p = null, h = null;
|
|
1561
1561
|
const l = async () => {
|
|
1562
1562
|
try {
|
|
1563
|
-
|
|
1563
|
+
s = new svga_lite_minExports.Parser(), h = await s.load(t.src), p = new svga_lite_minExports.Player(a.value), p.loop = t.loop, p.speed = t.speed, p.onStart = () => r("play"), p.onPause = () => r("pause"), p.onEnd = () => r("ended"), p.onFrame = () => r("progress", p.progress), await p.setAnimationData(h), t.progress > 0 && (p.progress = t.progress), t.autoplay && p.start(), r("loaded");
|
|
1564
1564
|
} catch (e) {
|
|
1565
1565
|
console.error("SVGA 加载失败:", e), r("error", e);
|
|
1566
1566
|
}
|
|
1567
1567
|
}, i = () => {
|
|
1568
|
-
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1568
|
+
p && p.start();
|
|
1569
|
+
}, f = () => {
|
|
1570
|
+
p && p.pause();
|
|
1571
1571
|
}, c = () => {
|
|
1572
|
-
|
|
1573
|
-
},
|
|
1574
|
-
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1572
|
+
p && p.stop();
|
|
1573
|
+
}, _ = () => {
|
|
1574
|
+
p && (p.stop(), p.start());
|
|
1575
|
+
}, v = (e) => {
|
|
1576
|
+
p && (p.progress = e);
|
|
1577
|
+
}, d = (e) => {
|
|
1578
|
+
p && (p.speed = e);
|
|
1579
1579
|
}, m = (e) => {
|
|
1580
|
-
|
|
1580
|
+
p && (p.loop = e);
|
|
1581
1581
|
};
|
|
1582
1582
|
return y({
|
|
1583
1583
|
play: i,
|
|
1584
|
-
pause:
|
|
1584
|
+
pause: f,
|
|
1585
1585
|
stop: c,
|
|
1586
|
-
restart:
|
|
1587
|
-
setProgress:
|
|
1588
|
-
setSpeed:
|
|
1586
|
+
restart: _,
|
|
1587
|
+
setProgress: v,
|
|
1588
|
+
setSpeed: d,
|
|
1589
1589
|
setLoop: m
|
|
1590
1590
|
}), watch(() => t.src, async (e) => {
|
|
1591
1591
|
e && await l();
|
|
1592
1592
|
}), watch(() => t.loop, (e) => {
|
|
1593
1593
|
m(e);
|
|
1594
1594
|
}), watch(() => t.speed, (e) => {
|
|
1595
|
-
|
|
1595
|
+
d(e);
|
|
1596
1596
|
}), watch(() => t.progress, (e) => {
|
|
1597
|
-
|
|
1597
|
+
v(e);
|
|
1598
1598
|
}), onMounted(async () => {
|
|
1599
1599
|
await nextTick(), await l();
|
|
1600
1600
|
}), onUnmounted(() => {
|
|
1601
|
-
|
|
1602
|
-
}), (e,
|
|
1601
|
+
p && (p.stop(), p = null), s && (s = null), h = null;
|
|
1602
|
+
}), (e, x) => (openBlock(), createElementBlock("div", {
|
|
1603
1603
|
ref_key: "containerRef",
|
|
1604
1604
|
ref: u,
|
|
1605
1605
|
class: "svga-player-container"
|
|
@@ -1611,7 +1611,7 @@ const _sfc_main$5 = {
|
|
|
1611
1611
|
}, null, 512)
|
|
1612
1612
|
], 512));
|
|
1613
1613
|
}
|
|
1614
|
-
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1614
|
+
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-6b83dcf1"]]), _hoisted_1$5 = { class: "search-dropdown" }, _hoisted_2$5 = ["placeholder"], _hoisted_3$3 = ["onClick"], _hoisted_4$2 = { class: "item-text" }, _sfc_main$5 = {
|
|
1615
1615
|
__name: "hbis-search-input",
|
|
1616
1616
|
props: {
|
|
1617
1617
|
list: {
|
|
@@ -1645,79 +1645,79 @@ const _sfc_main$5 = {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
},
|
|
1647
1647
|
emits: ["clearIcon", "search", "select"],
|
|
1648
|
-
setup(
|
|
1649
|
-
const n =
|
|
1650
|
-
function
|
|
1651
|
-
r.value = "",
|
|
1648
|
+
setup(o, { emit: y }) {
|
|
1649
|
+
const n = o, t = y, r = ref(n.defaultValue), u = ref(!1), a = ref(!1), s = ref([]);
|
|
1650
|
+
function p() {
|
|
1651
|
+
r.value = "", s.value = [], a.value = !1, t("clearIcon", "", []);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function h() {
|
|
1654
1654
|
if (!n.enterSearch)
|
|
1655
1655
|
return;
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1658
|
-
(
|
|
1659
|
-
), a.value =
|
|
1656
|
+
const _ = r.value;
|
|
1657
|
+
s.value = n.list.filter(
|
|
1658
|
+
(v) => v.label && v.label.includes(_)
|
|
1659
|
+
), a.value = s.value.length > 0, t("search", _, s.value);
|
|
1660
1660
|
}
|
|
1661
1661
|
function l() {
|
|
1662
1662
|
if (n.enterSearch)
|
|
1663
1663
|
return;
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
(
|
|
1667
|
-
), a.value =
|
|
1664
|
+
const _ = r.value;
|
|
1665
|
+
s.value = n.list.filter(
|
|
1666
|
+
(v) => v.label && v.label.includes(_)
|
|
1667
|
+
), a.value = s.value.length > 0, t("search", _, s.value);
|
|
1668
1668
|
}
|
|
1669
1669
|
function i() {
|
|
1670
|
-
n.onFocusShowList && (
|
|
1671
|
-
(
|
|
1670
|
+
n.onFocusShowList && (s.value = n.list.filter(
|
|
1671
|
+
(_) => _.label && _.label.includes(r.value)
|
|
1672
1672
|
), a.value = !0), u.value = !0;
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function f() {
|
|
1675
1675
|
setTimeout(() => {
|
|
1676
1676
|
u.value = !1, a.value = !1;
|
|
1677
1677
|
}, 150);
|
|
1678
1678
|
}
|
|
1679
|
-
function c(
|
|
1680
|
-
r.value =
|
|
1679
|
+
function c(_) {
|
|
1680
|
+
r.value = _.label, a.value = !1, t("select", _);
|
|
1681
1681
|
}
|
|
1682
1682
|
return onMounted(() => {
|
|
1683
1683
|
n.defaultValue && (r.value = n.defaultValue);
|
|
1684
|
-
}), (
|
|
1684
|
+
}), (_, v) => (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1685
1685
|
createElementVNode("div", {
|
|
1686
1686
|
class: normalizeClass(["input-wrapper", { focus: u.value }])
|
|
1687
1687
|
}, [
|
|
1688
1688
|
withDirectives(createElementVNode("input", {
|
|
1689
1689
|
class: "search-input",
|
|
1690
|
-
placeholder:
|
|
1691
|
-
"onUpdate:modelValue":
|
|
1690
|
+
placeholder: o.placeholder,
|
|
1691
|
+
"onUpdate:modelValue": v[0] || (v[0] = (d) => r.value = d),
|
|
1692
1692
|
onInput: l,
|
|
1693
1693
|
onFocus: i,
|
|
1694
|
-
onBlur:
|
|
1695
|
-
onKeyup: withKeys(
|
|
1696
|
-
}, null, 40, _hoisted_2$
|
|
1694
|
+
onBlur: f,
|
|
1695
|
+
onKeyup: withKeys(h, ["enter"])
|
|
1696
|
+
}, null, 40, _hoisted_2$5), [
|
|
1697
1697
|
[vModelText, r.value]
|
|
1698
1698
|
]),
|
|
1699
|
-
r.value &&
|
|
1699
|
+
r.value && o.showClear ? (openBlock(), createElementBlock("div", {
|
|
1700
1700
|
key: 0,
|
|
1701
1701
|
class: "clear-icon",
|
|
1702
|
-
onClick:
|
|
1702
|
+
onClick: p
|
|
1703
1703
|
}, "×")) : createCommentVNode("", !0)
|
|
1704
1704
|
], 2),
|
|
1705
|
-
a.value &&
|
|
1705
|
+
a.value && s.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1706
1706
|
key: 0,
|
|
1707
1707
|
class: "dropdown-list",
|
|
1708
|
-
style: normalizeStyle({ maxHeight:
|
|
1708
|
+
style: normalizeStyle({ maxHeight: o.maxHeight + "px" })
|
|
1709
1709
|
}, [
|
|
1710
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1710
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (d, m) => (openBlock(), createElementBlock("div", {
|
|
1711
1711
|
key: m,
|
|
1712
1712
|
class: "dropdown-item",
|
|
1713
|
-
onClick: (e) => c(
|
|
1713
|
+
onClick: (e) => c(d)
|
|
1714
1714
|
}, [
|
|
1715
|
-
createElementVNode("span", _hoisted_4$2, toDisplayString(
|
|
1716
|
-
], 8, _hoisted_3$
|
|
1715
|
+
createElementVNode("span", _hoisted_4$2, toDisplayString(d.label), 1)
|
|
1716
|
+
], 8, _hoisted_3$3))), 128))
|
|
1717
1717
|
], 4)) : createCommentVNode("", !0)
|
|
1718
1718
|
]));
|
|
1719
1719
|
}
|
|
1720
|
-
}, _hoisted_1$
|
|
1720
|
+
}, _hoisted_1$4 = ["src", "alt"], _hoisted_2$4 = ["onClick"], _sfc_main$4 = {
|
|
1721
1721
|
__name: "hbis-swiper",
|
|
1722
1722
|
props: {
|
|
1723
1723
|
data: {
|
|
@@ -1739,7 +1739,7 @@ const _sfc_main$5 = {
|
|
|
1739
1739
|
direction: {
|
|
1740
1740
|
type: String,
|
|
1741
1741
|
default: "horizontal",
|
|
1742
|
-
validator: (
|
|
1742
|
+
validator: (o) => ["horizontal", "vertical"].includes(o)
|
|
1743
1743
|
},
|
|
1744
1744
|
showIndicators: {
|
|
1745
1745
|
type: Boolean,
|
|
@@ -1748,12 +1748,12 @@ const _sfc_main$5 = {
|
|
|
1748
1748
|
indicatorType: {
|
|
1749
1749
|
type: String,
|
|
1750
1750
|
default: "dots",
|
|
1751
|
-
validator: (
|
|
1751
|
+
validator: (o) => ["dots", "numbers", "none"].includes(o)
|
|
1752
1752
|
},
|
|
1753
1753
|
indicatorPosition: {
|
|
1754
1754
|
type: String,
|
|
1755
1755
|
default: "bottom",
|
|
1756
|
-
validator: (
|
|
1756
|
+
validator: (o) => ["top", "bottom", "left", "right"].includes(o)
|
|
1757
1757
|
},
|
|
1758
1758
|
showArrows: {
|
|
1759
1759
|
type: Boolean,
|
|
@@ -1801,22 +1801,22 @@ const _sfc_main$5 = {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
},
|
|
1803
1803
|
emits: ["change", "transition-start", "transition-end"],
|
|
1804
|
-
setup(
|
|
1805
|
-
const t =
|
|
1804
|
+
setup(o, { expose: y, emit: n }) {
|
|
1805
|
+
const t = o, r = n, u = ref(null), a = ref(0), s = ref(!1), p = ref(!1), h = ref(0), l = ref(0), i = ref(0), f = ref(null);
|
|
1806
1806
|
ref(!1);
|
|
1807
|
-
const c = computed(() => !t.loop || t.data.length <= 1 ? t.data : [t.data[t.data.length - 1], ...t.data, t.data[0]]),
|
|
1807
|
+
const c = computed(() => !t.loop || t.data.length <= 1 ? t.data : [t.data[t.data.length - 1], ...t.data, t.data[0]]), _ = computed(() => ({
|
|
1808
1808
|
width: typeof t.width == "number" ? `${t.width}px` : t.width,
|
|
1809
1809
|
height: typeof t.height == "number" ? `${t.height}px` : t.height,
|
|
1810
1810
|
position: "relative",
|
|
1811
1811
|
overflow: "hidden"
|
|
1812
|
-
})),
|
|
1812
|
+
})), v = computed(() => ({
|
|
1813
1813
|
transform: `translate(${t.direction === "horizontal" ? `${i.value}px, 0` : `0, ${i.value}px`})`,
|
|
1814
|
-
transition:
|
|
1814
|
+
transition: s.value ? `transform ${t.duration}ms ease` : "none",
|
|
1815
1815
|
display: "flex",
|
|
1816
1816
|
flexDirection: t.direction === "horizontal" ? "row" : "column",
|
|
1817
1817
|
width: t.direction === "horizontal" ? "100%" : "auto",
|
|
1818
1818
|
height: t.direction === "horizontal" ? "100%" : "auto"
|
|
1819
|
-
})),
|
|
1819
|
+
})), d = computed(() => ({
|
|
1820
1820
|
width: typeof t.slideWidth == "number" ? `${t.slideWidth}px` : t.slideWidth,
|
|
1821
1821
|
height: typeof t.slideHeight == "number" ? `${t.slideHeight}px` : t.slideHeight,
|
|
1822
1822
|
flexShrink: 0,
|
|
@@ -1826,136 +1826,136 @@ const _sfc_main$5 = {
|
|
|
1826
1826
|
width: t.indicatorType === "numbers" ? "24px" : `${t.indicatorSize}px`,
|
|
1827
1827
|
height: `${t.indicatorSize}px`,
|
|
1828
1828
|
borderRadius: t.indicatorType === "numbers" ? "4px" : "50%"
|
|
1829
|
-
})), e = computed(() => !t.loop || t.data.length <= 1 ? a.value : (a.value - 1 + t.data.length) % t.data.length),
|
|
1829
|
+
})), e = computed(() => !t.loop || t.data.length <= 1 ? a.value : (a.value - 1 + t.data.length) % t.data.length), x = () => {
|
|
1830
1830
|
if (!u.value) return;
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1833
|
-
},
|
|
1834
|
-
|
|
1831
|
+
const E = t.direction === "horizontal" ? u.value.offsetWidth : u.value.offsetHeight;
|
|
1832
|
+
E && (i.value = -a.value * E);
|
|
1833
|
+
}, g = (E) => {
|
|
1834
|
+
s.value || p.value || E < 0 || E >= c.value.length || (s.value = !0, a.value = E, r("change", e.value));
|
|
1835
1835
|
}, w = () => {
|
|
1836
|
-
|
|
1836
|
+
s.value || p.value || (s.value = !0, a.value++, r("change", e.value));
|
|
1837
1837
|
}, N = () => {
|
|
1838
|
-
|
|
1838
|
+
s.value || p.value || (s.value = !0, a.value--, r("change", e.value));
|
|
1839
1839
|
}, S = () => {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
}, 0)) : a.value === c.value.length - 1 && (
|
|
1843
|
-
|
|
1840
|
+
s.value = !1, r("transition-end", e.value), t.loop && t.data.length > 1 && (a.value === 0 ? (s.value = !0, a.value = c.value.length - 2, setTimeout(() => {
|
|
1841
|
+
s.value = !1;
|
|
1842
|
+
}, 0)) : a.value === c.value.length - 1 && (s.value = !0, a.value = 1, setTimeout(() => {
|
|
1843
|
+
s.value = !1;
|
|
1844
1844
|
}, 0)));
|
|
1845
|
-
},
|
|
1846
|
-
|
|
1845
|
+
}, A = () => {
|
|
1846
|
+
O(), t.autoplay && t.data.length > 1 && (f.value = setInterval(() => {
|
|
1847
1847
|
w();
|
|
1848
1848
|
}, t.interval));
|
|
1849
|
-
},
|
|
1850
|
-
|
|
1851
|
-
}, M = (
|
|
1852
|
-
var
|
|
1853
|
-
if (
|
|
1854
|
-
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1857
|
-
const V = t.direction === "horizontal" ? (
|
|
1849
|
+
}, O = () => {
|
|
1850
|
+
f.value && (clearInterval(f.value), f.value = null);
|
|
1851
|
+
}, M = (E) => {
|
|
1852
|
+
var $, I;
|
|
1853
|
+
if (E.touches.length !== 1) return;
|
|
1854
|
+
O(), p.value = !0;
|
|
1855
|
+
const C = E.touches[0];
|
|
1856
|
+
h.value = C.clientX || C.pageX, l.value = C.clientY || C.pageY;
|
|
1857
|
+
const V = t.direction === "horizontal" ? ($ = u.value) == null ? void 0 : $.offsetWidth : (I = u.value) == null ? void 0 : I.offsetHeight;
|
|
1858
1858
|
i.value = -a.value * (V || 0);
|
|
1859
|
-
}, F = (
|
|
1860
|
-
var
|
|
1861
|
-
if (!
|
|
1862
|
-
const
|
|
1863
|
-
i.value = -a.value * (
|
|
1859
|
+
}, F = (E) => {
|
|
1860
|
+
var T, B;
|
|
1861
|
+
if (!p.value) return;
|
|
1862
|
+
const C = E.touches[0], V = C.clientX || C.pageX, $ = C.clientY || C.pageY, I = V - h.value, R = $ - l.value, b = t.direction === "horizontal" ? (T = u.value) == null ? void 0 : T.offsetWidth : (B = u.value) == null ? void 0 : B.offsetHeight, k = t.direction === "horizontal" ? I : R;
|
|
1863
|
+
i.value = -a.value * (b || 0) + k * t.touchRatio;
|
|
1864
1864
|
}, D = () => {
|
|
1865
|
-
var
|
|
1866
|
-
if (!
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1869
|
-
Math.abs(V) > t.threshold ? V > 0 ? N() : w() : (
|
|
1870
|
-
|
|
1871
|
-
}, t.duration)),
|
|
1865
|
+
var $, I;
|
|
1866
|
+
if (!p.value) return;
|
|
1867
|
+
p.value = !1;
|
|
1868
|
+
const E = t.direction === "horizontal" ? ($ = u.value) == null ? void 0 : $.offsetWidth : (I = u.value) == null ? void 0 : I.offsetHeight, C = -a.value * (E || 0), V = i.value - C;
|
|
1869
|
+
Math.abs(V) > t.threshold ? V > 0 ? N() : w() : (s.value = !0, i.value = C, setTimeout(() => {
|
|
1870
|
+
s.value = !1;
|
|
1871
|
+
}, t.duration)), A();
|
|
1872
1872
|
};
|
|
1873
1873
|
return watch(() => t.data, () => {
|
|
1874
|
-
a.value = t.loop ? 1 : 0,
|
|
1875
|
-
}, { immediate: !0 }), watch(() => t.autoplay, (
|
|
1876
|
-
|
|
1874
|
+
a.value = t.loop ? 1 : 0, x();
|
|
1875
|
+
}, { immediate: !0 }), watch(() => t.autoplay, (E) => {
|
|
1876
|
+
E ? A() : O();
|
|
1877
1877
|
}), watch(a, () => {
|
|
1878
|
-
|
|
1878
|
+
x();
|
|
1879
1879
|
}), onMounted(() => {
|
|
1880
|
-
var
|
|
1881
|
-
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1880
|
+
var C;
|
|
1881
|
+
x(), A();
|
|
1882
|
+
const E = (C = u.value) == null ? void 0 : C.parentElement;
|
|
1883
|
+
E && (E.addEventListener("touchstart", M, { passive: !0 }), E.addEventListener("touchmove", F, { passive: !0 }), E.addEventListener("touchend", D, { passive: !0 })), window.addEventListener("resize", x);
|
|
1884
1884
|
}), onUnmounted(() => {
|
|
1885
|
-
var
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1885
|
+
var C;
|
|
1886
|
+
O();
|
|
1887
|
+
const E = (C = u.value) == null ? void 0 : C.parentElement;
|
|
1888
|
+
E && (E.removeEventListener("touchstart", M), E.removeEventListener("touchmove", F), E.removeEventListener("touchend", D)), window.removeEventListener("resize", x);
|
|
1889
1889
|
}), y({
|
|
1890
1890
|
next: w,
|
|
1891
1891
|
prev: N,
|
|
1892
|
-
goToSlide:
|
|
1893
|
-
startAutoplay:
|
|
1894
|
-
stopAutoplay:
|
|
1895
|
-
}), (
|
|
1896
|
-
class: normalizeClass(["hbis-swiper", { "is-vertical":
|
|
1897
|
-
style: normalizeStyle(
|
|
1892
|
+
goToSlide: g,
|
|
1893
|
+
startAutoplay: A,
|
|
1894
|
+
stopAutoplay: O
|
|
1895
|
+
}), (E, C) => (openBlock(), createElementBlock("div", {
|
|
1896
|
+
class: normalizeClass(["hbis-swiper", { "is-vertical": o.direction === "vertical" }]),
|
|
1897
|
+
style: normalizeStyle(_.value)
|
|
1898
1898
|
}, [
|
|
1899
1899
|
createElementVNode("div", {
|
|
1900
1900
|
class: "swiper-wrapper",
|
|
1901
1901
|
ref_key: "wrapperRef",
|
|
1902
1902
|
ref: u,
|
|
1903
|
-
style: normalizeStyle(
|
|
1903
|
+
style: normalizeStyle(v.value),
|
|
1904
1904
|
onTransitionend: S
|
|
1905
1905
|
}, [
|
|
1906
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (V,
|
|
1906
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (V, $) => (openBlock(), createElementBlock("div", {
|
|
1907
1907
|
class: "swiper-slide",
|
|
1908
|
-
key:
|
|
1909
|
-
style: normalizeStyle(
|
|
1908
|
+
key: $,
|
|
1909
|
+
style: normalizeStyle(d.value)
|
|
1910
1910
|
}, [
|
|
1911
|
-
renderSlot(
|
|
1911
|
+
renderSlot(E.$slots, "default", {
|
|
1912
1912
|
item: V,
|
|
1913
|
-
index:
|
|
1913
|
+
index: $
|
|
1914
1914
|
}, () => [
|
|
1915
1915
|
createElementVNode("img", {
|
|
1916
1916
|
src: V,
|
|
1917
|
-
alt: `slide-${
|
|
1917
|
+
alt: `slide-${$}`,
|
|
1918
1918
|
class: "swiper-image"
|
|
1919
|
-
}, null, 8, _hoisted_1$
|
|
1919
|
+
}, null, 8, _hoisted_1$4)
|
|
1920
1920
|
], !0)
|
|
1921
1921
|
], 4))), 128))
|
|
1922
1922
|
], 36),
|
|
1923
|
-
|
|
1923
|
+
o.showIndicators && c.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1924
1924
|
key: 0,
|
|
1925
|
-
class: normalizeClass(["swiper-indicators",
|
|
1925
|
+
class: normalizeClass(["swiper-indicators", o.indicatorPosition])
|
|
1926
1926
|
}, [
|
|
1927
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (V,
|
|
1928
|
-
key:
|
|
1929
|
-
class: normalizeClass(["indicator", { active: a.value ===
|
|
1927
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (V, $) => (openBlock(), createElementBlock("span", {
|
|
1928
|
+
key: $,
|
|
1929
|
+
class: normalizeClass(["indicator", { active: a.value === $, "is-dots": o.indicatorType === "dots", "is-numbers": o.indicatorType === "numbers" }]),
|
|
1930
1930
|
style: normalizeStyle(m.value),
|
|
1931
|
-
onClick: (I) =>
|
|
1931
|
+
onClick: (I) => g($)
|
|
1932
1932
|
}, [
|
|
1933
|
-
|
|
1934
|
-
createTextVNode(toDisplayString(
|
|
1933
|
+
o.indicatorType === "numbers" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1934
|
+
createTextVNode(toDisplayString($ + 1), 1)
|
|
1935
1935
|
], 64)) : createCommentVNode("", !0)
|
|
1936
|
-
], 14, _hoisted_2$
|
|
1936
|
+
], 14, _hoisted_2$4))), 128))
|
|
1937
1937
|
], 2)) : createCommentVNode("", !0),
|
|
1938
|
-
|
|
1938
|
+
o.showArrows && c.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1939
1939
|
key: 1,
|
|
1940
1940
|
class: "swiper-arrow swiper-arrow-prev",
|
|
1941
1941
|
onClick: N
|
|
1942
1942
|
}, [
|
|
1943
|
-
renderSlot(
|
|
1944
|
-
|
|
1943
|
+
renderSlot(E.$slots, "arrow-prev", {}, () => [
|
|
1944
|
+
C[0] || (C[0] = createElementVNode("span", { class: "arrow-icon" }, "‹", -1))
|
|
1945
1945
|
], !0)
|
|
1946
1946
|
])) : createCommentVNode("", !0),
|
|
1947
|
-
|
|
1947
|
+
o.showArrows && c.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1948
1948
|
key: 2,
|
|
1949
1949
|
class: "swiper-arrow swiper-arrow-next",
|
|
1950
1950
|
onClick: w
|
|
1951
1951
|
}, [
|
|
1952
|
-
renderSlot(
|
|
1953
|
-
|
|
1952
|
+
renderSlot(E.$slots, "arrow-next", {}, () => [
|
|
1953
|
+
C[1] || (C[1] = createElementVNode("span", { class: "arrow-icon" }, "›", -1))
|
|
1954
1954
|
], !0)
|
|
1955
1955
|
])) : createCommentVNode("", !0)
|
|
1956
1956
|
], 6));
|
|
1957
1957
|
}
|
|
1958
|
-
}, hbisSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1958
|
+
}, hbisSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-61e2df95"]]), _hoisted_1$3 = { class: "dropdown-filter" }, _hoisted_2$3 = { class: "filter-container" }, _hoisted_3$2 = ["onClick"], _hoisted_4$1 = { class: "filter-label" }, _hoisted_5$1 = { class: "filter-value-group" }, _hoisted_6$1 = { class: "filter-value" }, _hoisted_7$1 = ["onClick"], _sfc_main$3 = {
|
|
1959
1959
|
__name: "hbis-dropdown-select",
|
|
1960
1960
|
props: {
|
|
1961
1961
|
// 筛选配置项
|
|
@@ -1995,74 +1995,74 @@ const _sfc_main$5 = {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
},
|
|
1997
1997
|
emits: ["update:modelValue", "change"],
|
|
1998
|
-
setup(
|
|
1999
|
-
const n =
|
|
1998
|
+
setup(o, { emit: y }) {
|
|
1999
|
+
const n = o, t = y, r = ref(-1), u = ref(n.options), a = (l) => {
|
|
2000
2000
|
r.value === l ? r.value = -1 : r.value = l;
|
|
2001
|
-
},
|
|
2001
|
+
}, s = (l, i, f) => {
|
|
2002
2002
|
const c = {
|
|
2003
2003
|
...n.modelValue
|
|
2004
2004
|
};
|
|
2005
2005
|
c[l.key] = i.value, t("update:modelValue", c), t("change", {
|
|
2006
2006
|
item: l,
|
|
2007
2007
|
option: i,
|
|
2008
|
-
index:
|
|
2008
|
+
index: f
|
|
2009
2009
|
}), r.value = -1;
|
|
2010
|
-
},
|
|
2010
|
+
}, p = (l) => {
|
|
2011
2011
|
const i = n.modelValue[l.key];
|
|
2012
2012
|
if (i !== void 0) {
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2013
|
+
const f = l.options.find((c) => c.value === i);
|
|
2014
|
+
return f ? f.label : "请选择";
|
|
2015
2015
|
}
|
|
2016
2016
|
return "请选择";
|
|
2017
|
-
},
|
|
2018
|
-
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2019
|
-
createElementVNode("div", _hoisted_2$
|
|
2020
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (
|
|
2017
|
+
}, h = (l, i) => n.modelValue[l.key] === i.value;
|
|
2018
|
+
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2019
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
2020
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (f, c) => (openBlock(), createElementBlock("div", {
|
|
2021
2021
|
key: c,
|
|
2022
2022
|
class: normalizeClass(["filter-item", { active: r.value === c }])
|
|
2023
2023
|
}, [
|
|
2024
2024
|
createElementVNode("div", {
|
|
2025
2025
|
class: "filter-header",
|
|
2026
|
-
onClick: (
|
|
2026
|
+
onClick: (_) => a(c)
|
|
2027
2027
|
}, [
|
|
2028
|
-
createElementVNode("span", _hoisted_4$1, toDisplayString(
|
|
2028
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(f.label), 1),
|
|
2029
2029
|
createElementVNode("div", _hoisted_5$1, [
|
|
2030
|
-
createElementVNode("span", _hoisted_6$1, toDisplayString(
|
|
2030
|
+
createElementVNode("span", _hoisted_6$1, toDisplayString(p(f)), 1),
|
|
2031
2031
|
n.showArrow ? (openBlock(), createElementBlock("div", {
|
|
2032
2032
|
key: 0,
|
|
2033
2033
|
class: normalizeClass(["arrow", { up: r.value === c }])
|
|
2034
2034
|
}, null, 2)) : createCommentVNode("", !0)
|
|
2035
2035
|
])
|
|
2036
|
-
], 8, _hoisted_3$
|
|
2036
|
+
], 8, _hoisted_3$2),
|
|
2037
2037
|
r.value === c ? (openBlock(), createElementBlock("div", {
|
|
2038
2038
|
key: 0,
|
|
2039
2039
|
class: normalizeClass([n.showScrollBar ? "dropdown-menu-show" : "dropdown-menu-hide"]),
|
|
2040
|
-
style: normalizeStyle(n.listHeight ? `height: ${n.listHeight}px;` : `height: ${
|
|
2040
|
+
style: normalizeStyle(n.listHeight ? `height: ${n.listHeight}px;` : `height: ${f.options.length * 40}px;`)
|
|
2041
2041
|
}, [
|
|
2042
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2043
|
-
key:
|
|
2044
|
-
class: normalizeClass(["dropdown-item", { selected:
|
|
2045
|
-
onClick: (
|
|
2042
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f.options, (_, v) => (openBlock(), createElementBlock("div", {
|
|
2043
|
+
key: v,
|
|
2044
|
+
class: normalizeClass(["dropdown-item", { selected: h(f, _) }]),
|
|
2045
|
+
onClick: (d) => s(f, _, c)
|
|
2046
2046
|
}, [
|
|
2047
2047
|
createElementVNode("span", {
|
|
2048
|
-
style: normalizeStyle(
|
|
2049
|
-
}, toDisplayString(
|
|
2048
|
+
style: normalizeStyle(h(f, _) ? `color: ${n.chosenColor};` : `color: ${n.unChosenColor};`)
|
|
2049
|
+
}, toDisplayString(_.label), 5)
|
|
2050
2050
|
], 10, _hoisted_7$1))), 128))
|
|
2051
2051
|
], 6)) : createCommentVNode("", !0)
|
|
2052
2052
|
], 2))), 128))
|
|
2053
2053
|
])
|
|
2054
2054
|
]));
|
|
2055
2055
|
}
|
|
2056
|
-
}, hbisDropdownSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2056
|
+
}, hbisDropdownSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1a98ef80"]]), _hoisted_1$2 = {
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
class: "hbis-password-input"
|
|
2059
|
-
}, _hoisted_2$
|
|
2059
|
+
}, _hoisted_2$2 = { class: "password-dialog" }, _hoisted_3$1 = { class: "password-header" }, _hoisted_4 = { class: "password-title" }, _hoisted_5 = { class: "password-body" }, _hoisted_6 = { class: "password-input-container" }, _hoisted_7 = {
|
|
2060
2060
|
key: 0,
|
|
2061
2061
|
class: "password-visible"
|
|
2062
2062
|
}, _hoisted_8 = {
|
|
2063
2063
|
key: 1,
|
|
2064
2064
|
class: "password-hidden"
|
|
2065
|
-
}, _hoisted_9 = { class: "password-keyboard" }, _hoisted_10 = ["onClick"], _hoisted_11 = { class: "password-footer" }, _sfc_main$
|
|
2065
|
+
}, _hoisted_9 = { class: "password-keyboard" }, _hoisted_10 = ["onClick"], _hoisted_11 = { class: "password-footer" }, _sfc_main$2 = {
|
|
2066
2066
|
__name: "hbis-password-input",
|
|
2067
2067
|
props: {
|
|
2068
2068
|
/**
|
|
@@ -2129,8 +2129,8 @@ const _sfc_main$5 = {
|
|
|
2129
2129
|
*/
|
|
2130
2130
|
"confirm"
|
|
2131
2131
|
],
|
|
2132
|
-
setup(
|
|
2133
|
-
const n =
|
|
2132
|
+
setup(o, { emit: y }) {
|
|
2133
|
+
const n = o, t = y, r = ref([]), u = (l) => ["清除", "删除"].includes(l);
|
|
2134
2134
|
watch(r, (l) => {
|
|
2135
2135
|
if (l.length === n.maxLength) {
|
|
2136
2136
|
const i = l.join("");
|
|
@@ -2139,10 +2139,10 @@ const _sfc_main$5 = {
|
|
|
2139
2139
|
}, { deep: !0 });
|
|
2140
2140
|
const a = (l) => {
|
|
2141
2141
|
l === "清除" ? r.value = [] : l === "删除" ? r.value = r.value.slice(0, -1) : /^[0-9]$/.test(l) && r.value.length < n.maxLength && r.value.push(l);
|
|
2142
|
-
},
|
|
2143
|
-
},
|
|
2142
|
+
}, s = () => {
|
|
2143
|
+
}, p = () => {
|
|
2144
2144
|
t("close"), t("update:visible", !1);
|
|
2145
|
-
},
|
|
2145
|
+
}, h = () => {
|
|
2146
2146
|
const l = r.value.join("");
|
|
2147
2147
|
t("confirm", l);
|
|
2148
2148
|
};
|
|
@@ -2150,55 +2150,55 @@ const _sfc_main$5 = {
|
|
|
2150
2150
|
r.value = [];
|
|
2151
2151
|
}), watch(() => n.visible, (l) => {
|
|
2152
2152
|
l && (r.value = []);
|
|
2153
|
-
}), (l, i) =>
|
|
2153
|
+
}), (l, i) => o.visible ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2154
2154
|
createElementVNode("div", {
|
|
2155
2155
|
class: "password-overlay",
|
|
2156
|
-
onClick:
|
|
2156
|
+
onClick: s
|
|
2157
2157
|
}),
|
|
2158
|
-
createElementVNode("div", _hoisted_2$
|
|
2159
|
-
createElementVNode("div", _hoisted_3, [
|
|
2160
|
-
createElementVNode("h3", _hoisted_4, toDisplayString(
|
|
2158
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
2159
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
2160
|
+
createElementVNode("h3", _hoisted_4, toDisplayString(o.title), 1),
|
|
2161
2161
|
createElementVNode("button", {
|
|
2162
2162
|
class: "password-close",
|
|
2163
|
-
onClick:
|
|
2163
|
+
onClick: p
|
|
2164
2164
|
}, "×")
|
|
2165
2165
|
]),
|
|
2166
2166
|
createElementVNode("div", _hoisted_5, [
|
|
2167
2167
|
createElementVNode("div", _hoisted_6, [
|
|
2168
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2168
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.maxLength, (f, c) => (openBlock(), createElementBlock("div", {
|
|
2169
2169
|
key: c,
|
|
2170
2170
|
class: "password-input-item"
|
|
2171
2171
|
}, [
|
|
2172
|
-
|
|
2172
|
+
o.showPassword ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(r.value[c] || ""), 1)) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(r.value[c] ? "●" : ""), 1))
|
|
2173
2173
|
]))), 128))
|
|
2174
2174
|
]),
|
|
2175
2175
|
createElementVNode("div", _hoisted_9, [
|
|
2176
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2176
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.keyboardLayout, (f, c) => (openBlock(), createElementBlock("div", {
|
|
2177
2177
|
key: c,
|
|
2178
2178
|
class: "keyboard-row"
|
|
2179
2179
|
}, [
|
|
2180
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2181
|
-
key:
|
|
2182
|
-
class: normalizeClass(["keyboard-key", { "keyboard-key-action": u(
|
|
2183
|
-
onClick: (
|
|
2184
|
-
}, toDisplayString(
|
|
2180
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f, (_, v) => (openBlock(), createElementBlock("button", {
|
|
2181
|
+
key: v,
|
|
2182
|
+
class: normalizeClass(["keyboard-key", { "keyboard-key-action": u(_) }]),
|
|
2183
|
+
onClick: (d) => a(_)
|
|
2184
|
+
}, toDisplayString(_), 11, _hoisted_10))), 128))
|
|
2185
2185
|
]))), 128))
|
|
2186
2186
|
])
|
|
2187
2187
|
]),
|
|
2188
2188
|
createElementVNode("div", _hoisted_11, [
|
|
2189
2189
|
createElementVNode("button", {
|
|
2190
2190
|
class: "password-cancel",
|
|
2191
|
-
onClick:
|
|
2191
|
+
onClick: p
|
|
2192
2192
|
}, "取消"),
|
|
2193
2193
|
createElementVNode("button", {
|
|
2194
2194
|
class: "password-confirm",
|
|
2195
|
-
onClick:
|
|
2196
|
-
}, toDisplayString(
|
|
2195
|
+
onClick: h
|
|
2196
|
+
}, toDisplayString(o.confirmText), 1)
|
|
2197
2197
|
])
|
|
2198
2198
|
])
|
|
2199
2199
|
])) : createCommentVNode("", !0);
|
|
2200
2200
|
}
|
|
2201
|
-
}, hbisPasswordInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2201
|
+
}, hbisPasswordInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-32ee9eeb"]]), _hoisted_1$1 = { class: "hbis-empty-content" }, _hoisted_2$1 = ["src"], _sfc_main$1 = {
|
|
2202
2202
|
__name: "hbis-empty",
|
|
2203
2203
|
props: {
|
|
2204
2204
|
/**
|
|
@@ -2272,38 +2272,197 @@ const _sfc_main$5 = {
|
|
|
2272
2272
|
default: () => ({})
|
|
2273
2273
|
}
|
|
2274
2274
|
},
|
|
2275
|
-
setup(
|
|
2276
|
-
const y =
|
|
2275
|
+
setup(o) {
|
|
2276
|
+
const y = o, n = {
|
|
2277
2277
|
width: typeof y.iconWidth == "number" ? `${y.iconWidth}px` : y.iconWidth,
|
|
2278
2278
|
height: typeof y.iconHeight == "number" ? `${y.iconHeight}px` : y.iconHeight
|
|
2279
2279
|
}, t = {
|
|
2280
2280
|
color: y.textColor,
|
|
2281
2281
|
fontSize: typeof y.textFontSize == "number" ? `${y.textFontSize}px` : y.textFontSize
|
|
2282
2282
|
};
|
|
2283
|
-
return (r, u) =>
|
|
2283
|
+
return (r, u) => o.visible ? (openBlock(), createElementBlock("div", {
|
|
2284
2284
|
key: 0,
|
|
2285
2285
|
class: "hbis-empty-container",
|
|
2286
|
-
style: normalizeStyle(
|
|
2286
|
+
style: normalizeStyle(o.containerStyle)
|
|
2287
2287
|
}, [
|
|
2288
2288
|
renderSlot(r.$slots, "default", {}, () => [
|
|
2289
|
-
createElementVNode("div", _hoisted_1, [
|
|
2290
|
-
|
|
2289
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
2290
|
+
o.showIcon ? (openBlock(), createElementBlock("image", {
|
|
2291
2291
|
key: 0,
|
|
2292
|
-
src:
|
|
2292
|
+
src: o.icon,
|
|
2293
2293
|
style: n,
|
|
2294
2294
|
class: "hbis-empty-image",
|
|
2295
2295
|
mode: "aspectFit"
|
|
2296
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", !0),
|
|
2297
|
-
|
|
2296
|
+
}, null, 8, _hoisted_2$1)) : createCommentVNode("", !0),
|
|
2297
|
+
o.showText ? (openBlock(), createElementBlock("div", {
|
|
2298
2298
|
key: 1,
|
|
2299
2299
|
style: t,
|
|
2300
2300
|
class: "hbis-empty-text"
|
|
2301
|
-
}, toDisplayString(
|
|
2301
|
+
}, toDisplayString(o.text), 1)) : createCommentVNode("", !0)
|
|
2302
2302
|
])
|
|
2303
2303
|
], !0)
|
|
2304
2304
|
], 4)) : createCommentVNode("", !0);
|
|
2305
2305
|
}
|
|
2306
|
-
}, hbisEmpty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2306
|
+
}, hbisEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-27a2026a"]]), _hoisted_1 = ["onClick"], _hoisted_2 = ["src"], _hoisted_3 = { class: "hbis-bubble-option-text" }, _sfc_main = {
|
|
2307
|
+
__name: "hbis-bubble-box",
|
|
2308
|
+
props: {
|
|
2309
|
+
/**
|
|
2310
|
+
* 气泡弹框选项列表
|
|
2311
|
+
* @type {BubbleBoxOptionItem[]}
|
|
2312
|
+
*/
|
|
2313
|
+
options: {
|
|
2314
|
+
type: Array,
|
|
2315
|
+
default: () => []
|
|
2316
|
+
},
|
|
2317
|
+
/**
|
|
2318
|
+
* 气泡弹框弹出位置
|
|
2319
|
+
* @type {'top' | 'bottom' | 'left' | 'right'}
|
|
2320
|
+
*/
|
|
2321
|
+
position: {
|
|
2322
|
+
type: String,
|
|
2323
|
+
default: "top",
|
|
2324
|
+
validator: (o) => ["top", "bottom", "left", "right"].includes(o)
|
|
2325
|
+
},
|
|
2326
|
+
/**
|
|
2327
|
+
* 气泡弹框宽度,默认单位 rpx
|
|
2328
|
+
*/
|
|
2329
|
+
width: {
|
|
2330
|
+
type: [String, Number],
|
|
2331
|
+
default: ""
|
|
2332
|
+
},
|
|
2333
|
+
/**
|
|
2334
|
+
* 气泡弹框最小宽度,默认单位 rpx
|
|
2335
|
+
*/
|
|
2336
|
+
minWidth: {
|
|
2337
|
+
type: [String, Number],
|
|
2338
|
+
default: 280
|
|
2339
|
+
},
|
|
2340
|
+
/**
|
|
2341
|
+
* 气泡弹框高度,默认单位 rpx
|
|
2342
|
+
*/
|
|
2343
|
+
height: {
|
|
2344
|
+
type: [String, Number],
|
|
2345
|
+
default: ""
|
|
2346
|
+
},
|
|
2347
|
+
/**
|
|
2348
|
+
* 弹框背景颜色
|
|
2349
|
+
*/
|
|
2350
|
+
bgColor: {
|
|
2351
|
+
type: String,
|
|
2352
|
+
default: "#ffffff"
|
|
2353
|
+
},
|
|
2354
|
+
/**
|
|
2355
|
+
* 选项文字颜色
|
|
2356
|
+
*/
|
|
2357
|
+
textColor: {
|
|
2358
|
+
type: String,
|
|
2359
|
+
default: "#333333"
|
|
2360
|
+
},
|
|
2361
|
+
/**
|
|
2362
|
+
* 选项内边距
|
|
2363
|
+
*/
|
|
2364
|
+
optionItemPadding: {
|
|
2365
|
+
type: String,
|
|
2366
|
+
default: "20rpx 30rpx"
|
|
2367
|
+
},
|
|
2368
|
+
/**
|
|
2369
|
+
* 是否禁止选择选项
|
|
2370
|
+
*/
|
|
2371
|
+
disabled: {
|
|
2372
|
+
type: Boolean,
|
|
2373
|
+
default: !1
|
|
2374
|
+
},
|
|
2375
|
+
/**
|
|
2376
|
+
* 点击选项后自动关闭气泡框
|
|
2377
|
+
*/
|
|
2378
|
+
autoClose: {
|
|
2379
|
+
type: Boolean,
|
|
2380
|
+
default: !0
|
|
2381
|
+
},
|
|
2382
|
+
/**
|
|
2383
|
+
* z-index
|
|
2384
|
+
*/
|
|
2385
|
+
zIndex: {
|
|
2386
|
+
type: Number,
|
|
2387
|
+
default: 1002
|
|
2388
|
+
}
|
|
2389
|
+
},
|
|
2390
|
+
emits: ["open", "close", "click"],
|
|
2391
|
+
setup(o, { expose: y, emit: n }) {
|
|
2392
|
+
const t = o, r = n, u = ref(!1), a = ref(null), s = computed(() => {
|
|
2393
|
+
const v = {
|
|
2394
|
+
zIndex: t.zIndex,
|
|
2395
|
+
backgroundColor: t.bgColor
|
|
2396
|
+
};
|
|
2397
|
+
return t.width && (v.width = typeof t.width == "number" ? `${t.width}rpx` : t.width), t.minWidth && (v.minWidth = typeof t.minWidth == "number" ? `${t.minWidth}rpx` : t.minWidth), t.height && (v.height = typeof t.height == "number" ? `${t.height}rpx` : t.height), v;
|
|
2398
|
+
}), p = computed(() => {
|
|
2399
|
+
const v = {};
|
|
2400
|
+
return t.height && (v.maxHeight = typeof t.height == "number" ? `${t.height}rpx` : t.height, v.overflowY = "auto"), v;
|
|
2401
|
+
}), h = (v) => {
|
|
2402
|
+
const d = {};
|
|
2403
|
+
return v.textColor ? d.color = v.textColor : t.textColor && (d.color = t.textColor), d;
|
|
2404
|
+
}, l = () => {
|
|
2405
|
+
u.value ? f() : i();
|
|
2406
|
+
}, i = () => {
|
|
2407
|
+
u.value = !0, r("open"), setTimeout(() => {
|
|
2408
|
+
document.addEventListener("click", _);
|
|
2409
|
+
}, 0);
|
|
2410
|
+
}, f = () => {
|
|
2411
|
+
u.value = !1, r("close"), document.removeEventListener("click", _);
|
|
2412
|
+
}, c = (v, d) => {
|
|
2413
|
+
d.disabled || t.disabled || (r("click", v), t.autoClose && f());
|
|
2414
|
+
}, _ = (v) => {
|
|
2415
|
+
a.value && !a.value.contains(v.target) && f();
|
|
2416
|
+
};
|
|
2417
|
+
return onUnmounted(() => {
|
|
2418
|
+
document.removeEventListener("click", _);
|
|
2419
|
+
}), y({
|
|
2420
|
+
open: i,
|
|
2421
|
+
close: f
|
|
2422
|
+
}), (v, d) => (openBlock(), createElementBlock("div", {
|
|
2423
|
+
ref_key: "bubbleRef",
|
|
2424
|
+
ref: a,
|
|
2425
|
+
class: "hbis-bubble-box"
|
|
2426
|
+
}, [
|
|
2427
|
+
createElementVNode("div", {
|
|
2428
|
+
class: "hbis-bubble-trigger",
|
|
2429
|
+
onClick: l
|
|
2430
|
+
}, [
|
|
2431
|
+
renderSlot(v.$slots, "default", {}, void 0, !0)
|
|
2432
|
+
]),
|
|
2433
|
+
u.value ? (openBlock(), createElementBlock("div", {
|
|
2434
|
+
key: 0,
|
|
2435
|
+
class: normalizeClass(["hbis-bubble-popup", [`position-${o.position}`, { "auto-close": o.autoClose }]]),
|
|
2436
|
+
style: normalizeStyle(s.value),
|
|
2437
|
+
onClick: d[0] || (d[0] = withModifiers(() => {
|
|
2438
|
+
}, ["stop"]))
|
|
2439
|
+
}, [
|
|
2440
|
+
createElementVNode("div", {
|
|
2441
|
+
class: "hbis-bubble-options",
|
|
2442
|
+
style: normalizeStyle(p.value)
|
|
2443
|
+
}, [
|
|
2444
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.options, (m, e) => (openBlock(), createElementBlock("div", {
|
|
2445
|
+
key: e,
|
|
2446
|
+
class: normalizeClass(["hbis-bubble-option", { disabled: m.disabled || o.disabled }]),
|
|
2447
|
+
style: normalizeStyle(h(m)),
|
|
2448
|
+
onClick: (x) => c(e, m)
|
|
2449
|
+
}, [
|
|
2450
|
+
m.icon ? (openBlock(), createElementBlock("image", {
|
|
2451
|
+
key: 0,
|
|
2452
|
+
src: m.icon,
|
|
2453
|
+
class: "hbis-bubble-option-icon",
|
|
2454
|
+
mode: "aspectFit"
|
|
2455
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", !0),
|
|
2456
|
+
createElementVNode("text", _hoisted_3, toDisplayString(m.text), 1)
|
|
2457
|
+
], 14, _hoisted_1))), 128))
|
|
2458
|
+
], 4),
|
|
2459
|
+
createElementVNode("div", {
|
|
2460
|
+
class: normalizeClass(["hbis-bubble-arrow", `arrow-${o.position}`])
|
|
2461
|
+
}, null, 2)
|
|
2462
|
+
], 6)) : createCommentVNode("", !0)
|
|
2463
|
+
], 512));
|
|
2464
|
+
}
|
|
2465
|
+
}, hbisBubbleBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7ba99b3"]]);
|
|
2307
2466
|
export {
|
|
2308
2467
|
C1,
|
|
2309
2468
|
C2,
|
|
@@ -2312,13 +2471,14 @@ export {
|
|
|
2312
2471
|
HbisSvgaPlayer,
|
|
2313
2472
|
HbisWaterfall,
|
|
2314
2473
|
HbisAutoScrollList as hbisAutoScrollList,
|
|
2474
|
+
hbisBubbleBox,
|
|
2315
2475
|
hbisDateStrip,
|
|
2316
2476
|
hbisDropdownSelect as hbisDropDownSelect,
|
|
2317
2477
|
hbisEmpty,
|
|
2318
2478
|
hbisLoading,
|
|
2319
2479
|
hbisPasswordInput,
|
|
2320
|
-
_sfc_main$
|
|
2321
|
-
_sfc_main$
|
|
2480
|
+
_sfc_main$b as hbisPreviewImage,
|
|
2481
|
+
_sfc_main$5 as hbisSearchInput,
|
|
2322
2482
|
HbisSmsInput as hbisSmsInput,
|
|
2323
2483
|
HbisSvgaPlayer as hbisSvgaPlayer,
|
|
2324
2484
|
hbisSwiper,
|