@hbis-uni/components 2.13.0 → 2.15.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 +2302 -1083
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +31 -1
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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$
|
|
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, inject, provide, vModelDynamic } from "vue";
|
|
2
|
+
const _sfc_main$l = /* @__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(
|
|
9
|
-
return (
|
|
10
|
-
class: normalizeClass(["c1-container", { "c1-primary":
|
|
8
|
+
setup(r) {
|
|
9
|
+
return (g, i) => (openBlock(), createElementBlock("div", {
|
|
10
|
+
class: normalizeClass(["c1-container", { "c1-primary": r.primary }])
|
|
11
11
|
}, [
|
|
12
|
-
renderSlot(
|
|
13
|
-
createTextVNode(toDisplayString(
|
|
12
|
+
renderSlot(g.$slots, "default", {}, () => [
|
|
13
|
+
createTextVNode(toDisplayString(r.title), 1)
|
|
14
14
|
], !0)
|
|
15
15
|
], 2));
|
|
16
16
|
}
|
|
17
|
-
}), _export_sfc = (
|
|
18
|
-
const
|
|
19
|
-
for (const [
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17
|
+
}), _export_sfc = (r, g) => {
|
|
18
|
+
const i = r.__vccOpts || r;
|
|
19
|
+
for (const [e, o] of g)
|
|
20
|
+
i[e] = o;
|
|
21
|
+
return i;
|
|
22
|
+
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-e2028f64"]]), _hoisted_1$g = { class: "c2-container" }, _hoisted_2$f = { class: "c2-title" }, _hoisted_3$c = { class: "c2-content" }, _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
23
23
|
__name: "C2",
|
|
24
24
|
props: {
|
|
25
25
|
title: { default: "C2 Component" },
|
|
@@ -27,33 +27,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
buttonText: { default: "Click Me" }
|
|
28
28
|
},
|
|
29
29
|
emits: ["click"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
|
|
30
|
+
setup(r, { emit: g }) {
|
|
31
|
+
const i = g, e = (o) => {
|
|
32
|
+
i("click", o);
|
|
33
33
|
};
|
|
34
|
-
return (
|
|
35
|
-
createElementVNode("h2", _hoisted_2$
|
|
36
|
-
createElementVNode("div", _hoisted_3$
|
|
37
|
-
renderSlot(
|
|
34
|
+
return (o, a) => (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
35
|
+
createElementVNode("h2", _hoisted_2$f, toDisplayString(r.title), 1),
|
|
36
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
37
|
+
renderSlot(o.$slots, "default", {}, void 0, !0)
|
|
38
38
|
]),
|
|
39
|
-
|
|
39
|
+
r.showButton ? (openBlock(), createElementBlock("button", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "c2-button",
|
|
42
|
-
onClick:
|
|
43
|
-
}, toDisplayString(
|
|
42
|
+
onClick: e
|
|
43
|
+
}, toDisplayString(r.buttonText), 1)) : createCommentVNode("", !0)
|
|
44
44
|
]));
|
|
45
45
|
}
|
|
46
|
-
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
46
|
+
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-b1d573ae"]]), _hoisted_1$f = { key: 0 }, _hoisted_2$e = { class: "hbis-date-strip__weekdays" }, _hoisted_3$b = { class: "hbis-date-strip__dates" }, _hoisted_4$9 = ["onClick"], _hoisted_5$7 = { class: "hbis-date-strip__date-number" }, _hoisted_6$6 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$6 = {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "hbis-date-strip__scroll-wrapper"
|
|
49
|
-
}, _hoisted_8$
|
|
49
|
+
}, _hoisted_8$4 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9$2 = { 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$j = /* @__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 r = /* @__PURE__ */ new Date();
|
|
56
|
+
return r.setDate(r.getDate() + 30), r;
|
|
57
57
|
} },
|
|
58
58
|
highlightType: { default: "bg" },
|
|
59
59
|
showToday: { type: Boolean, default: !0 },
|
|
@@ -67,33 +67,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
visibleDays: { default: 7 }
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:modelValue", "dateClick"],
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
70
|
+
setup(r, { emit: g }) {
|
|
71
|
+
const i = r, e = g, o = computed(() => {
|
|
72
72
|
if (console.log("props:", {
|
|
73
|
-
startDate:
|
|
74
|
-
endDate:
|
|
75
|
-
scrollable:
|
|
76
|
-
}),
|
|
73
|
+
startDate: i.startDate,
|
|
74
|
+
endDate: i.endDate,
|
|
75
|
+
scrollable: i.scrollable
|
|
76
|
+
}), i.scrollable)
|
|
77
77
|
return console.log("显式设置了scrollable为true,允许滚动"), !0;
|
|
78
78
|
try {
|
|
79
|
-
const d = new Date(
|
|
79
|
+
const d = new Date(i.startDate);
|
|
80
80
|
d.setHours(0, 0, 0, 0);
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
81
|
+
const b = new Date(i.endDate);
|
|
82
|
+
if (b.setHours(0, 0, 0, 0), isNaN(d.getTime()) || isNaN(b.getTime()))
|
|
83
83
|
return console.log("无效的日期对象,使用默认滚动行为"), !1;
|
|
84
|
-
const
|
|
84
|
+
const t = b.getTime() - d.getTime(), w = Math.ceil(t / (1e3 * 60 * 60 * 24)), v = w + 1;
|
|
85
85
|
return console.log("日期范围天数计算:", {
|
|
86
86
|
start: d.toLocaleDateString(),
|
|
87
|
-
end:
|
|
88
|
-
diffTime:
|
|
89
|
-
diffDays:
|
|
90
|
-
totalDays:
|
|
91
|
-
shouldScroll:
|
|
92
|
-
}),
|
|
87
|
+
end: b.toLocaleDateString(),
|
|
88
|
+
diffTime: t,
|
|
89
|
+
diffDays: w,
|
|
90
|
+
totalDays: v,
|
|
91
|
+
shouldScroll: v > 7
|
|
92
|
+
}), v > 7;
|
|
93
93
|
} catch (d) {
|
|
94
94
|
return console.error("计算日期范围时出错:", d), !1;
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), a = [
|
|
97
97
|
{ value: 0, label: "日", isWeekend: !0 },
|
|
98
98
|
{ value: 1, label: "一", isWeekend: !1 },
|
|
99
99
|
{ value: 2, label: "二", isWeekend: !1 },
|
|
@@ -101,155 +101,155 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
{ value: 4, label: "四", isWeekend: !1 },
|
|
102
102
|
{ value: 5, label: "五", isWeekend: !1 },
|
|
103
103
|
{ value: 6, label: "六", isWeekend: !0 }
|
|
104
|
-
],
|
|
105
|
-
const d =
|
|
104
|
+
], c = computed(() => {
|
|
105
|
+
const d = p.value[0];
|
|
106
106
|
if (!d)
|
|
107
|
-
return
|
|
108
|
-
const
|
|
109
|
-
for (let
|
|
110
|
-
const
|
|
111
|
-
|
|
107
|
+
return a;
|
|
108
|
+
const b = d.weekday, t = [];
|
|
109
|
+
for (let w = 0; w < 7; w++) {
|
|
110
|
+
const v = (b + w) % 7;
|
|
111
|
+
t.push(a[v]);
|
|
112
112
|
}
|
|
113
|
-
return
|
|
113
|
+
return t;
|
|
114
114
|
});
|
|
115
115
|
ref((() => {
|
|
116
|
-
const d =
|
|
117
|
-
return
|
|
116
|
+
const d = i.startDate || /* @__PURE__ */ new Date(), b = d.getDay(), t = d.getDate() - (b === 0 ? 6 : b - 1), w = new Date(d);
|
|
117
|
+
return w.setDate(t), w;
|
|
118
118
|
})()), onMounted(() => {
|
|
119
|
-
console.log("props:",
|
|
119
|
+
console.log("props:", i), console.log("highlightType:", i.highlightType);
|
|
120
120
|
}), watch(
|
|
121
|
-
() =>
|
|
121
|
+
() => i.highlightType,
|
|
122
122
|
(d) => {
|
|
123
123
|
console.log("highlightType changed:", d);
|
|
124
124
|
}
|
|
125
125
|
), watch(
|
|
126
|
-
() =>
|
|
126
|
+
() => i.modelValue,
|
|
127
127
|
(d) => {
|
|
128
128
|
console.log("modelValue changed:", d);
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
const
|
|
131
|
+
const u = computed(() => {
|
|
132
132
|
const d = [];
|
|
133
133
|
try {
|
|
134
|
-
const
|
|
135
|
-
if (isNaN(
|
|
134
|
+
const b = i.startDate, t = i.endDate;
|
|
135
|
+
if (isNaN(b.getTime()) || isNaN(t.getTime()))
|
|
136
136
|
return console.log("无效的日期对象,返回空数组"), d;
|
|
137
|
-
const
|
|
138
|
-
for (let
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
date:
|
|
142
|
-
dateString:
|
|
143
|
-
day:
|
|
144
|
-
month:
|
|
145
|
-
year:
|
|
146
|
-
isWeekend:
|
|
147
|
-
weekday:
|
|
137
|
+
const w = Math.ceil((t.getTime() - b.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
138
|
+
for (let v = 0; v < w; v++) {
|
|
139
|
+
const _ = new Date(b);
|
|
140
|
+
_.setDate(b.getDate() + v), isNaN(_.getTime()) || d.push({
|
|
141
|
+
date: _,
|
|
142
|
+
dateString: h(_),
|
|
143
|
+
day: _.getDate(),
|
|
144
|
+
month: _.getMonth() + 1,
|
|
145
|
+
year: _.getFullYear(),
|
|
146
|
+
isWeekend: _.getDay() === 0 || _.getDay() === 6,
|
|
147
|
+
weekday: _.getDay()
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
} catch (
|
|
151
|
-
console.error("生成日期数组时出错:",
|
|
150
|
+
} catch (b) {
|
|
151
|
+
console.error("生成日期数组时出错:", b);
|
|
152
152
|
}
|
|
153
153
|
return d;
|
|
154
|
-
}),
|
|
155
|
-
const
|
|
156
|
-
return
|
|
154
|
+
}), p = computed(() => u.value.filter((d) => !!(d && d.date && d.dateString && !isNaN(d.date.getTime()) && typeof d.dateString == "string" && typeof d.day == "number"))), h = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`, s = (d) => {
|
|
155
|
+
const b = d.dateString;
|
|
156
|
+
return i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue.some((t) => !t || isNaN(t.getTime()) ? !1 : h(t) === b) : isNaN(i.modelValue.getTime()) ? !1 : h(i.modelValue) === b : !1;
|
|
157
|
+
}, n = (d) => {
|
|
158
|
+
const b = h(/* @__PURE__ */ new Date());
|
|
159
|
+
return d.dateString === b;
|
|
157
160
|
}, f = (d) => {
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
return
|
|
163
|
-
},
|
|
164
|
-
|
|
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));
|
|
161
|
+
const b = d.date;
|
|
162
|
+
return i.disablePast && b < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || i.disableFuture && b > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : b >= i.startDate && b <= i.endDate;
|
|
163
|
+
}, y = (d) => {
|
|
164
|
+
var b;
|
|
165
|
+
return ((b = a.find((t) => t.value === d)) == null ? void 0 : b.label) || "";
|
|
166
|
+
}, m = (d) => {
|
|
167
|
+
f(d) && (e("dateClick", d), e("update:modelValue", d.date));
|
|
168
168
|
};
|
|
169
|
-
return (d,
|
|
169
|
+
return (d, b) => (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":
|
|
174
|
-
"hbis-date-strip--scrollable":
|
|
171
|
+
"hbis-date-strip--highlight-bg": r.highlightType === "bg",
|
|
172
|
+
"hbis-date-strip--highlight-dot": r.highlightType === "dot",
|
|
173
|
+
"hbis-date-strip--highlight-round": r.highlightType === "round",
|
|
174
|
+
"hbis-date-strip--scrollable": o.value
|
|
175
175
|
}])
|
|
176
176
|
}, [
|
|
177
|
-
|
|
178
|
-
createElementVNode("div", _hoisted_8$
|
|
179
|
-
createElementVNode("div", _hoisted_9$
|
|
180
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
181
|
-
key:
|
|
177
|
+
o.value ? (openBlock(), createElementBlock("div", _hoisted_7$6, [
|
|
178
|
+
createElementVNode("div", _hoisted_8$4, [
|
|
179
|
+
createElementVNode("div", _hoisted_9$2, [
|
|
180
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.value, (t) => (openBlock(), createElementBlock("div", {
|
|
181
|
+
key: t.dateString + "-weekday",
|
|
182
182
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
183
|
-
"hbis-date-strip__weekday--weekend":
|
|
183
|
+
"hbis-date-strip__weekday--weekend": t.isWeekend
|
|
184
184
|
}])
|
|
185
|
-
}, toDisplayString(
|
|
185
|
+
}, toDisplayString(y(t.weekday)), 3))), 128))
|
|
186
186
|
]),
|
|
187
187
|
createElementVNode("div", _hoisted_10$1, [
|
|
188
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
189
|
-
key:
|
|
188
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.value, (t) => (openBlock(), createElementBlock("div", {
|
|
189
|
+
key: t.dateString,
|
|
190
190
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
191
|
-
"hbis-date-strip__date--selected":
|
|
192
|
-
"hbis-date-strip__date--today":
|
|
193
|
-
"hbis-date-strip__date--disabled": !
|
|
194
|
-
"hbis-date-strip__date--weekend":
|
|
191
|
+
"hbis-date-strip__date--selected": s(t),
|
|
192
|
+
"hbis-date-strip__date--today": n(t),
|
|
193
|
+
"hbis-date-strip__date--disabled": !f(t),
|
|
194
|
+
"hbis-date-strip__date--weekend": t.isWeekend
|
|
195
195
|
}]),
|
|
196
196
|
style: normalizeStyle({
|
|
197
|
-
color:
|
|
198
|
-
backgroundColor:
|
|
197
|
+
color: s(t) ? r.selectedColor : r.normalColor,
|
|
198
|
+
backgroundColor: s(t) ? r.selectedBgColor : r.normalBgColor
|
|
199
199
|
}),
|
|
200
|
-
onClick: (
|
|
200
|
+
onClick: (w) => m(t)
|
|
201
201
|
}, [
|
|
202
|
-
createElementVNode("div", _hoisted_12, toDisplayString(
|
|
202
|
+
createElementVNode("div", _hoisted_12, toDisplayString(t.day), 1),
|
|
203
203
|
createElementVNode("div", _hoisted_13, [
|
|
204
|
-
renderSlot(d.$slots, "default", { date:
|
|
204
|
+
renderSlot(d.$slots, "default", { date: t }, 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$
|
|
211
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
212
|
-
key:
|
|
209
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
210
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
211
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (t) => (openBlock(), createElementBlock("div", {
|
|
212
|
+
key: t.value,
|
|
213
213
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
214
|
-
"hbis-date-strip__weekday--weekend":
|
|
214
|
+
"hbis-date-strip__weekday--weekend": t.isWeekend
|
|
215
215
|
}])
|
|
216
|
-
}, toDisplayString(
|
|
216
|
+
}, toDisplayString(t.label), 3))), 128))
|
|
217
217
|
]),
|
|
218
|
-
createElementVNode("div", _hoisted_3$
|
|
219
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
220
|
-
key:
|
|
218
|
+
createElementVNode("div", _hoisted_3$b, [
|
|
219
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.value, (t) => (openBlock(), createElementBlock("div", {
|
|
220
|
+
key: t.dateString,
|
|
221
221
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
222
|
-
"hbis-date-strip__date--selected":
|
|
223
|
-
"hbis-date-strip__date--today":
|
|
224
|
-
"hbis-date-strip__date--disabled": !
|
|
225
|
-
"hbis-date-strip__date--weekend":
|
|
222
|
+
"hbis-date-strip__date--selected": s(t),
|
|
223
|
+
"hbis-date-strip__date--today": n(t),
|
|
224
|
+
"hbis-date-strip__date--disabled": !f(t),
|
|
225
|
+
"hbis-date-strip__date--weekend": t.isWeekend
|
|
226
226
|
}]),
|
|
227
227
|
style: normalizeStyle({
|
|
228
|
-
color:
|
|
229
|
-
backgroundColor:
|
|
228
|
+
color: s(t) ? r.selectedColor : r.normalColor,
|
|
229
|
+
backgroundColor: s(t) ? r.selectedBgColor : r.normalBgColor
|
|
230
230
|
}),
|
|
231
|
-
onClick: (
|
|
231
|
+
onClick: (w) => m(t)
|
|
232
232
|
}, [
|
|
233
|
-
createElementVNode("div", _hoisted_5$
|
|
234
|
-
createElementVNode("div", _hoisted_6$
|
|
235
|
-
renderSlot(d.$slots, "default", { date:
|
|
233
|
+
createElementVNode("div", _hoisted_5$7, toDisplayString(t.day), 1),
|
|
234
|
+
createElementVNode("div", _hoisted_6$6, [
|
|
235
|
+
renderSlot(d.$slots, "default", { date: t }, void 0, !0)
|
|
236
236
|
])
|
|
237
|
-
], 14, _hoisted_4$
|
|
237
|
+
], 14, _hoisted_4$9))), 128))
|
|
238
238
|
])
|
|
239
239
|
]))
|
|
240
240
|
], 2));
|
|
241
241
|
}
|
|
242
|
-
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
242
|
+
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-2e8258eb"]]), _hoisted_1$e = { class: "image-preview" }, _hoisted_2$d = {
|
|
243
243
|
key: 0,
|
|
244
244
|
class: "counter"
|
|
245
|
-
}, _hoisted_3$
|
|
245
|
+
}, _hoisted_3$a = { class: "counter-text" }, _hoisted_4$8 = { class: "swiper-container" }, _hoisted_5$6 = ["onWheel"], _hoisted_6$5 = ["src", "onLoad"], _hoisted_7$5 = ["disabled"], _hoisted_8$3 = ["disabled"], _sfc_main$i = {
|
|
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: (r) => r.every((g) => typeof g == "string")
|
|
253
253
|
},
|
|
254
254
|
// 当前显示的图片索引
|
|
255
255
|
initialIndex: {
|
|
@@ -278,129 +278,129 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
emits: ["close", "change", "update:initialIndex"],
|
|
281
|
-
setup(
|
|
282
|
-
const
|
|
281
|
+
setup(r, { emit: g }) {
|
|
282
|
+
const i = r, e = g, o = ref(i.initialIndex), a = ref(null), c = ref(!1), l = ref(!1), u = ref(0), p = ref(0), h = ref(0), s = ref(window.innerWidth), n = ref(window.innerHeight), f = ref(i.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
|
-
}))),
|
|
290
|
-
transform: `translateX(${
|
|
291
|
-
transition:
|
|
292
|
-
})),
|
|
293
|
-
width: `${
|
|
294
|
-
height: `${
|
|
289
|
+
}))), y = ref(0), m = ref(0), d = ref(0), b = ref(0), t = ref(0), w = computed(() => ({
|
|
290
|
+
transform: `translateX(${h.value}px)`,
|
|
291
|
+
transition: c.value ? "none" : "transform 0.3s ease"
|
|
292
|
+
})), v = computed(() => ({
|
|
293
|
+
width: `${s.value}px`,
|
|
294
|
+
height: `${n.value}px`
|
|
295
295
|
}));
|
|
296
|
-
watch(() =>
|
|
297
|
-
|
|
296
|
+
watch(() => i.initialIndex, (k) => {
|
|
297
|
+
k !== o.value && (o.value = k, _());
|
|
298
298
|
}), onMounted(() => {
|
|
299
|
-
const
|
|
300
|
-
|
|
299
|
+
const k = () => {
|
|
300
|
+
s.value = window.innerWidth, n.value = window.innerHeight, _();
|
|
301
301
|
};
|
|
302
|
-
return window.addEventListener("resize",
|
|
303
|
-
window.removeEventListener("resize",
|
|
302
|
+
return window.addEventListener("resize", k), k(), () => {
|
|
303
|
+
window.removeEventListener("resize", k);
|
|
304
304
|
};
|
|
305
305
|
});
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
|
|
306
|
+
const _ = () => {
|
|
307
|
+
h.value = -o.value * s.value;
|
|
308
|
+
}, E = () => {
|
|
309
|
+
o.value > 0 && (o.value--, _(), $(), e("change", o.value), e("update:initialIndex", o.value));
|
|
310
310
|
}, S = () => {
|
|
311
|
-
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
...
|
|
311
|
+
o.value < i.images.length - 1 && (o.value++, _(), $(), e("change", o.value), e("update:initialIndex", o.value));
|
|
312
|
+
}, $ = () => {
|
|
313
|
+
f.value[o.value] = {
|
|
314
|
+
...f.value[o.value],
|
|
315
315
|
scale: 1,
|
|
316
316
|
translateX: 0,
|
|
317
317
|
translateY: 0
|
|
318
318
|
};
|
|
319
|
-
},
|
|
320
|
-
const
|
|
319
|
+
}, A = (k) => {
|
|
320
|
+
const x = f.value[k];
|
|
321
321
|
return {
|
|
322
|
-
transform: `scale(${
|
|
323
|
-
transition:
|
|
324
|
-
opacity:
|
|
322
|
+
transform: `scale(${x.scale}) translate(${x.translateX}px, ${x.translateY}px)`,
|
|
323
|
+
transition: l.value ? "none" : "transform 0.1s ease",
|
|
324
|
+
opacity: x.isLoaded ? 1 : 0
|
|
325
325
|
};
|
|
326
|
-
},
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
...
|
|
330
|
-
naturalWidth:
|
|
331
|
-
naturalHeight:
|
|
326
|
+
}, z = (k) => {
|
|
327
|
+
const x = event.target;
|
|
328
|
+
f.value[k] = {
|
|
329
|
+
...f.value[k],
|
|
330
|
+
naturalWidth: x.naturalWidth,
|
|
331
|
+
naturalHeight: x.naturalHeight,
|
|
332
332
|
isLoaded: !0
|
|
333
333
|
};
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
}, D = (
|
|
337
|
-
if (
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
...
|
|
341
|
-
translateX:
|
|
334
|
+
}, I = (k) => {
|
|
335
|
+
k.target.tagName === "IMG" ? (l.value = !0, u.value = k.clientX - f.value[o.value].translateX, p.value = k.clientY - f.value[o.value].translateY) : (c.value = !0, u.value = k.clientX - h.value), k.preventDefault();
|
|
336
|
+
}, D = (k) => {
|
|
337
|
+
if (l.value) {
|
|
338
|
+
const x = k.clientX - u.value, T = k.clientY - p.value;
|
|
339
|
+
f.value[o.value] = {
|
|
340
|
+
...f.value[o.value],
|
|
341
|
+
translateX: x,
|
|
342
342
|
translateY: T
|
|
343
343
|
};
|
|
344
|
-
} else if (
|
|
345
|
-
const
|
|
346
|
-
|
|
344
|
+
} else if (c.value && i.enableSwipe) {
|
|
345
|
+
const x = k.clientX - u.value;
|
|
346
|
+
h.value = x;
|
|
347
347
|
}
|
|
348
|
-
},
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
351
|
-
Math.abs(
|
|
348
|
+
}, B = () => {
|
|
349
|
+
if (c.value && i.enableSwipe) {
|
|
350
|
+
const k = s.value * 0.3;
|
|
351
|
+
Math.abs(h.value + o.value * s.value) > k ? h.value > 0 ? E() : S() : _();
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
},
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
const T =
|
|
361
|
-
if (Math.abs(T) > Math.abs(
|
|
362
|
-
|
|
363
|
-
else if (
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
...
|
|
368
|
-
translateX:
|
|
353
|
+
c.value = !1, l.value = !1;
|
|
354
|
+
}, N = (k) => {
|
|
355
|
+
const x = k.touches[0];
|
|
356
|
+
y.value = x.clientX, m.value = x.clientY, d.value = Date.now();
|
|
357
|
+
}, F = (k) => {
|
|
358
|
+
const x = k.touches[0];
|
|
359
|
+
b.value = x.clientX, t.value = x.clientY;
|
|
360
|
+
const T = b.value - y.value, C = t.value - m.value;
|
|
361
|
+
if (Math.abs(T) > Math.abs(C))
|
|
362
|
+
k.preventDefault(), c.value = !0, h.value = -o.value * s.value + T;
|
|
363
|
+
else if (f.value[o.value].scale > 1) {
|
|
364
|
+
k.preventDefault(), l.value = !0;
|
|
365
|
+
const M = T + f.value[o.value].translateX, L = C + f.value[o.value].translateY;
|
|
366
|
+
f.value[o.value] = {
|
|
367
|
+
...f.value[o.value],
|
|
368
|
+
translateX: M,
|
|
369
369
|
translateY: L
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
},
|
|
373
|
-
if (
|
|
374
|
-
const
|
|
375
|
-
Math.abs(
|
|
372
|
+
}, V = () => {
|
|
373
|
+
if (c.value) {
|
|
374
|
+
const k = b.value - y.value, x = Date.now() - d.value, T = s.value * 0.2, C = Math.abs(k) / x;
|
|
375
|
+
Math.abs(k) > T || C > 0.5 ? k > 0 ? E() : S() : _();
|
|
376
376
|
}
|
|
377
|
-
|
|
378
|
-
},
|
|
379
|
-
if (
|
|
380
|
-
|
|
381
|
-
const T =
|
|
382
|
-
R(
|
|
383
|
-
}, R = (
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
Math.min(
|
|
387
|
-
), L = event.target.getBoundingClientRect(),
|
|
388
|
-
|
|
389
|
-
...
|
|
390
|
-
scale:
|
|
377
|
+
c.value = !1, l.value = !1;
|
|
378
|
+
}, O = (k, x) => {
|
|
379
|
+
if (x !== o.value) return;
|
|
380
|
+
k.preventDefault();
|
|
381
|
+
const T = k.deltaY > 0 ? -0.1 : 0.1, C = k.clientX, M = k.clientY;
|
|
382
|
+
R(C, M, T);
|
|
383
|
+
}, R = (k, x, T) => {
|
|
384
|
+
const C = f.value[o.value], M = Math.max(
|
|
385
|
+
i.minScale,
|
|
386
|
+
Math.min(i.maxScale, C.scale + T)
|
|
387
|
+
), L = event.target.getBoundingClientRect(), j = k - L.left, P = x - L.top, W = M - C.scale, H = C.translateX + (j - C.translateX) * (W / C.scale), U = C.translateY + (P - C.translateY) * (W / C.scale);
|
|
388
|
+
f.value[o.value] = {
|
|
389
|
+
...C,
|
|
390
|
+
scale: M,
|
|
391
391
|
translateX: H,
|
|
392
392
|
translateY: U
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
return (
|
|
396
|
-
|
|
397
|
-
createElementVNode("span", _hoisted_3$
|
|
395
|
+
return (k, x) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
396
|
+
r.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
|
|
397
|
+
createElementVNode("span", _hoisted_3$a, toDisplayString(o.value + 1) + "/" + toDisplayString(r.images.length), 1)
|
|
398
398
|
])) : createCommentVNode("", !0),
|
|
399
|
-
|
|
399
|
+
r.showCloseBtn ? (openBlock(), createElementBlock("button", {
|
|
400
400
|
key: 1,
|
|
401
401
|
class: "close-btn",
|
|
402
|
-
onClick:
|
|
403
|
-
}, [...
|
|
402
|
+
onClick: x[0] || (x[0] = (T) => e("close"))
|
|
403
|
+
}, [...x[1] || (x[1] = [
|
|
404
404
|
createElementVNode("svg", {
|
|
405
405
|
width: "24",
|
|
406
406
|
height: "24",
|
|
@@ -423,46 +423,46 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
423
423
|
})
|
|
424
424
|
], -1)
|
|
425
425
|
])])) : createCommentVNode("", !0),
|
|
426
|
-
createElementVNode("div", _hoisted_4$
|
|
426
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
427
427
|
createElementVNode("div", {
|
|
428
428
|
class: "swiper-wrapper",
|
|
429
429
|
ref_key: "swiperWrapper",
|
|
430
|
-
ref:
|
|
431
|
-
style: normalizeStyle(
|
|
432
|
-
onTouchstart:
|
|
433
|
-
onTouchmove:
|
|
434
|
-
onTouchend:
|
|
435
|
-
onMousedown:
|
|
430
|
+
ref: a,
|
|
431
|
+
style: normalizeStyle(w.value),
|
|
432
|
+
onTouchstart: N,
|
|
433
|
+
onTouchmove: F,
|
|
434
|
+
onTouchend: V,
|
|
435
|
+
onMousedown: I,
|
|
436
436
|
onMousemove: D,
|
|
437
|
-
onMouseup:
|
|
438
|
-
onMouseleave:
|
|
437
|
+
onMouseup: B,
|
|
438
|
+
onMouseleave: B
|
|
439
439
|
}, [
|
|
440
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
441
|
-
key:
|
|
440
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.images, (T, C) => (openBlock(), createElementBlock("div", {
|
|
441
|
+
key: C,
|
|
442
442
|
class: "swiper-slide",
|
|
443
|
-
style: normalizeStyle(
|
|
443
|
+
style: normalizeStyle(v.value)
|
|
444
444
|
}, [
|
|
445
445
|
createElementVNode("div", {
|
|
446
446
|
class: "image-container",
|
|
447
|
-
onWheel: (
|
|
447
|
+
onWheel: (M) => O(M, C)
|
|
448
448
|
}, [
|
|
449
449
|
createElementVNode("img", {
|
|
450
450
|
src: T,
|
|
451
451
|
alt: "Preview image",
|
|
452
452
|
class: "preview-image",
|
|
453
|
-
style: normalizeStyle(
|
|
454
|
-
onLoad: (
|
|
453
|
+
style: normalizeStyle(A(C)),
|
|
454
|
+
onLoad: (M) => z(C),
|
|
455
455
|
loading: "lazy"
|
|
456
|
-
}, null, 44, _hoisted_6$
|
|
457
|
-
], 40, _hoisted_5$
|
|
456
|
+
}, null, 44, _hoisted_6$5)
|
|
457
|
+
], 40, _hoisted_5$6)
|
|
458
458
|
], 4))), 128))
|
|
459
459
|
], 36)
|
|
460
460
|
]),
|
|
461
461
|
createElementVNode("button", {
|
|
462
462
|
class: "nav-btn prev-btn",
|
|
463
|
-
onClick:
|
|
464
|
-
disabled:
|
|
465
|
-
}, [...
|
|
463
|
+
onClick: E,
|
|
464
|
+
disabled: o.value === 0
|
|
465
|
+
}, [...x[2] || (x[2] = [
|
|
466
466
|
createElementVNode("svg", {
|
|
467
467
|
width: "24",
|
|
468
468
|
height: "24",
|
|
@@ -473,12 +473,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
473
473
|
}, [
|
|
474
474
|
createElementVNode("polyline", { points: "15 18 9 12 15 6" })
|
|
475
475
|
], -1)
|
|
476
|
-
])], 8, _hoisted_7$
|
|
476
|
+
])], 8, _hoisted_7$5),
|
|
477
477
|
createElementVNode("button", {
|
|
478
478
|
class: "nav-btn next-btn",
|
|
479
479
|
onClick: S,
|
|
480
|
-
disabled:
|
|
481
|
-
}, [...
|
|
480
|
+
disabled: o.value === r.images.length - 1
|
|
481
|
+
}, [...x[3] || (x[3] = [
|
|
482
482
|
createElementVNode("svg", {
|
|
483
483
|
width: "24",
|
|
484
484
|
height: "24",
|
|
@@ -489,10 +489,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
489
489
|
}, [
|
|
490
490
|
createElementVNode("polyline", { points: "9 18 15 12 9 6" })
|
|
491
491
|
], -1)
|
|
492
|
-
])], 8, _hoisted_8$
|
|
492
|
+
])], 8, _hoisted_8$3)
|
|
493
493
|
]));
|
|
494
494
|
}
|
|
495
|
-
}, _sfc_main$
|
|
495
|
+
}, _sfc_main$h = {
|
|
496
496
|
__name: "hbis-auto-scroll-list",
|
|
497
497
|
props: {
|
|
498
498
|
// 列表数据数组
|
|
@@ -509,7 +509,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
509
509
|
direction: {
|
|
510
510
|
type: String,
|
|
511
511
|
default: "vertical",
|
|
512
|
-
validator: (
|
|
512
|
+
validator: (r) => ["vertical", "horizontal"].includes(r)
|
|
513
513
|
},
|
|
514
514
|
// 鼠标悬停是否暂停
|
|
515
515
|
pauseOnHover: {
|
|
@@ -553,17 +553,17 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
|
|
556
|
-
setup(
|
|
557
|
-
const
|
|
556
|
+
setup(r, { expose: g, emit: i }) {
|
|
557
|
+
const e = r, o = i, a = ref(null), c = ref(null), l = ref(!1), u = ref(null), p = ref(0), h = ref([]), s = ref(!1), n = ref(0), f = ref(0), y = ref(0), m = ref(!1), d = computed(() => ({
|
|
558
558
|
// 动态设置容器高度和宽度
|
|
559
|
-
height: typeof
|
|
560
|
-
width: typeof
|
|
559
|
+
height: typeof e.containerHeight == "number" ? `${e.containerHeight}px` : e.containerHeight,
|
|
560
|
+
width: typeof e.containerWidth == "number" ? `${e.containerWidth}px` : e.containerWidth,
|
|
561
561
|
overflow: "hidden",
|
|
562
562
|
// 隐藏超出部分
|
|
563
563
|
position: "relative"
|
|
564
564
|
// 相对定位,为绝对定位的内容容器提供参考
|
|
565
|
-
})),
|
|
566
|
-
const
|
|
565
|
+
})), b = computed(() => {
|
|
566
|
+
const k = {
|
|
567
567
|
with: "100%",
|
|
568
568
|
position: "absolute",
|
|
569
569
|
// 绝对定位,实现自由移动
|
|
@@ -572,170 +572,170 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
572
572
|
willChange: "transform"
|
|
573
573
|
// 告诉浏览器将要变化的属性,优化性能
|
|
574
574
|
};
|
|
575
|
-
return
|
|
576
|
-
}),
|
|
577
|
-
if (!
|
|
578
|
-
|
|
575
|
+
return e.direction === "vertical" ? k.transform = `translateY(${p.value}px)` : k.transform = `translateX(${p.value}px)`, k;
|
|
576
|
+
}), t = () => {
|
|
577
|
+
if (!e.data || e.data.length === 0) {
|
|
578
|
+
h.value = [];
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
|
|
582
|
-
},
|
|
583
|
-
if (
|
|
584
|
-
|
|
581
|
+
e.loop ? h.value = [...e.data, ...e.data] : h.value = [...e.data];
|
|
582
|
+
}, w = () => {
|
|
583
|
+
if (l.value || s.value) {
|
|
584
|
+
u.value = requestAnimationFrame(w);
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
-
const
|
|
588
|
-
if (!
|
|
589
|
-
|
|
587
|
+
const k = a.value, x = c.value;
|
|
588
|
+
if (!k || !x) {
|
|
589
|
+
u.value = requestAnimationFrame(w);
|
|
590
590
|
return;
|
|
591
591
|
}
|
|
592
|
-
const T =
|
|
593
|
-
if (
|
|
594
|
-
Math.abs(
|
|
592
|
+
const T = e.direction === "vertical" ? k.offsetHeight : k.offsetWidth, M = (e.direction === "vertical" ? e.itemHeight : e.itemWidth) * e.data.length;
|
|
593
|
+
if (p.value -= e.speed, e.loop)
|
|
594
|
+
Math.abs(p.value) >= M && (p.value = 0);
|
|
595
595
|
else {
|
|
596
|
-
const L = -(
|
|
597
|
-
if (
|
|
598
|
-
|
|
596
|
+
const L = -(M - T);
|
|
597
|
+
if (p.value <= L) {
|
|
598
|
+
p.value = L, l.value = !0, o("scroll", p.value);
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
},
|
|
608
|
-
|
|
602
|
+
o("scroll", p.value), u.value = requestAnimationFrame(w);
|
|
603
|
+
}, v = () => {
|
|
604
|
+
u.value && cancelAnimationFrame(u.value), u.value = requestAnimationFrame(w);
|
|
605
|
+
}, _ = () => {
|
|
606
|
+
u.value && (cancelAnimationFrame(u.value), u.value = null);
|
|
607
|
+
}, E = () => {
|
|
608
|
+
l.value = !0, o("pause");
|
|
609
609
|
}, S = () => {
|
|
610
|
-
|
|
610
|
+
l.value = !1, o("resume");
|
|
611
|
+
}, $ = () => {
|
|
612
|
+
e.pauseOnHover && E();
|
|
611
613
|
}, A = () => {
|
|
612
|
-
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
if (t.loop)
|
|
626
|
-
h.value > 0 ? h.value = 0 : Math.abs(h.value) > P && (h.value = -P);
|
|
614
|
+
e.pauseOnHover && !s.value && S();
|
|
615
|
+
}, z = (k) => {
|
|
616
|
+
s.value = !0, m.value = l.value, l.value = !0, n.value = e.direction === "vertical" ? k.clientY : k.clientX, f.value = n.value, y.value = p.value, o("dragStart"), document.addEventListener("mousemove", I), document.addEventListener("mouseup", D);
|
|
617
|
+
}, I = (k) => {
|
|
618
|
+
if (!s.value) return;
|
|
619
|
+
f.value = e.direction === "vertical" ? k.clientY : k.clientX;
|
|
620
|
+
const x = f.value - n.value;
|
|
621
|
+
p.value = y.value + x;
|
|
622
|
+
const T = a.value, C = c.value;
|
|
623
|
+
if (T && C) {
|
|
624
|
+
const M = e.direction === "vertical" ? T.offsetHeight : T.offsetWidth, j = (e.direction === "vertical" ? e.itemHeight : e.itemWidth) * e.data.length;
|
|
625
|
+
if (e.loop)
|
|
626
|
+
p.value > 0 ? p.value = 0 : Math.abs(p.value) > j && (p.value = -j);
|
|
627
627
|
else {
|
|
628
|
-
const
|
|
629
|
-
|
|
628
|
+
const P = -(j - M);
|
|
629
|
+
p.value > 0 ? p.value = 0 : p.value < P && (p.value = P);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
o("scroll", p.value);
|
|
633
633
|
}, D = () => {
|
|
634
|
-
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
},
|
|
639
|
-
if (!
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
|
|
643
|
-
const T =
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
const L =
|
|
648
|
-
if (
|
|
649
|
-
|
|
634
|
+
s.value && (s.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", D), m.value || (l.value = !1), o("dragEnd"));
|
|
635
|
+
}, B = (k) => {
|
|
636
|
+
const x = k.touches[0];
|
|
637
|
+
s.value = !0, m.value = l.value, l.value = !0, n.value = e.direction === "vertical" ? x.clientY : x.clientX, f.value = n.value, y.value = p.value, o("dragStart");
|
|
638
|
+
}, N = (k) => {
|
|
639
|
+
if (!s.value) return;
|
|
640
|
+
k.preventDefault();
|
|
641
|
+
const x = k.touches[0];
|
|
642
|
+
f.value = e.direction === "vertical" ? x.clientY : x.clientX;
|
|
643
|
+
const T = f.value - n.value;
|
|
644
|
+
p.value = y.value + T;
|
|
645
|
+
const C = a.value, M = c.value;
|
|
646
|
+
if (C && M) {
|
|
647
|
+
const L = e.direction === "vertical" ? C.offsetHeight : C.offsetWidth, P = (e.direction === "vertical" ? e.itemHeight : e.itemWidth) * e.data.length;
|
|
648
|
+
if (e.loop)
|
|
649
|
+
p.value > 0 ? p.value = 0 : Math.abs(p.value) > P && (p.value = -P);
|
|
650
650
|
else {
|
|
651
|
-
const W = -(
|
|
652
|
-
|
|
651
|
+
const W = -(P - L);
|
|
652
|
+
p.value > 0 ? p.value = 0 : p.value < W && (p.value = W);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
|
|
658
|
-
},
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
|
|
655
|
+
o("scroll", p.value);
|
|
656
|
+
}, F = () => {
|
|
657
|
+
s.value && (s.value = !1, m.value || (l.value = !1), o("dragEnd"));
|
|
658
|
+
}, V = (k) => {
|
|
659
|
+
p.value = k;
|
|
660
|
+
}, O = () => {
|
|
661
|
+
p.value = 0;
|
|
662
662
|
}, R = () => {
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
const T =
|
|
668
|
-
|
|
663
|
+
const k = a.value;
|
|
664
|
+
if (k) {
|
|
665
|
+
const x = c.value;
|
|
666
|
+
if (x) {
|
|
667
|
+
const T = e.direction === "vertical" ? x.offsetHeight : x.offsetWidth;
|
|
668
|
+
p.value = -(T - k.offsetHeight);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
return watch(() =>
|
|
673
|
-
|
|
674
|
-
}, { deep: !0 }), watch(() =>
|
|
675
|
-
|
|
672
|
+
return watch(() => e.data, () => {
|
|
673
|
+
t(), p.value = 0;
|
|
674
|
+
}, { deep: !0 }), watch(() => e.speed, () => {
|
|
675
|
+
l.value || (_(), v());
|
|
676
676
|
}), onMounted(() => {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
677
|
+
t(), nextTick(() => {
|
|
678
|
+
v();
|
|
679
|
+
const k = a.value;
|
|
680
|
+
k && (k.addEventListener("mouseenter", $), k.addEventListener("mouseleave", A));
|
|
681
681
|
});
|
|
682
682
|
}), onUnmounted(() => {
|
|
683
|
-
|
|
684
|
-
const
|
|
685
|
-
|
|
686
|
-
}),
|
|
687
|
-
pause:
|
|
683
|
+
_();
|
|
684
|
+
const k = a.value;
|
|
685
|
+
k && (k.removeEventListener("mouseenter", $), k.removeEventListener("mouseleave", A)), document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", D);
|
|
686
|
+
}), g({
|
|
687
|
+
pause: E,
|
|
688
688
|
// 暂停滚动
|
|
689
689
|
resume: S,
|
|
690
690
|
// 恢复滚动
|
|
691
|
-
scrollTo:
|
|
691
|
+
scrollTo: V,
|
|
692
692
|
// 滚动到指定位置
|
|
693
|
-
scrollToTop:
|
|
693
|
+
scrollToTop: O,
|
|
694
694
|
// 滚动到顶部
|
|
695
695
|
scrollToBottom: R,
|
|
696
696
|
// 滚动到底部
|
|
697
|
-
isPaused:
|
|
697
|
+
isPaused: l,
|
|
698
698
|
// 是否暂停(响应式)
|
|
699
|
-
isDragging:
|
|
699
|
+
isDragging: s
|
|
700
700
|
// 是否正在拖拽(响应式)
|
|
701
|
-
}), (
|
|
701
|
+
}), (k, x) => (openBlock(), createElementBlock("div", {
|
|
702
702
|
class: "hbis-auto-scroll-list",
|
|
703
703
|
ref_key: "containerRef",
|
|
704
|
-
ref:
|
|
704
|
+
ref: a,
|
|
705
705
|
style: normalizeStyle(d.value),
|
|
706
|
-
onMousedown:
|
|
707
|
-
onTouchstart:
|
|
708
|
-
onTouchmove:
|
|
709
|
-
onTouchend:
|
|
706
|
+
onMousedown: z,
|
|
707
|
+
onTouchstart: B,
|
|
708
|
+
onTouchmove: N,
|
|
709
|
+
onTouchend: F
|
|
710
710
|
}, [
|
|
711
711
|
createElementVNode("div", {
|
|
712
712
|
class: "scroll-content",
|
|
713
713
|
ref_key: "contentRef",
|
|
714
|
-
ref:
|
|
715
|
-
style: normalizeStyle(
|
|
714
|
+
ref: c,
|
|
715
|
+
style: normalizeStyle(b.value)
|
|
716
716
|
}, [
|
|
717
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
717
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (T, C) => renderSlot(k.$slots, "item", {
|
|
718
718
|
item: T,
|
|
719
|
-
index:
|
|
719
|
+
index: C
|
|
720
720
|
}, () => [
|
|
721
721
|
createElementVNode("div", {
|
|
722
722
|
class: "default-item",
|
|
723
|
-
style: normalizeStyle(
|
|
723
|
+
style: normalizeStyle(r.itemStyle)
|
|
724
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$h, [["__scopeId", "data-v-5b76d8eb"]]), _hoisted_1$d = {
|
|
730
730
|
key: 0,
|
|
731
731
|
class: "circular-spinner"
|
|
732
|
-
}, _hoisted_2$
|
|
732
|
+
}, _hoisted_2$c = {
|
|
733
733
|
key: 1,
|
|
734
734
|
class: "dots-spinner"
|
|
735
|
-
}, _hoisted_3$
|
|
735
|
+
}, _hoisted_3$9 = {
|
|
736
736
|
key: 2,
|
|
737
737
|
class: "bars-spinner"
|
|
738
|
-
}, _sfc_main$
|
|
738
|
+
}, _sfc_main$g = {
|
|
739
739
|
__name: "hbis-loading",
|
|
740
740
|
props: {
|
|
741
741
|
// 控制加载组件是否显示
|
|
@@ -770,55 +770,55 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
772
|
emits: ["update:visible", "close"],
|
|
773
|
-
setup(
|
|
774
|
-
const
|
|
775
|
-
|
|
773
|
+
setup(r, { expose: g, emit: i }) {
|
|
774
|
+
const e = r, o = i, a = () => {
|
|
775
|
+
e.touchDismiss && (o("update:visible", !1), o("close"));
|
|
776
776
|
};
|
|
777
|
-
return watch(() =>
|
|
778
|
-
|
|
777
|
+
return watch(() => e.visible, (c) => {
|
|
778
|
+
c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
779
779
|
}), onUnmounted(() => {
|
|
780
780
|
document.body.style.overflow = "";
|
|
781
|
-
}),
|
|
782
|
-
show: () =>
|
|
781
|
+
}), g({
|
|
782
|
+
show: () => o("update:visible", !0),
|
|
783
783
|
hide: () => {
|
|
784
|
-
|
|
784
|
+
o("update:visible", !1), o("close");
|
|
785
785
|
}
|
|
786
|
-
}), (
|
|
786
|
+
}), (c, l) => r.visible ? (openBlock(), createElementBlock("div", {
|
|
787
787
|
key: 0,
|
|
788
|
-
class: normalizeClass(["hbis-loading-container", { "touch-dismissible":
|
|
789
|
-
onClick:
|
|
788
|
+
class: normalizeClass(["hbis-loading-container", { "touch-dismissible": r.touchDismiss }]),
|
|
789
|
+
onClick: a
|
|
790
790
|
}, [
|
|
791
791
|
createElementVNode("div", {
|
|
792
792
|
class: "hbis-loading-wrapper",
|
|
793
|
-
onClick:
|
|
793
|
+
onClick: l[0] || (l[0] = withModifiers(() => {
|
|
794
794
|
}, ["stop"]))
|
|
795
795
|
}, [
|
|
796
|
-
renderSlot(
|
|
796
|
+
renderSlot(c.$slots, "spinner", {}, () => [
|
|
797
797
|
createElementVNode("div", {
|
|
798
|
-
class: normalizeClass(["hbis-loading-spinner",
|
|
798
|
+
class: normalizeClass(["hbis-loading-spinner", r.spinnerType])
|
|
799
799
|
}, [
|
|
800
|
-
|
|
800
|
+
r.spinnerType === "circular" ? (openBlock(), createElementBlock("div", _hoisted_1$d, [...l[1] || (l[1] = [
|
|
801
801
|
createElementVNode("div", { class: "circle" }, null, -1)
|
|
802
|
-
])])) :
|
|
802
|
+
])])) : r.spinnerType === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$c, [...l[2] || (l[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
|
+
])])) : r.spinnerType === "bars" ? (openBlock(), createElementBlock("div", _hoisted_3$9, [...l[3] || (l[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
|
+
r.text ? (openBlock(), createElementBlock("div", {
|
|
814
814
|
key: 0,
|
|
815
815
|
class: "hbis-loading-text",
|
|
816
|
-
style: normalizeStyle(
|
|
817
|
-
}, toDisplayString(
|
|
816
|
+
style: normalizeStyle(r.textStyle)
|
|
817
|
+
}, toDisplayString(r.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$g, [["__scopeId", "data-v-d5965f87"]]), _hoisted_1$c = { class: "parent-view" }, _sfc_main$f = {
|
|
822
822
|
__name: "hbis-sms-input",
|
|
823
823
|
props: {
|
|
824
824
|
/* 倒计时时间
|
|
@@ -877,56 +877,56 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
877
877
|
}
|
|
878
878
|
},
|
|
879
879
|
emits: ["custom-event"],
|
|
880
|
-
setup(
|
|
881
|
-
const
|
|
882
|
-
if (console.log("验证码isSendSMS:" +
|
|
883
|
-
console.log("请" +
|
|
880
|
+
setup(r, { expose: g, emit: i }) {
|
|
881
|
+
const e = r, o = i, a = ref(!0), c = ref(""), l = ref(e.countDownTime), u = () => {
|
|
882
|
+
if (console.log("验证码isSendSMS:" + a.value), !a.value) {
|
|
883
|
+
console.log("请" + e.countDownTime + "秒后再重试。");
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
o("custom-event");
|
|
887
887
|
};
|
|
888
|
-
return
|
|
888
|
+
return g({
|
|
889
889
|
countDown: () => {
|
|
890
|
-
|
|
891
|
-
let
|
|
892
|
-
|
|
890
|
+
l.value = e.countDownTime;
|
|
891
|
+
let h = setInterval(() => {
|
|
892
|
+
a.value = !1, l.value--, l.value === 0 && (a.value = !0, clearInterval(h));
|
|
893
893
|
}, 1e3);
|
|
894
894
|
},
|
|
895
|
-
smsCode:
|
|
896
|
-
}), (
|
|
895
|
+
smsCode: c
|
|
896
|
+
}), (h, s) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
897
897
|
createElementVNode("div", {
|
|
898
898
|
class: "input_view_sms_code",
|
|
899
|
-
style: normalizeStyle({ background:
|
|
899
|
+
style: normalizeStyle({ background: r.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":
|
|
907
|
-
style: normalizeStyle({ color:
|
|
906
|
+
"onUpdate:modelValue": s[0] || (s[0] = (n) => c.value = n),
|
|
907
|
+
style: normalizeStyle({ color: r.inputTextColor })
|
|
908
908
|
}, null, 4), [
|
|
909
|
-
[vModelText,
|
|
909
|
+
[vModelText, c.value]
|
|
910
910
|
]),
|
|
911
|
-
|
|
911
|
+
a.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
912
912
|
key: 0,
|
|
913
|
-
class: normalizeClass(["sms_code_btn", { disabled: !
|
|
914
|
-
style: normalizeStyle({ color:
|
|
915
|
-
onClick:
|
|
916
|
-
}, toDisplayString(
|
|
917
|
-
|
|
913
|
+
class: normalizeClass(["sms_code_btn", { disabled: !a.value }]),
|
|
914
|
+
style: normalizeStyle({ color: r.smsCodeBtnTextColor, background: r.smsCodeBtnColor }),
|
|
915
|
+
onClick: u
|
|
916
|
+
}, toDisplayString(l.value) + " " + toDisplayString(r.smsCodeTimeText), 7)),
|
|
917
|
+
a.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: r.smsCodeBtnTextColor, background: r.smsCodeBtnColor }),
|
|
921
|
+
onClick: u
|
|
922
|
+
}, toDisplayString(r.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$f, [["__scopeId", "data-v-3eedbbcc"]]), _hoisted_1$b = { class: "waterfall-debug" }, _hoisted_2$b = { class: "waterfall-container" }, _hoisted_3$8 = { class: "column-debug" }, _hoisted_4$7 = {
|
|
927
927
|
key: 0,
|
|
928
928
|
class: "waterfall-item-with-slot"
|
|
929
|
-
}, _hoisted_5$
|
|
929
|
+
}, _hoisted_5$5 = ["src"], _hoisted_6$4 = { class: "waterfall-content" }, _hoisted_7$4 = ["src"], _sfc_main$e = /* @__PURE__ */ Object.assign({
|
|
930
930
|
name: "HbisWaterfall"
|
|
931
931
|
}, {
|
|
932
932
|
__name: "hbis-waterfall",
|
|
@@ -944,7 +944,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
944
944
|
column: {
|
|
945
945
|
type: Number,
|
|
946
946
|
default: 2,
|
|
947
|
-
validator: (
|
|
947
|
+
validator: (r) => r >= 2
|
|
948
948
|
},
|
|
949
949
|
/**
|
|
950
950
|
* 最大列数
|
|
@@ -983,101 +983,101 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
983
983
|
}
|
|
984
984
|
},
|
|
985
985
|
emits: ["load", "error"],
|
|
986
|
-
setup(
|
|
987
|
-
const
|
|
986
|
+
setup(r, { expose: g, emit: i }) {
|
|
987
|
+
const e = useSlots(), o = ref(null), a = r, c = i;
|
|
988
988
|
useCssVars(() => ({
|
|
989
|
-
columnGap: String(
|
|
990
|
-
rowGap: String(
|
|
989
|
+
columnGap: String(a.columnGap) + "px",
|
|
990
|
+
rowGap: String(a.rowGap) + "px"
|
|
991
991
|
}));
|
|
992
|
-
const
|
|
993
|
-
console.log("开始分配数据,总数据量:",
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
const
|
|
997
|
-
for (let d = 0; d <
|
|
998
|
-
|
|
992
|
+
const l = ref([]), u = ref(2), p = computed(() => e.default !== void 0), h = (y) => (o.value && o.value.offsetWidth, Math.min(a.column, a.maxColumn), parseInt(a.columnGap), parseInt(a.rowGap), 200 + Math.floor(Math.random() * 100) + 20), s = () => {
|
|
993
|
+
console.log("开始分配数据,总数据量:", a.data.length);
|
|
994
|
+
const y = Math.min(a.column, a.maxColumn);
|
|
995
|
+
u.value = y;
|
|
996
|
+
const m = [];
|
|
997
|
+
for (let d = 0; d < y; d++)
|
|
998
|
+
m.push({
|
|
999
999
|
items: [],
|
|
1000
1000
|
height: 0
|
|
1001
1001
|
});
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
let
|
|
1005
|
-
for (let
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}), console.log("分配完成,各列数据量:",
|
|
1009
|
-
},
|
|
1010
|
-
|
|
1011
|
-
},
|
|
1012
|
-
|
|
1002
|
+
l.value = m, a.data.forEach((d, b) => {
|
|
1003
|
+
const t = h();
|
|
1004
|
+
let w = 1 / 0, v = 0;
|
|
1005
|
+
for (let _ = 0; _ < y; _++)
|
|
1006
|
+
l.value[_].height < w && (w = l.value[_].height, v = _);
|
|
1007
|
+
l.value[v].items.push(d), l.value[v].height += t, console.log("分配数据到列:", { itemIndex: b, columnIndex: v, itemHeight: t, columnHeight: l.value[v].height });
|
|
1008
|
+
}), console.log("分配完成,各列数据量:", l.value.map((d, b) => `列${b + 1}: ${d.items.length}个`)), console.log("分配完成,各列高度:", l.value.map((d, b) => `列${b + 1}: ${d.height}px`));
|
|
1009
|
+
}, n = (y) => {
|
|
1010
|
+
c("load", y);
|
|
1011
|
+
}, f = (y) => {
|
|
1012
|
+
c("error", y);
|
|
1013
1013
|
};
|
|
1014
|
-
return watch(() =>
|
|
1015
|
-
console.log("数据变化,重新分配数据"),
|
|
1016
|
-
}, { deep: !0 }), watch(() => [
|
|
1017
|
-
console.log("列数变化,更新列数"),
|
|
1018
|
-
}), watch(() => [
|
|
1019
|
-
console.log("间距变化,重新计算高度和分配数据"),
|
|
1014
|
+
return watch(() => a.data, () => {
|
|
1015
|
+
console.log("数据变化,重新分配数据"), s();
|
|
1016
|
+
}, { deep: !0 }), watch(() => [a.column, a.maxColumn], () => {
|
|
1017
|
+
console.log("列数变化,更新列数"), u.value = Math.min(a.column, a.maxColumn), s();
|
|
1018
|
+
}), watch(() => [a.columnGap, a.rowGap], () => {
|
|
1019
|
+
console.log("间距变化,重新计算高度和分配数据"), s();
|
|
1020
1020
|
}), onMounted(() => {
|
|
1021
|
-
console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:",
|
|
1021
|
+
console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:", a.data.length);
|
|
1022
1022
|
try {
|
|
1023
|
-
|
|
1024
|
-
} catch (
|
|
1025
|
-
console.error("refresh函数执行失败:",
|
|
1023
|
+
s(), console.log("===== 组件挂载完成 =====");
|
|
1024
|
+
} catch (y) {
|
|
1025
|
+
console.error("refresh函数执行失败:", y), console.log("===== 组件挂载失败 =====");
|
|
1026
1026
|
}
|
|
1027
|
-
}),
|
|
1028
|
-
refresh:
|
|
1029
|
-
}), (
|
|
1027
|
+
}), g({
|
|
1028
|
+
refresh: s
|
|
1029
|
+
}), (y, m) => (openBlock(), createElementBlock("div", {
|
|
1030
1030
|
ref_key: "waterfallRef",
|
|
1031
|
-
ref:
|
|
1031
|
+
ref: o
|
|
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(
|
|
1040
|
-
|
|
1033
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
1034
|
+
createTextVNode(" 列数: " + toDisplayString(u.value) + " ", 1),
|
|
1035
|
+
m[1] || (m[1] = createElementVNode("br", null, null, -1)),
|
|
1036
|
+
createTextVNode(" 数据总量: " + toDisplayString(r.data.length) + " ", 1),
|
|
1037
|
+
m[2] || (m[2] = createElementVNode("br", null, null, -1)),
|
|
1038
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (d, b) => (openBlock(), createElementBlock(Fragment, { key: b }, [
|
|
1039
|
+
createTextVNode(" 列" + toDisplayString(b + 1) + "数据量: " + toDisplayString(d.items.length), 1),
|
|
1040
|
+
m[0] || (m[0] = createElementVNode("br", null, null, -1))
|
|
1041
1041
|
], 64))), 128))
|
|
1042
1042
|
]),
|
|
1043
|
-
createElementVNode("div", _hoisted_2$
|
|
1044
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1045
|
-
key:
|
|
1043
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
1044
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (d, b) => (openBlock(), createElementBlock("div", {
|
|
1045
|
+
key: b,
|
|
1046
1046
|
class: "waterfall-column"
|
|
1047
1047
|
}, [
|
|
1048
|
-
createElementVNode("div", _hoisted_3$
|
|
1049
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.items, (
|
|
1050
|
-
key:
|
|
1048
|
+
createElementVNode("div", _hoisted_3$8, " 列" + toDisplayString(b + 1) + ": " + toDisplayString(d.items.length) + "个元素 ", 1),
|
|
1049
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.items, (t, w) => (openBlock(), createElementBlock("div", {
|
|
1050
|
+
key: t[r.itemKey] || `col${b}-${w}`,
|
|
1051
1051
|
class: "waterfall-item"
|
|
1052
1052
|
}, [
|
|
1053
|
-
|
|
1053
|
+
p.value ? (openBlock(), createElementBlock("div", _hoisted_4$7, [
|
|
1054
1054
|
createElementVNode("img", {
|
|
1055
|
-
src:
|
|
1055
|
+
src: t[r.imageKey],
|
|
1056
1056
|
class: "waterfall-image",
|
|
1057
|
-
style: normalizeStyle({ height:
|
|
1058
|
-
onLoad:
|
|
1059
|
-
onError:
|
|
1060
|
-
}, null, 44, _hoisted_5$
|
|
1061
|
-
createElementVNode("div", _hoisted_6$
|
|
1062
|
-
renderSlot(
|
|
1063
|
-
item:
|
|
1064
|
-
index:
|
|
1057
|
+
style: normalizeStyle({ height: h() + "px" }),
|
|
1058
|
+
onLoad: n,
|
|
1059
|
+
onError: f
|
|
1060
|
+
}, null, 44, _hoisted_5$5),
|
|
1061
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
1062
|
+
renderSlot(y.$slots, "default", {
|
|
1063
|
+
item: t,
|
|
1064
|
+
index: w
|
|
1065
1065
|
}, void 0, !0)
|
|
1066
1066
|
])
|
|
1067
1067
|
])) : (openBlock(), createElementBlock("img", {
|
|
1068
1068
|
key: 1,
|
|
1069
|
-
src:
|
|
1069
|
+
src: t[r.imageKey],
|
|
1070
1070
|
class: "waterfall-image",
|
|
1071
|
-
style: normalizeStyle({ height:
|
|
1072
|
-
onLoad:
|
|
1073
|
-
onError:
|
|
1074
|
-
}, null, 44, _hoisted_7$
|
|
1071
|
+
style: normalizeStyle({ height: h() + "px" }),
|
|
1072
|
+
onLoad: n,
|
|
1073
|
+
onError: f
|
|
1074
|
+
}, null, 44, _hoisted_7$4))
|
|
1075
1075
|
]))), 128))
|
|
1076
1076
|
]))), 128))
|
|
1077
1077
|
])
|
|
1078
1078
|
], 512));
|
|
1079
1079
|
}
|
|
1080
|
-
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1080
|
+
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-20459ccd"]]);
|
|
1081
1081
|
var svga_lite_min = { exports: {} };
|
|
1082
1082
|
/*!
|
|
1083
1083
|
* svga.lite
|
|
@@ -1088,71 +1088,71 @@ var svga_lite_min = { exports: {} };
|
|
|
1088
1088
|
* Released under the MIT License.
|
|
1089
1089
|
*/
|
|
1090
1090
|
(function(module, exports$1) {
|
|
1091
|
-
(function(
|
|
1092
|
-
module.exports =
|
|
1091
|
+
(function(r, g) {
|
|
1092
|
+
module.exports = g();
|
|
1093
1093
|
})(window, function() {
|
|
1094
|
-
return function(
|
|
1095
|
-
var
|
|
1096
|
-
function
|
|
1097
|
-
if (
|
|
1098
|
-
var
|
|
1099
|
-
return
|
|
1094
|
+
return function(r) {
|
|
1095
|
+
var g = {};
|
|
1096
|
+
function i(e) {
|
|
1097
|
+
if (g[e]) return g[e].exports;
|
|
1098
|
+
var o = g[e] = { i: e, l: !1, exports: {} };
|
|
1099
|
+
return r[e].call(o.exports, o, o.exports, i), o.l = !0, o.exports;
|
|
1100
1100
|
}
|
|
1101
|
-
return
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1104
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(
|
|
1105
|
-
},
|
|
1106
|
-
if (1 &
|
|
1107
|
-
var
|
|
1108
|
-
if (
|
|
1109
|
-
return
|
|
1110
|
-
}).bind(null,
|
|
1111
|
-
return
|
|
1112
|
-
},
|
|
1113
|
-
var
|
|
1114
|
-
return
|
|
1101
|
+
return i.m = r, i.c = g, i.d = function(e, o, a) {
|
|
1102
|
+
i.o(e, o) || Object.defineProperty(e, o, { enumerable: !0, get: a });
|
|
1103
|
+
}, i.r = function(e) {
|
|
1104
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1105
|
+
}, i.t = function(e, o) {
|
|
1106
|
+
if (1 & o && (e = i(e)), 8 & o || 4 & o && typeof e == "object" && e && e.__esModule) return e;
|
|
1107
|
+
var a = /* @__PURE__ */ Object.create(null);
|
|
1108
|
+
if (i.r(a), Object.defineProperty(a, "default", { enumerable: !0, value: e }), 2 & o && typeof e != "string") for (var c in e) i.d(a, c, (function(l) {
|
|
1109
|
+
return e[l];
|
|
1110
|
+
}).bind(null, c));
|
|
1111
|
+
return a;
|
|
1112
|
+
}, i.n = function(e) {
|
|
1113
|
+
var o = e && e.__esModule ? function() {
|
|
1114
|
+
return e.default;
|
|
1115
1115
|
} : function() {
|
|
1116
|
-
return
|
|
1116
|
+
return e;
|
|
1117
1117
|
};
|
|
1118
|
-
return
|
|
1119
|
-
},
|
|
1120
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1121
|
-
},
|
|
1122
|
-
}([function(
|
|
1123
|
-
Object.defineProperty(
|
|
1124
|
-
var
|
|
1125
|
-
this._d =
|
|
1118
|
+
return i.d(o, "a", o), o;
|
|
1119
|
+
}, i.o = function(e, o) {
|
|
1120
|
+
return Object.prototype.hasOwnProperty.call(e, o);
|
|
1121
|
+
}, i.p = "", i(i.s = 1);
|
|
1122
|
+
}([function(r, g, i) {
|
|
1123
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1124
|
+
var e = function(o, a, c) {
|
|
1125
|
+
this._d = o, this._transform = a, this._styles = c;
|
|
1126
1126
|
};
|
|
1127
|
-
|
|
1128
|
-
}, function(
|
|
1129
|
-
Object.defineProperty(
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1132
|
-
}, function(
|
|
1133
|
-
Object.defineProperty(
|
|
1134
|
-
var
|
|
1135
|
-
function
|
|
1127
|
+
g.default = e;
|
|
1128
|
+
}, function(r, g, i) {
|
|
1129
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1130
|
+
var e = i(2), o = i(3), a = i(4), c = { Downloader: e.default, Parser: o.default, Player: a.default };
|
|
1131
|
+
g.default = c;
|
|
1132
|
+
}, function(r, g, i) {
|
|
1133
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1134
|
+
var e = function() {
|
|
1135
|
+
function o() {
|
|
1136
1136
|
this.request = null;
|
|
1137
1137
|
}
|
|
1138
|
-
return
|
|
1139
|
-
var
|
|
1140
|
-
if (!
|
|
1141
|
-
return new Promise(function(
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
!
|
|
1145
|
-
},
|
|
1146
|
-
return p
|
|
1147
|
-
},
|
|
1138
|
+
return o.prototype.get = function(a) {
|
|
1139
|
+
var c = this;
|
|
1140
|
+
if (!a) throw new Error("download link undefined");
|
|
1141
|
+
return new Promise(function(l, u) {
|
|
1142
|
+
var p = new XMLHttpRequest();
|
|
1143
|
+
p.open("GET", a, !0), p.responseType = "arraybuffer", p.onloadend = function() {
|
|
1144
|
+
!p.response || p.status !== 200 && p.status !== 304 ? u(p) : l(p.response);
|
|
1145
|
+
}, p.onerror = function() {
|
|
1146
|
+
return u(p.response);
|
|
1147
|
+
}, p.send(), c.request = p;
|
|
1148
1148
|
});
|
|
1149
|
-
},
|
|
1149
|
+
}, o.prototype.cancel = function() {
|
|
1150
1150
|
this.request && this.request.abort();
|
|
1151
|
-
},
|
|
1151
|
+
}, o.prototype.destroy = function() {
|
|
1152
1152
|
this.request && this.request.abort();
|
|
1153
|
-
},
|
|
1153
|
+
}, o;
|
|
1154
1154
|
}();
|
|
1155
|
-
|
|
1155
|
+
g.default = e;
|
|
1156
1156
|
}, function(module, exports$1, __webpack_require__) {
|
|
1157
1157
|
Object.defineProperty(exports$1, "__esModule", { value: !0 });
|
|
1158
1158
|
var WORKER = `!function(t){var e={};function r(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(i,s,function(e){return t[e]}.bind(null,s));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=8)}([function(t,e,r){"use strict";var i=t.exports=r(6);i.codegen=r(16),i.toArray=function(t){if(t){for(var e=Object.keys(t),r=new Array(e.length),i=0;i<e.length;)r[i]=t[e[i++]];return r}return[]};var s=/\\\\/g,n=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(s,"\\\\\\\\").replace(n,'\\\\"')+'"]':"."+t}},function(t,e,r){"use strict";t.exports=h;var i=r(2);((h.prototype=Object.create(i.prototype)).constructor=h).className="Field";var s,n=r(3),o=r(5),a=r(0),f=/^required|optional|repeated$/;function h(t,e,r,s,n,h,l){if(a.isObject(s)?(l=n,h=s,s=n=void 0):a.isObject(n)&&(l=h,h=n,n=void 0),i.call(this,t,h),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!f.test(s=s.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==n&&!a.isString(n))throw TypeError("extend must be a string");this.rule=s&&"optional"!==s?s:void 0,this.type=r,this.id=e,this.extend=n||void 0,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}h.fromJSON=function(t,e){return new h(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},h.prototype.setOption=function(t,e,r){return"packed"===t&&(this._packed=null),i.prototype.setOption.call(this,t,e,r)},h.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof s?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof n&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof n)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof s&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},h._configure=function(t){s=t}},function(t,e,r){"use strict";var i;function s(t,e){this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}t.exports=s,s.className="ReflectionObject",s.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof i&&e._handleAdd(this)},s.prototype.resolve=function(){return this.resolved?this:(this.root instanceof i&&(this.resolved=!0),this)},s.prototype.getOption=function(t){if(this.options)return this.options[t]},s._configure=function(t){i=t}},function(t,e,r){"use strict";t.exports=s;var i=r(2);function s(t,e,r,s,n){if(i.call(this,t,r),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=s,this.comments=n||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}((s.prototype=Object.create(i.prototype)).constructor=s).className="Enum",s.fromJSON=function(t,e){var r=new s(t,e.values,e.options,e.comment,e.comments);return r.reserved=e.reserved,r}},function(t,e,r){"use strict";t.exports=h;var i=r(2);((h.prototype=Object.create(i.prototype)).constructor=h).className="Namespace";var s,n,o,a=r(1),f=r(0);function h(t,e){i.call(this,t,e),this.nested=void 0,this._nestedArray=null}h.fromJSON=function(t,e){return new h(t,e.options).addJSON(e.nested)},h.isReservedId=function(t,e){if(t)for(var r=0;r<t.length;++r)if("string"!=typeof t[r]&&t[r][0]<=e&&t[r][1]>=e)return!0;return!1},h.isReservedName=function(t,e){if(t)for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1},Object.defineProperty(h.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=f.toArray(this.nested))}}),h.prototype.addJSON=function(t){if(t)for(var e,r=Object.keys(t),i=0;i<r.length;++i)e=t[r[i]],this.add((void 0!==e.fields?s.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?n.fromJSON:void 0!==e.id?a.fromJSON:h.fromJSON)(r[i],e));return this},h.prototype.get=function(t){return this.nested&&this.nested[t]||null},h.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof s||t instanceof o||t instanceof n||t instanceof h))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof h&&t instanceof h)||e instanceof s||e instanceof n)throw Error("duplicate name '"+t.name+"' in "+this);for(var r=e.nestedArray,i=0;i<r.length;++i)t.add(r[i]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),(f=this)._nestedArray=null,f;var f},h.prototype.lookup=function(t,e,r){if("boolean"==typeof e?(r=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var i=this.get(t[0]);if(i){if(1===t.length){if(!e||e.indexOf(i.constructor)>-1)return i}else if(i instanceof h&&(i=i.lookup(t.slice(1),e,!0)))return i}else for(var s=0;s<this.nestedArray.length;++s)if(this._nestedArray[s]instanceof h&&(i=this._nestedArray[s].lookup(t,e,!0)))return i;return null===this.parent||r?null:this.parent.lookup(t,e)},h.prototype.lookupType=function(t){var e=this.lookup(t,[s]);if(!e)throw Error("no such type: "+t);return e},h.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[s,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},h._configure=function(t,e,r){s=t,n=e,o=r}},function(t,e,r){"use strict";var i=e,s=r(0),n=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var r=0,i={};for(e|=0;r<t.length;)i[n[r+e]]=t[r++];return i}i.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=o([0,0,0,1,1],7),i.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(t,e,r){"use strict";var i=e;i.float=r(14),i.utf8=r(15),i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i._configure=function(){var t=i.Buffer;t?(i._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},i._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):i._Buffer_from=i._Buffer_allocUnsafe=null}},function(t,e,r){"use strict";t.exports=s;var i=r(4);function s(t,e){i.call(this,t,e),this.methods={},this._methodsArray=null}((s.prototype=Object.create(i.prototype)).constructor=s).className="Service"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),r(9);var i,s=r(10),n=r(23),o=r(24),a=r(25),f=r(26);self.document?((i=self.SVGAParserMockWorker={}).disableWorker=!0,i.postMessage=function(t){i.onmessageCallback&&i.onmessageCallback(t)}):i=self;var h=s.Root.fromJSON(n.default).lookupType("com.opensource.svga.MovieEntity");i.onmessage=function(t){var e=new o.Zlib.Inflate(new Uint8Array(t.data)).decompress(),r=h.decode(e),s={};for(var n in r.images){var l=r.images[n],u=a.default(l);s[n]=btoa(u)}var p=new f.default(r,s);i.postMessage(p)}},function(t,e,r){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";!self.btoa&&(self.btoa=function(t){for(var e,r,s,n,o="",a=0,f=(t=String(t)).length%3;a<t.length;){if((r=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");o+=i.charAt((e=r<<16|s<<8|n)>>18&63)+i.charAt(e>>12&63)+i.charAt(e>>6&63)+i.charAt(63&e)}return f?o.slice(0,f-3)+"===".substring(f):o})},function(t,e,r){"use strict";t.exports=r(11)},function(t,e,r){"use strict";(t.exports=r(12)).build="full"},function(t,e,r){"use strict";var i=t.exports=r(13);i.build="light",i.ReflectionObject=r(2),i.Namespace=r(4),i.Root=r(17),i.Enum=r(3),i.Type=r(19),i.Field=r(1),i.Service=r(7),i.ReflectionObject._configure(i.Root),i.Namespace._configure(i.Type,i.Service,i.Enum),i.Root._configure(i.Type),i.Field._configure(i.Type)},function(t,e,r){"use strict";e.build="minimal"},function(t,e,r){"use strict";function i(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),i=128===r[3];function s(t,i,s){e[0]=t,i[s]=r[0],i[s+1]=r[1],i[s+2]=r[2],i[s+3]=r[3]}function n(t,i,s){e[0]=t,i[s]=r[3],i[s+1]=r[2],i[s+2]=r[1],i[s+3]=r[0]}function o(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],e[0]}function a(t,i){return r[3]=t[i],r[2]=t[i+1],r[1]=t[i+2],r[0]=t[i+3],e[0]}t.writeFloatLE=i?s:n,t.writeFloatBE=i?n:s,t.readFloatLE=i?o:a,t.readFloatBE=i?a:o}():function(){function e(t,e,r,i){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,r,i);else if(isNaN(e))t(2143289344,r,i);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,r,i);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,r,i);else{var n=Math.floor(Math.log(e)/Math.LN2);t((s<<31|n+127<<23|8388607&Math.round(e*Math.pow(2,-n)*8388608))>>>0,r,i)}}function r(t,e,r){var i=t(e,r),s=2*(i>>31)+1,n=i>>>23&255,o=8388607&i;return 255===n?o?NaN:s*(1/0):0===n?1401298464324817e-60*s*o:s*Math.pow(2,n-150)*(o+8388608)}t.writeFloatLE=e.bind(null,s),t.writeFloatBE=e.bind(null,n),t.readFloatLE=r.bind(null,o),t.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),i=128===r[7];function s(t,i,s){e[0]=t,i[s]=r[0],i[s+1]=r[1],i[s+2]=r[2],i[s+3]=r[3],i[s+4]=r[4],i[s+5]=r[5],i[s+6]=r[6],i[s+7]=r[7]}function n(t,i,s){e[0]=t,i[s]=r[7],i[s+1]=r[6],i[s+2]=r[5],i[s+3]=r[4],i[s+4]=r[3],i[s+5]=r[2],i[s+6]=r[1],i[s+7]=r[0]}function o(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],r[4]=t[i+4],r[5]=t[i+5],r[6]=t[i+6],r[7]=t[i+7],e[0]}function a(t,i){return r[7]=t[i],r[6]=t[i+1],r[5]=t[i+2],r[4]=t[i+3],r[3]=t[i+4],r[2]=t[i+5],r[1]=t[i+6],r[0]=t[i+7],e[0]}t.writeDoubleLE=i?s:n,t.writeDoubleBE=i?n:s,t.readDoubleLE=i?o:a,t.readDoubleBE=i?a:o}():function(){function e(t,e,r,i,s,n){var o=i<0?1:0;if(o&&(i=-i),0===i)t(0,s,n+e),t(1/i>0?0:2147483648,s,n+r);else if(isNaN(i))t(0,s,n+e),t(2146959360,s,n+r);else if(i>17976931348623157e292)t(0,s,n+e),t((o<<31|2146435072)>>>0,s,n+r);else{var a;if(i<22250738585072014e-324)t((a=i/5e-324)>>>0,s,n+e),t((o<<31|a/4294967296)>>>0,s,n+r);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(a=i*Math.pow(2,-f))>>>0,s,n+e),t((o<<31|f+1023<<20|1048576*a&1048575)>>>0,s,n+r)}}}function r(t,e,r,i,s){var n=t(i,s+e),o=t(i,s+r),a=2*(o>>31)+1,f=o>>>20&2047,h=4294967296*(1048575&o)+n;return 2047===f?h?NaN:a*(1/0):0===f?5e-324*a*h:a*Math.pow(2,f-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,s,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=r.bind(null,o,0,4),t.readDoubleBE=r.bind(null,a,4,0)}(),t}function s(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function a(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=i(i)},function(t,e,r){"use strict";var i=e;i.length=function(t){for(var e=0,r=0,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(i+1))?(++i,e+=4):e+=3;return e},i.read=function(t,e,r){if(r-e<1)return"";for(var i,s=null,n=[],o=0;e<r;)(i=t[e++])<128?n[o++]=i:i>191&&i<224?n[o++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,n[o++]=55296+(i>>10),n[o++]=56320+(1023&i)):n[o++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),o=0);return s?(o&&s.push(String.fromCharCode.apply(String,n.slice(0,o))),s.join("")):String.fromCharCode.apply(String,n.slice(0,o))},i.write=function(t,e,r){for(var i,s,n=r,o=0;o<t.length;++o)(i=t.charCodeAt(o))<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(s=t.charCodeAt(o+1)))?(i=65536+((1023&i)<<10)+(1023&s),++o,e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128);return r-n}},function(t,e,r){"use strict";function i(t,e){"string"==typeof t&&(e=t,t=void 0);var r=[];function s(t){if("string"!=typeof t){var e=n();if(i.verbose&&console.log("codegen: "+e),e="return "+e,t){for(var o=Object.keys(t),a=new Array(o.length+1),f=new Array(o.length),h=0;h<o.length;)a[h]=o[h],f[h]=t[o[h++]];return a[h]=e,Function.apply(null,a).apply(null,f)}return Function(e)()}for(var l=new Array(arguments.length-1),u=0;u<l.length;)l[u]=arguments[++u];if(u=0,t=t.replace(/%([%dfijs])/g,function(t,e){var r=l[u++];switch(e){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),u!==l.length)throw Error("parameter count mismatch");return r.push(t),s}function n(i){return"function "+(i||e||"")+"("+(t&&t.join(",")||"")+"){\\n "+r.join("\\n ")+"\\n}"}return s.toString=n,s}t.exports=i,i.verbose=!1},function(t,e,r){"use strict";t.exports=f;var i=r(4);((f.prototype=Object.create(i.prototype)).constructor=f).className="Root";var s,n=r(1),o=r(3),a=r(18);function f(t){i.call(this,"",t),this.deferred=[],this.files=[]}f.fromJSON=function(t,e){return e||(e=new f),t.options&&e.setOptions(t.options),e.addJSON(t.nested)};var h=/^[A-Z]/;function l(t,e){var r=e.parent.lookup(e.extend);if(r){var i=new n(e.fullName,e.id,e.type,e.rule,void 0,e.options);return i.declaringField=e,e.extensionField=i,r.add(i),!0}return!1}f.prototype._handleAdd=function(t){if(t instanceof n)void 0===t.extend||t.extensionField||l(0,t)||this.deferred.push(t);else if(t instanceof o)h.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof a)){if(t instanceof s)for(var e=0;e<this.deferred.length;)l(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var r=0;r<t.nestedArray.length;++r)this._handleAdd(t._nestedArray[r]);h.test(t.name)&&(t.parent[t.name]=t)}},f._configure=function(t,e,r){s=t,e,r}},function(t,e,r){"use strict";t.exports=o;var i=r(2);((o.prototype=Object.create(i.prototype)).constructor=o).className="OneOf";var s=r(1),n=r(0);function o(t,e,r,s){if(Array.isArray(e)||(r=e,e=void 0),i.call(this,t,r),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=s}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){i.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var r=t.get(this.oneof[e]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},o.prototype.onRemove=function(t){for(var e,r=0;r<this.fieldsArray.length;++r)(e=this.fieldsArray[r]).parent&&e.parent.remove(e);i.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,r){n.decorateType(e.constructor).add(new o(r,t)),Object.defineProperty(e,r,{get:n.oneOfGetter(t),set:n.oneOfSetter(t)})}}},function(t,e,r){"use strict";t.exports=u;var i=r(4);((u.prototype=Object.create(i.prototype)).constructor=u).className="Type";var s=r(3),n=r(1),o=r(20),a=r(7),f=r(21),h=r(0),l=r(22);function u(t,e){i.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(u.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=u.generateConstructor(this)())},set:function(t){t.prototype;t.$type=t.prototype.$type=this,this._ctor=t;for(var e=0;e<this.fieldsArray.length;++e)this._fieldsArray[e].resolve();var r={};for(e=0;e<this.oneofsArray.length;++e)r[this._oneofsArray[e].resolve().name]={get:h.oneOfGetter(this._oneofsArray[e].oneof),set:h.oneOfSetter(this._oneofsArray[e].oneof)};e&&Object.defineProperties(t.prototype,r)}}}),u.generateConstructor=function(t){for(var e,r=h.codegen(["p"],t.name),i=0;i<t.fieldsArray.length;++i)(e=t._fieldsArray[i]).map?r("this%s={}",h.safeProp(e.name)):e.repeated&&r("this%s=[]",h.safeProp(e.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},u.fromJSON=function(t,e){var r=new u(t,e.options);r.extensions=e.extensions,r.reserved=e.reserved;for(var f=Object.keys(e.fields),h=0;h<f.length;++h)r.add((void 0!==e.fields[f[h]].keyType?o.fromJSON:n.fromJSON)(f[h],e.fields[f[h]]));if(e.nested)for(f=Object.keys(e.nested),h=0;h<f.length;++h){var l=e.nested[f[h]];r.add((void 0!==l.id?n.fromJSON:void 0!==l.fields?u.fromJSON:void 0!==l.values?s.fromJSON:void 0!==l.methods?a.fromJSON:i.fromJSON)(f[h],l))}return e.extensions&&e.extensions.length&&(r.extensions=e.extensions),e.reserved&&e.reserved.length&&(r.reserved=e.reserved),e.group&&(r.group=!0),e.comment&&(r.comment=e.comment),r},u.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof n&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),(e=this)._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}var e;return i.prototype.add.call(this,t)},u.prototype.isReservedId=function(t){return i.isReservedId(this.reserved,t)},u.prototype.isReservedName=function(t){return i.isReservedName(this.reserved,t)},u.prototype.setup=function(){this.fullName;for(var t=[],e=0;e<this.fieldsArray.length;++e)t.push(this._fieldsArray[e].resolve().resolvedType);return this.decode=l(this)({Reader:f,types:t,util:h}),this},u.prototype.decode=function(t,e){return this.setup().decode(t,e)}},function(t,e,r){"use strict";t.exports=n;var i=r(1);((n.prototype=Object.create(i.prototype)).constructor=n).className="MapField";r(5);var s=r(0);function n(t,e,r,n,o,a){if(i.call(this,t,e,n,void 0,void 0,o,a),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options,e.comment)}},function(t,e,r){"use strict";t.exports=o;var i=r(6),s=(i.LongBits,i.utf8);function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}var a,f="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}o.create=i.Buffer?function(t){return(o.create=function(t){return i.Buffer.isBuffer(t)?new(void 0)(t):f(t)})(t)}:f,o.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,o.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return a;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return a}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return h(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|h(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw n(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this}},function(t,e,r){"use strict";t.exports=function(t){var e=n.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var r=0;r<t.fieldsArray.length;++r){var a=t._fieldsArray[r].resolve(),f=a.resolvedType instanceof i?"int32":a.type,h="m"+n.safeProp(a.name);e("case %i:",a.id),a.map?(e("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("k=r.%s()",a.keyType)("r.pos++"),void 0!==s.long[a.keyType]?void 0===s.basic[f]?e('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())',h,r):e('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,f):void 0===s.basic[f]?e("%s[k]=types[%i].decode(r,r.uint32())",h,r):e("%s[k]=r.%s()",h,f)):a.repeated?(e("if(!(%s&&%s.length))",h,h)("%s=[]",h),void 0!==s.packed[f]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,f)("}else"),void 0===s.basic[f]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",h,r):e("%s.push(r.%s())",h,f)):void 0===s.basic[f]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",h,r):e("%s=r.%s()",h,f),e("break")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<t._fieldsArray.length;++r){var l=t._fieldsArray[r];l.required&&e("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",o(l))}return e("return m")};var i=r(3),s=r(5),n=r(0);function o(t){return"missing required '"+t.name+"'"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={nested:{com:{nested:{opensource:{nested:{svga:{options:{objc_class_prefix:"SVGAProto",java_package:"com.opensource.svgaplayer"},nested:{MovieParams:{fields:{viewBoxWidth:{type:"float",id:1},viewBoxHeight:{type:"float",id:2},fps:{type:"int32",id:3},frames:{type:"int32",id:4}}},SpriteEntity:{fields:{imageKey:{type:"string",id:1},frames:{rule:"repeated",type:"FrameEntity",id:2}}},Layout:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},width:{type:"float",id:3},height:{type:"float",id:4}}},Transform:{fields:{a:{type:"float",id:1},b:{type:"float",id:2},c:{type:"float",id:3},d:{type:"float",id:4},tx:{type:"float",id:5},ty:{type:"float",id:6}}},ShapeEntity:{oneofs:{args:{oneof:["shape","rect","ellipse"]}},fields:{type:{type:"ShapeType",id:1},shape:{type:"ShapeArgs",id:2},rect:{type:"RectArgs",id:3},ellipse:{type:"EllipseArgs",id:4},styles:{type:"ShapeStyle",id:10},transform:{type:"Transform",id:11}},nested:{ShapeType:{values:{SHAPE:0,RECT:1,ELLIPSE:2,KEEP:3}},ShapeArgs:{fields:{d:{type:"string",id:1}}},RectArgs:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},width:{type:"float",id:3},height:{type:"float",id:4},cornerRadius:{type:"float",id:5}}},EllipseArgs:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},radiusX:{type:"float",id:3},radiusY:{type:"float",id:4}}},ShapeStyle:{fields:{fill:{type:"RGBAColor",id:1},stroke:{type:"RGBAColor",id:2},strokeWidth:{type:"float",id:3},lineCap:{type:"LineCap",id:4},lineJoin:{type:"LineJoin",id:5},miterLimit:{type:"float",id:6},lineDashI:{type:"float",id:7},lineDashII:{type:"float",id:8},lineDashIII:{type:"float",id:9}},nested:{RGBAColor:{fields:{r:{type:"float",id:1},g:{type:"float",id:2},b:{type:"float",id:3},a:{type:"float",id:4}}},LineCap:{values:{LineCap_BUTT:0,LineCap_ROUND:1,LineCap_SQUARE:2}},LineJoin:{values:{LineJoin_MITER:0,LineJoin_ROUND:1,LineJoin_BEVEL:2}}}}}},FrameEntity:{fields:{alpha:{type:"float",id:1},layout:{type:"Layout",id:2},transform:{type:"Transform",id:3},clipPath:{type:"string",id:4},shapes:{rule:"repeated",type:"ShapeEntity",id:5}}},MovieEntity:{fields:{version:{type:"string",id:1},params:{type:"MovieParams",id:2},images:{keyType:"string",type:"bytes",id:3},sprites:{rule:"repeated",type:"SpriteEntity",id:4}}}}}}}}}}}},function(t,e){
|
|
@@ -1162,286 +1162,286 @@ 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
|
|
1167
|
-
if (
|
|
1168
|
-
if (!
|
|
1165
|
+
return Parser.prototype.do = function(r) {
|
|
1166
|
+
var g = this, i = new Uint8Array(r, 0, 4);
|
|
1167
|
+
if (i[0] == 80 && i[1] == 75 && i[2] == 3 && i[3] == 4) throw "this parser not support version@1.x of svga.";
|
|
1168
|
+
if (!r) throw new Error("Parser Data not found");
|
|
1169
1169
|
if (!this.worker) throw new Error("Parser Worker not found");
|
|
1170
|
-
return new Promise(function(
|
|
1171
|
-
var
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1170
|
+
return new Promise(function(e, o) {
|
|
1171
|
+
var a;
|
|
1172
|
+
g.worker.disableWorker ? ((a = g.worker).onmessageCallback = function(c) {
|
|
1173
|
+
e(c);
|
|
1174
|
+
}, a.onmessage({ data: r })) : ((a = g.worker).postMessage(r), a.onmessage = function(c) {
|
|
1175
|
+
var l = c.data;
|
|
1176
|
+
e(l);
|
|
1177
1177
|
});
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Parser.prototype.destroy = function() {
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1180
|
+
var r = this.worker;
|
|
1181
|
+
r.terminate && r.terminate();
|
|
1182
1182
|
}, Parser;
|
|
1183
1183
|
}();
|
|
1184
1184
|
exports$1.default = Parser;
|
|
1185
|
-
}, function(
|
|
1186
|
-
Object.defineProperty(
|
|
1187
|
-
var
|
|
1188
|
-
(function(
|
|
1189
|
-
|
|
1190
|
-
})(
|
|
1191
|
-
|
|
1192
|
-
}(
|
|
1193
|
-
|
|
1194
|
-
}(
|
|
1195
|
-
var
|
|
1196
|
-
function
|
|
1197
|
-
if (this.videoItem =
|
|
1185
|
+
}, function(r, g, i) {
|
|
1186
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1187
|
+
var e, o, a, c = i(5), l = i(9);
|
|
1188
|
+
(function(h) {
|
|
1189
|
+
h.START = "start", h.RESUME = "resume", h.PROCESS = "process", h.PAUSE = "pause", h.STOP = "stop", h.END = "end", h.CLEAR = "clear";
|
|
1190
|
+
})(e || (e = {})), function(h) {
|
|
1191
|
+
h.FORWARDS = "forwards", h.BACKWARDS = "backwards";
|
|
1192
|
+
}(o || (o = {})), function(h) {
|
|
1193
|
+
h.FORWARDS = "forwards", h.FALLBACKS = "fallbacks";
|
|
1194
|
+
}(a || (a = {}));
|
|
1195
|
+
var u = typeof window < "u" && "IntersectionObserver" in window, p = function() {
|
|
1196
|
+
function h(s, n, f) {
|
|
1197
|
+
if (this.videoItem = n, this.loop = !0, this.fillMode = o.FORWARDS, this.playMode = a.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() {
|
|
1201
1201
|
}, stop: function() {
|
|
1202
1202
|
}, end: function() {
|
|
1203
1203
|
}, clear: function() {
|
|
1204
|
-
} }, this.container = typeof
|
|
1204
|
+
} }, this.container = typeof s == "string" ? document.body.querySelector(s) : s, !this.container) throw new Error("container undefined.");
|
|
1205
1205
|
if (!this.container.getContext) throw new Error("container should be HTMLCanvasElement.");
|
|
1206
|
-
this._renderer = new
|
|
1206
|
+
this._renderer = new c.default(this), this._animator = new l.default(), this.videoItem && this.mount(n), f && this.set(f);
|
|
1207
1207
|
}
|
|
1208
|
-
return
|
|
1209
|
-
var
|
|
1210
|
-
|
|
1211
|
-
|
|
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 =
|
|
1213
|
-
},
|
|
1214
|
-
var
|
|
1215
|
-
return new Promise(function(
|
|
1216
|
-
|
|
1208
|
+
return h.prototype.set = function(s) {
|
|
1209
|
+
var n = this;
|
|
1210
|
+
s.loop !== void 0 && (this.loop = s.loop), s.fillMode && (this.fillMode = s.fillMode), s.playMode && (this.playMode = s.playMode), s.cacheFrames !== void 0 && (this.cacheFrames = s.cacheFrames), this.startFrame = s.startFrame ? s.startFrame : this.startFrame, this.endFrame = s.endFrame ? s.endFrame : this.endFrame, s.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = s.intersectionObserverRender), u && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(f) {
|
|
1211
|
+
f[0].intersectionRatio <= 0 ? n.intersectionObserverRenderShow && (n.intersectionObserverRenderShow = !1) : !n.intersectionObserverRenderShow && (n.intersectionObserverRenderShow = !0);
|
|
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 = s.noExecutionDelay;
|
|
1213
|
+
}, h.prototype.mount = function(s) {
|
|
1214
|
+
var n = this;
|
|
1215
|
+
return new Promise(function(f, y) {
|
|
1216
|
+
n.currentFrame = 0, n.progress = 0, n.totalFramesCount = s.frames - 1, n.videoItem = s, n._renderer.prepare().then(f), n._renderer.clear(), n._setSize();
|
|
1217
1217
|
});
|
|
1218
|
-
},
|
|
1218
|
+
}, h.prototype.start = function() {
|
|
1219
1219
|
if (!this.videoItem) throw new Error("video item undefined.");
|
|
1220
1220
|
this._renderer.clear(), this._startAnimation(), this.$onEvent.start();
|
|
1221
|
-
},
|
|
1221
|
+
}, h.prototype.resume = function() {
|
|
1222
1222
|
if (!this.videoItem) throw new Error("video item undefined.");
|
|
1223
1223
|
this._startAnimation(), this.$onEvent.resume();
|
|
1224
|
-
},
|
|
1224
|
+
}, h.prototype.pause = function() {
|
|
1225
1225
|
this._animator && this._animator.stop(), this.$onEvent.pause();
|
|
1226
|
-
},
|
|
1226
|
+
}, h.prototype.stop = function() {
|
|
1227
1227
|
this._animator && this._animator.stop(), this.currentFrame = 0, this._renderer.drawFrame(this.currentFrame), this.$onEvent.stop();
|
|
1228
|
-
},
|
|
1228
|
+
}, h.prototype.clear = function() {
|
|
1229
1229
|
this._animator && this._animator.stop(), this._renderer.clear(), this.$onEvent.clear();
|
|
1230
|
-
},
|
|
1230
|
+
}, h.prototype.destroy = function() {
|
|
1231
1231
|
this._animator && this._animator.stop(), this._renderer.clear(), this._animator = null, this._renderer = null, this.videoItem = null;
|
|
1232
|
-
},
|
|
1233
|
-
var
|
|
1234
|
-
return this.$onEvent[
|
|
1235
|
-
return
|
|
1232
|
+
}, h.prototype.$on = function(s, n) {
|
|
1233
|
+
var f = this;
|
|
1234
|
+
return this.$onEvent[s] = n, s === "end" && (this._animator.onEnd = function() {
|
|
1235
|
+
return f.$onEvent.end();
|
|
1236
1236
|
}), this;
|
|
1237
|
-
},
|
|
1238
|
-
var
|
|
1239
|
-
this.currentFrame ===
|
|
1240
|
-
var
|
|
1241
|
-
d > 0 && d >
|
|
1242
|
-
|
|
1237
|
+
}, h.prototype._startAnimation = function() {
|
|
1238
|
+
var s = this, n = this, f = n.playMode, y = n.totalFramesCount, m = n.startFrame, d = n.endFrame, b = n.videoItem;
|
|
1239
|
+
this.currentFrame === y && (this.currentFrame = m || 0), this._animator.startValue = f === "fallbacks" ? d || y : m || 0, this._animator.endValue = f === "fallbacks" ? m || 0 : d || y;
|
|
1240
|
+
var t = b.frames;
|
|
1241
|
+
d > 0 && d > m ? t = d - m : d <= 0 && m > 0 && (t = b.frames - m), this._animator.duration = t * (1 / b.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(w) {
|
|
1242
|
+
w = Math.floor(w), s.currentFrame !== w && (s.currentFrame = w, s.progress = parseFloat((w + 1).toString()) / parseFloat(b.frames.toString()) * 100, s._renderer.drawFrame(s.currentFrame), s.$onEvent.process());
|
|
1243
1243
|
}, this._animator.start(this.currentFrame);
|
|
1244
|
-
},
|
|
1245
|
-
var
|
|
1246
|
-
this.container.width =
|
|
1247
|
-
},
|
|
1244
|
+
}, h.prototype._setSize = function() {
|
|
1245
|
+
var s = this.videoItem.videoSize;
|
|
1246
|
+
this.container.width = s.width, this.container.height = s.height;
|
|
1247
|
+
}, h;
|
|
1248
1248
|
}();
|
|
1249
|
-
|
|
1250
|
-
}, function(
|
|
1251
|
-
Object.defineProperty(
|
|
1252
|
-
var
|
|
1253
|
-
function
|
|
1254
|
-
this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player =
|
|
1255
|
-
var
|
|
1256
|
-
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(
|
|
1249
|
+
g.default = p;
|
|
1250
|
+
}, function(r, g, i) {
|
|
1251
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1252
|
+
var e = i(6), o = function() {
|
|
1253
|
+
function a(c) {
|
|
1254
|
+
this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = c;
|
|
1255
|
+
var l = this._player.container;
|
|
1256
|
+
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(l.width, l.height) : document.createElement("canvas");
|
|
1257
1257
|
}
|
|
1258
|
-
return
|
|
1259
|
-
var
|
|
1260
|
-
return new Promise(function(
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1263
|
-
var
|
|
1264
|
-
for (var
|
|
1265
|
-
var
|
|
1266
|
-
if (typeof
|
|
1258
|
+
return a.prototype.prepare = function() {
|
|
1259
|
+
var c = this;
|
|
1260
|
+
return new Promise(function(l, u) {
|
|
1261
|
+
if (c._bitmapCache = {}, c._player.videoItem.images && Object.keys(c._player.videoItem.images).length != 0) {
|
|
1262
|
+
c._player.videoItem.dynamicElements && (c._dynamicElements = c._player.videoItem.dynamicElements);
|
|
1263
|
+
var p = 0, h = 0;
|
|
1264
|
+
for (var s in c._player.videoItem.images) {
|
|
1265
|
+
var n = c._player.videoItem.images[s];
|
|
1266
|
+
if (typeof n != "string" || n.indexOf("iVBO") !== 0 && n.indexOf("/9j/2w") !== 0) c._bitmapCache[s] = n;
|
|
1267
1267
|
else {
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1270
|
-
|
|
1271
|
-
++
|
|
1268
|
+
p++;
|
|
1269
|
+
var f = document.createElement("img");
|
|
1270
|
+
f.src = "data:image/png;base64," + n, c._bitmapCache[s] = f, f.onload = function() {
|
|
1271
|
+
++h === p && l();
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
} else
|
|
1275
|
+
} else l();
|
|
1276
1276
|
});
|
|
1277
|
-
},
|
|
1277
|
+
}, a.prototype.clear = function() {
|
|
1278
1278
|
this._player.container.width = this._player.container.width;
|
|
1279
|
-
},
|
|
1280
|
-
var
|
|
1281
|
-
if (!
|
|
1279
|
+
}, a.prototype.drawFrame = function(c) {
|
|
1280
|
+
var l = this._player;
|
|
1281
|
+
if (!l.intersectionObserverRender || l.intersectionObserverRenderShow) {
|
|
1282
1282
|
this.clear();
|
|
1283
|
-
var
|
|
1284
|
-
if (this._player.cacheFrames && this._frames[
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1283
|
+
var u = l.container.getContext("2d");
|
|
1284
|
+
if (this._player.cacheFrames && this._frames[c]) {
|
|
1285
|
+
var p = this._frames[c];
|
|
1286
|
+
u.drawImage(p, 0, 0, p.width, p.height, 0, 0, p.width, p.height);
|
|
1287
1287
|
} else {
|
|
1288
|
-
var
|
|
1289
|
-
if (
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1292
|
-
} else this._frames[
|
|
1288
|
+
var h = this._ofsCanvas;
|
|
1289
|
+
if (h.width = this._player.container.width, h.height = this._player.container.height, e.default(h, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), u.drawImage(h, 0, 0, h.width, h.height, 0, 0, h.width, h.height), this._player.cacheFrames) if ("toDataURL" in h) {
|
|
1290
|
+
var s = h.toDataURL(), n = new Image();
|
|
1291
|
+
n.src = s, this._frames[c] = n;
|
|
1292
|
+
} else this._frames[c] = h.transferToImageBitmap();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, a;
|
|
1296
1296
|
}();
|
|
1297
|
-
|
|
1298
|
-
}, function(
|
|
1299
|
-
Object.defineProperty(
|
|
1300
|
-
var
|
|
1301
|
-
function
|
|
1302
|
-
return
|
|
1297
|
+
g.default = o;
|
|
1298
|
+
}, function(r, g, i) {
|
|
1299
|
+
Object.defineProperty(g, "__esModule", { value: !0 }), g.default = void 0;
|
|
1300
|
+
var e = c(i(0)), o = c(i(7)), a = c(i(8));
|
|
1301
|
+
function c(s) {
|
|
1302
|
+
return s && s.__esModule ? s : { default: s };
|
|
1303
1303
|
}
|
|
1304
|
-
var
|
|
1305
|
-
function
|
|
1306
|
-
var
|
|
1307
|
-
|
|
1304
|
+
var l = "MLHVCSQRZmlhvcsqrz";
|
|
1305
|
+
function u(s, n) {
|
|
1306
|
+
var f = n._styles;
|
|
1307
|
+
f !== void 0 && (f && f.stroke ? s.strokeStyle = "rgba(".concat(parseInt((255 * f.stroke[0]).toString()), ", ").concat(parseInt((255 * f.stroke[1]).toString()), ", ").concat(parseInt((255 * f.stroke[2]).toString()), ", ").concat(f.stroke[3], ")") : s.strokeStyle = "transparent", f && (s.lineWidth = f.strokeWidth || void 0, s.lineCap = f.lineCap || void 0, s.lineJoin = f.lineJoin || void 0, s.miterLimit = f.miterLimit || void 0), f && f.fill ? s.fillStyle = "rgba(".concat(parseInt((255 * f.fill[0]).toString()), ", ").concat(parseInt((255 * f.fill[1]).toString()), ", ").concat(parseInt((255 * f.fill[2]).toString()), ", ").concat(f.fill[3], ")") : s.fillStyle = "transparent", f && f.lineDash && s.setLineDash(f.lineDash));
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1312
|
-
|
|
1313
|
-
if (
|
|
1314
|
-
var
|
|
1315
|
-
if (
|
|
1316
|
-
var d =
|
|
1317
|
-
(function(
|
|
1318
|
-
switch (
|
|
1309
|
+
function p(s, n) {
|
|
1310
|
+
s.save(), u(s, n), n._transform !== void 0 && n._transform !== null && s.transform(n._transform.a || 1, n._transform.b || 0, n._transform.c || 0, n._transform.d || 1, n._transform.tx || 0, n._transform.ty || 0);
|
|
1311
|
+
var f = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
|
|
1312
|
+
s.beginPath(), n._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(y) {
|
|
1313
|
+
if (y.length != 0) {
|
|
1314
|
+
var m = y.substr(0, 1);
|
|
1315
|
+
if (l.indexOf(m) >= 0) {
|
|
1316
|
+
var d = y.substr(1).trim().split(" ");
|
|
1317
|
+
(function(b, t, w, v) {
|
|
1318
|
+
switch (w) {
|
|
1319
1319
|
case "M":
|
|
1320
|
-
|
|
1320
|
+
t.x = Number(v[0]), t.y = Number(v[1]), b.moveTo(t.x, t.y);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "m":
|
|
1323
|
-
|
|
1323
|
+
t.x += Number(v[0]), t.y += Number(v[1]), b.moveTo(t.x, t.y);
|
|
1324
1324
|
break;
|
|
1325
1325
|
case "L":
|
|
1326
|
-
|
|
1326
|
+
t.x = Number(v[0]), t.y = Number(v[1]), b.lineTo(t.x, t.y);
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "l":
|
|
1329
|
-
|
|
1329
|
+
t.x += Number(v[0]), t.y += Number(v[1]), b.lineTo(t.x, t.y);
|
|
1330
1330
|
break;
|
|
1331
1331
|
case "H":
|
|
1332
|
-
|
|
1332
|
+
t.x = Number(v[0]), b.lineTo(t.x, t.y);
|
|
1333
1333
|
break;
|
|
1334
1334
|
case "h":
|
|
1335
|
-
|
|
1335
|
+
t.x += Number(v[0]), b.lineTo(t.x, t.y);
|
|
1336
1336
|
break;
|
|
1337
1337
|
case "V":
|
|
1338
|
-
|
|
1338
|
+
t.y = Number(v[0]), b.lineTo(t.x, t.y);
|
|
1339
1339
|
break;
|
|
1340
1340
|
case "v":
|
|
1341
|
-
|
|
1341
|
+
t.y += Number(v[0]), b.lineTo(t.x, t.y);
|
|
1342
1342
|
break;
|
|
1343
1343
|
case "C":
|
|
1344
|
-
|
|
1344
|
+
t.x1 = Number(v[0]), t.y1 = Number(v[1]), t.x2 = Number(v[2]), t.y2 = Number(v[3]), t.x = Number(v[4]), t.y = Number(v[5]), b.bezierCurveTo(t.x1, t.y1, t.x2, t.y2, t.x, t.y);
|
|
1345
1345
|
break;
|
|
1346
1346
|
case "c":
|
|
1347
|
-
|
|
1347
|
+
t.x1 = t.x + Number(v[0]), t.y1 = t.y + Number(v[1]), t.x2 = t.x + Number(v[2]), t.y2 = t.y + Number(v[3]), t.x += Number(v[4]), t.y += Number(v[5]), b.bezierCurveTo(t.x1, t.y1, t.x2, t.y2, t.x, t.y);
|
|
1348
1348
|
break;
|
|
1349
1349
|
case "S":
|
|
1350
|
-
|
|
1350
|
+
t.x1 && t.y1 && t.x2 && t.y2 ? (t.x1 = t.x - t.x2 + t.x, t.y1 = t.y - t.y2 + t.y, t.x2 = Number(v[0]), t.y2 = Number(v[1]), t.x = Number(v[2]), t.y = Number(v[3]), b.bezierCurveTo(t.x1, t.y1, t.x2, t.y2, t.x, t.y)) : (t.x1 = Number(v[0]), t.y1 = Number(v[1]), t.x = Number(v[2]), t.y = Number(v[3]), b.quadraticCurveTo(t.x1, t.y1, t.x, t.y));
|
|
1351
1351
|
break;
|
|
1352
1352
|
case "s":
|
|
1353
|
-
|
|
1353
|
+
t.x1 && t.y1 && t.x2 && t.y2 ? (t.x1 = t.x - t.x2 + t.x, t.y1 = t.y - t.y2 + t.y, t.x2 = t.x + Number(v[0]), t.y2 = t.y + Number(v[1]), t.x += Number(v[2]), t.y += Number(v[3]), b.bezierCurveTo(t.x1, t.y1, t.x2, t.y2, t.x, t.y)) : (t.x1 = t.x + Number(v[0]), t.y1 = t.y + Number(v[1]), t.x += Number(v[2]), t.y += Number(v[3]), b.quadraticCurveTo(t.x1, t.y1, t.x, t.y));
|
|
1354
1354
|
break;
|
|
1355
1355
|
case "Q":
|
|
1356
|
-
|
|
1356
|
+
t.x1 = Number(v[0]), t.y1 = Number(v[1]), t.x = Number(v[2]), t.y = Number(v[3]), b.quadraticCurveTo(t.x1, t.y1, t.x, t.y);
|
|
1357
1357
|
break;
|
|
1358
1358
|
case "q":
|
|
1359
|
-
|
|
1359
|
+
t.x1 = t.x + Number(v[0]), t.y1 = t.y + Number(v[1]), t.x += Number(v[2]), t.y += Number(v[3]), b.quadraticCurveTo(t.x1, t.y1, t.x, t.y);
|
|
1360
1360
|
break;
|
|
1361
1361
|
case "A":
|
|
1362
1362
|
case "a":
|
|
1363
1363
|
break;
|
|
1364
1364
|
case "Z":
|
|
1365
1365
|
case "z":
|
|
1366
|
-
|
|
1366
|
+
b.closePath();
|
|
1367
1367
|
}
|
|
1368
|
-
})(
|
|
1368
|
+
})(s, f, m, d);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
-
}),
|
|
1371
|
+
}), n._styles && n._styles.fill ? s.fill() : n._styles && n._styles.stroke && s.stroke(), s.restore();
|
|
1372
1372
|
}
|
|
1373
|
-
var
|
|
1374
|
-
var d =
|
|
1375
|
-
return
|
|
1376
|
-
var
|
|
1377
|
-
if (!(
|
|
1378
|
-
d.save(), d.globalAlpha =
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1381
|
-
var
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
var
|
|
1386
|
-
|
|
1387
|
-
}(d, new
|
|
1388
|
-
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
}(d, new
|
|
1373
|
+
var h = function(s, n, f, y, m) {
|
|
1374
|
+
var d = s.getContext("2d");
|
|
1375
|
+
return y.sprites.forEach(function(b) {
|
|
1376
|
+
var t = b.frames[m];
|
|
1377
|
+
if (!(t.alpha < 0.05)) {
|
|
1378
|
+
d.save(), d.globalAlpha = t.alpha, d.transform(t.transform.a || 1, t.transform.b || 0, t.transform.c || 0, t.transform.d || 1, t.transform.tx || 0, t.transform.ty || 0);
|
|
1379
|
+
var w = n[b.imageKey];
|
|
1380
|
+
w && (t.maskPath !== void 0 && t.maskPath !== null && (t.maskPath._styles = void 0, p(d, t.maskPath), d.clip()), d.drawImage(w, 0, 0));
|
|
1381
|
+
var v = f[b.imageKey];
|
|
1382
|
+
v && d.drawImage(v, (t.layout.width - v.width) / 2, (t.layout.height - v.height) / 2), t.shapes && t.shapes.forEach(function(_) {
|
|
1383
|
+
_.type === "shape" && _.pathArgs && _.pathArgs.d ? p(d, new e.default(_.pathArgs.d, _.transform, _.styles)) : _.type === "ellipse" && _.pathArgs ? function(E, S) {
|
|
1384
|
+
E.save(), u(E, S), S._transform !== void 0 && S._transform !== null && E.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 $ = S._x - S._radiusX, A = S._y - S._radiusY, z = 2 * S._radiusX, I = 2 * S._radiusY, D = z / 2 * 0.5522848, B = I / 2 * 0.5522848, N = $ + z, F = A + I, V = $ + z / 2, O = A + I / 2;
|
|
1386
|
+
E.beginPath(), E.moveTo($, O), E.bezierCurveTo($, O - B, V - D, A, V, A), E.bezierCurveTo(V + D, A, N, O - B, N, O), E.bezierCurveTo(N, O + B, V + D, F, V, F), E.bezierCurveTo(V - D, F, $, O + B, $, O), S._styles && S._styles.fill ? E.fill() : S._styles && S._styles.stroke && E.stroke(), E.restore();
|
|
1387
|
+
}(d, new o.default(parseFloat(_.pathArgs.x) || 0, parseFloat(_.pathArgs.y) || 0, parseFloat(_.pathArgs.radiusX) || 0, parseFloat(_.pathArgs.radiusY) || 0, _.transform, _.styles)) : _.type === "rect" && _.pathArgs && function(E, S) {
|
|
1388
|
+
E.save(), u(E, S), S._transform !== void 0 && S._transform !== null && E.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 $ = S._x, A = S._y, z = S._width, I = S._height, D = S._cornerRadius;
|
|
1390
|
+
z < 2 * D && (D = z / 2), I < 2 * D && (D = I / 2), E.beginPath(), E.moveTo($ + D, A), E.arcTo($ + z, A, $ + z, A + I, D), E.arcTo($ + z, A + I, $, A + I, D), E.arcTo($, A + I, $, A, D), E.arcTo($, A, $ + z, A, D), E.closePath(), S._styles && S._styles.fill ? E.fill() : S._styles && S._styles.stroke && E.stroke(), E.restore();
|
|
1391
|
+
}(d, new a.default(parseFloat(_.pathArgs.x) || 0, parseFloat(_.pathArgs.y) || 0, parseFloat(_.pathArgs.width) || 0, parseFloat(_.pathArgs.height) || 0, parseFloat(_.pathArgs.cornerRadius) || 0, _.transform, _.styles));
|
|
1392
1392
|
}), d.restore();
|
|
1393
1393
|
}
|
|
1394
|
-
}),
|
|
1394
|
+
}), s;
|
|
1395
1395
|
};
|
|
1396
|
-
|
|
1397
|
-
}, function(
|
|
1398
|
-
var
|
|
1399
|
-
return (
|
|
1400
|
-
|
|
1401
|
-
} || function(
|
|
1402
|
-
for (var
|
|
1403
|
-
})(
|
|
1404
|
-
}, function(
|
|
1405
|
-
function
|
|
1406
|
-
this.constructor =
|
|
1396
|
+
g.default = h;
|
|
1397
|
+
}, function(r, g, i) {
|
|
1398
|
+
var e, o = (e = function(c, l) {
|
|
1399
|
+
return (e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, p) {
|
|
1400
|
+
u.__proto__ = p;
|
|
1401
|
+
} || function(u, p) {
|
|
1402
|
+
for (var h in p) Object.prototype.hasOwnProperty.call(p, h) && (u[h] = p[h]);
|
|
1403
|
+
})(c, l);
|
|
1404
|
+
}, function(c, l) {
|
|
1405
|
+
function u() {
|
|
1406
|
+
this.constructor = c;
|
|
1407
1407
|
}
|
|
1408
|
-
|
|
1408
|
+
e(c, l), c.prototype = l === null ? Object.create(l) : (u.prototype = l.prototype, new u());
|
|
1409
1409
|
});
|
|
1410
|
-
Object.defineProperty(
|
|
1411
|
-
var
|
|
1412
|
-
function
|
|
1413
|
-
var
|
|
1414
|
-
return
|
|
1410
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1411
|
+
var a = function(c) {
|
|
1412
|
+
function l(u, p, h, s, n, f) {
|
|
1413
|
+
var y = c.call(this) || this;
|
|
1414
|
+
return y._x = u, y._y = p, y._radiusX = h, y._radiusY = s, y._transform = n, y._styles = f, y;
|
|
1415
1415
|
}
|
|
1416
|
-
return
|
|
1417
|
-
}(
|
|
1418
|
-
|
|
1419
|
-
}, function(
|
|
1420
|
-
var
|
|
1421
|
-
return (
|
|
1422
|
-
|
|
1423
|
-
} || function(
|
|
1424
|
-
for (var
|
|
1425
|
-
})(
|
|
1426
|
-
}, function(
|
|
1427
|
-
function
|
|
1428
|
-
this.constructor =
|
|
1416
|
+
return o(l, c), l;
|
|
1417
|
+
}(i(0).default);
|
|
1418
|
+
g.default = a;
|
|
1419
|
+
}, function(r, g, i) {
|
|
1420
|
+
var e, o = (e = function(c, l) {
|
|
1421
|
+
return (e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, p) {
|
|
1422
|
+
u.__proto__ = p;
|
|
1423
|
+
} || function(u, p) {
|
|
1424
|
+
for (var h in p) Object.prototype.hasOwnProperty.call(p, h) && (u[h] = p[h]);
|
|
1425
|
+
})(c, l);
|
|
1426
|
+
}, function(c, l) {
|
|
1427
|
+
function u() {
|
|
1428
|
+
this.constructor = c;
|
|
1429
1429
|
}
|
|
1430
|
-
|
|
1430
|
+
e(c, l), c.prototype = l === null ? Object.create(l) : (u.prototype = l.prototype, new u());
|
|
1431
1431
|
});
|
|
1432
|
-
Object.defineProperty(
|
|
1433
|
-
var
|
|
1434
|
-
function
|
|
1435
|
-
var
|
|
1436
|
-
return
|
|
1432
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1433
|
+
var a = function(c) {
|
|
1434
|
+
function l(u, p, h, s, n, f, y) {
|
|
1435
|
+
var m = c.call(this) || this;
|
|
1436
|
+
return m._x = u, m._y = p, m._width = h, m._height = s, m._cornerRadius = n, m._transform = f, m._styles = y, m;
|
|
1437
1437
|
}
|
|
1438
|
-
return
|
|
1439
|
-
}(
|
|
1440
|
-
|
|
1441
|
-
}, function(
|
|
1442
|
-
Object.defineProperty(
|
|
1443
|
-
var
|
|
1444
|
-
function
|
|
1438
|
+
return o(l, c), l;
|
|
1439
|
+
}(i(0).default);
|
|
1440
|
+
g.default = a;
|
|
1441
|
+
}, function(r, g, i) {
|
|
1442
|
+
Object.defineProperty(g, "__esModule", { value: !0 });
|
|
1443
|
+
var e = function() {
|
|
1444
|
+
function o() {
|
|
1445
1445
|
this._currentTimeMillsecond = function() {
|
|
1446
1446
|
return typeof performance > "u" ? (/* @__PURE__ */ new Date()).getTime() : performance.now();
|
|
1447
1447
|
}, this.noExecutionDelay = !1, this.startValue = 0, this.endValue = 0, this.duration = 0, this.loop = 1, this.fillRule = 0, this.onStart = function() {
|
|
@@ -1449,30 +1449,30 @@ var svga_lite_min = { exports: {} };
|
|
|
1449
1449
|
}, this.onEnd = function() {
|
|
1450
1450
|
}, this._isRunning = !1, this._mStartTime = 0, this._currentFrication = 0, this._worker = null;
|
|
1451
1451
|
}
|
|
1452
|
-
return
|
|
1453
|
-
this.doStart(
|
|
1454
|
-
},
|
|
1452
|
+
return o.prototype.start = function(a) {
|
|
1453
|
+
this.doStart(a);
|
|
1454
|
+
}, o.prototype.stop = function() {
|
|
1455
1455
|
this._doStop();
|
|
1456
|
-
}, Object.defineProperty(
|
|
1456
|
+
}, Object.defineProperty(o.prototype, "animatedValue", { get: function() {
|
|
1457
1457
|
return (this.endValue - this.startValue) * this._currentFrication + this.startValue;
|
|
1458
|
-
}, enumerable: !1, configurable: !0 }),
|
|
1459
|
-
this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(),
|
|
1458
|
+
}, enumerable: !1, configurable: !0 }), o.prototype.doStart = function(a) {
|
|
1459
|
+
this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), a && (this._mStartTime -= a / (this.endValue - this.startValue) * this.duration), this._currentFrication = 0, this.noExecutionDelay && this._worker === null && (this._worker = new Worker(window.URL.createObjectURL(new Blob([`onmessage = function () {
|
|
1460
1460
|
setTimeout(function() {postMessage(null)}, 1 / 60)
|
|
1461
1461
|
}`])))), this.onStart(), this._doFrame();
|
|
1462
|
-
},
|
|
1462
|
+
}, o.prototype._doStop = function() {
|
|
1463
1463
|
this._isRunning = !1, this._worker !== null && (this._worker.terminate(), this._worker = null);
|
|
1464
|
-
},
|
|
1464
|
+
}, o.prototype._doFrame = function() {
|
|
1465
1465
|
this._isRunning && (this._doDeltaTime(this._currentTimeMillsecond() - this._mStartTime), this._isRunning && (this._worker ? (this._worker.onmessage = this._doFrame.bind(this), this._worker.postMessage(null)) : window.requestAnimationFrame(this._doFrame.bind(this))));
|
|
1466
|
-
},
|
|
1467
|
-
|
|
1468
|
-
},
|
|
1466
|
+
}, o.prototype._doDeltaTime = function(a) {
|
|
1467
|
+
a >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = a % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
|
|
1468
|
+
}, o;
|
|
1469
1469
|
}();
|
|
1470
|
-
|
|
1470
|
+
g.default = e;
|
|
1471
1471
|
}]).default;
|
|
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$d = {
|
|
1476
1476
|
__name: "hbis-svgaPlayer",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
/**
|
|
@@ -1551,67 +1551,67 @@ const _sfc_main$6 = {
|
|
|
1551
1551
|
*/
|
|
1552
1552
|
"error"
|
|
1553
1553
|
],
|
|
1554
|
-
setup(
|
|
1555
|
-
useCssVars((
|
|
1556
|
-
v5ce75b7f:
|
|
1557
|
-
v26351a8e:
|
|
1554
|
+
setup(r, { expose: g, emit: i }) {
|
|
1555
|
+
useCssVars((t) => ({
|
|
1556
|
+
v5ce75b7f: r.width,
|
|
1557
|
+
v26351a8e: r.height
|
|
1558
1558
|
}));
|
|
1559
|
-
const
|
|
1560
|
-
let
|
|
1561
|
-
const
|
|
1559
|
+
const e = r, o = i, a = ref(null), c = ref(null);
|
|
1560
|
+
let l = null, u = null, p = null;
|
|
1561
|
+
const h = async () => {
|
|
1562
1562
|
try {
|
|
1563
|
-
|
|
1564
|
-
} catch (
|
|
1565
|
-
console.error("SVGA 加载失败:",
|
|
1563
|
+
l = new svga_lite_minExports.Parser(), p = await l.load(e.src), u = new svga_lite_minExports.Player(c.value), u.loop = e.loop, u.speed = e.speed, u.onStart = () => o("play"), u.onPause = () => o("pause"), u.onEnd = () => o("ended"), u.onFrame = () => o("progress", u.progress), await u.setAnimationData(p), e.progress > 0 && (u.progress = e.progress), e.autoplay && u.start(), o("loaded");
|
|
1564
|
+
} catch (t) {
|
|
1565
|
+
console.error("SVGA 加载失败:", t), o("error", t);
|
|
1566
1566
|
}
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1567
|
+
}, s = () => {
|
|
1568
|
+
u && u.start();
|
|
1569
|
+
}, n = () => {
|
|
1570
|
+
u && u.pause();
|
|
1569
1571
|
}, f = () => {
|
|
1570
|
-
|
|
1571
|
-
},
|
|
1572
|
-
|
|
1573
|
-
},
|
|
1574
|
-
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1579
|
-
}, m = (e) => {
|
|
1580
|
-
p && (p.loop = e);
|
|
1572
|
+
u && u.stop();
|
|
1573
|
+
}, y = () => {
|
|
1574
|
+
u && (u.stop(), u.start());
|
|
1575
|
+
}, m = (t) => {
|
|
1576
|
+
u && (u.progress = t);
|
|
1577
|
+
}, d = (t) => {
|
|
1578
|
+
u && (u.speed = t);
|
|
1579
|
+
}, b = (t) => {
|
|
1580
|
+
u && (u.loop = t);
|
|
1581
1581
|
};
|
|
1582
|
-
return
|
|
1583
|
-
play:
|
|
1584
|
-
pause:
|
|
1585
|
-
stop:
|
|
1586
|
-
restart:
|
|
1587
|
-
setProgress:
|
|
1582
|
+
return g({
|
|
1583
|
+
play: s,
|
|
1584
|
+
pause: n,
|
|
1585
|
+
stop: f,
|
|
1586
|
+
restart: y,
|
|
1587
|
+
setProgress: m,
|
|
1588
1588
|
setSpeed: d,
|
|
1589
|
-
setLoop:
|
|
1590
|
-
}), watch(() =>
|
|
1591
|
-
|
|
1592
|
-
}), watch(() =>
|
|
1593
|
-
|
|
1594
|
-
}), watch(() =>
|
|
1595
|
-
d(
|
|
1596
|
-
}), watch(() =>
|
|
1597
|
-
|
|
1589
|
+
setLoop: b
|
|
1590
|
+
}), watch(() => e.src, async (t) => {
|
|
1591
|
+
t && await h();
|
|
1592
|
+
}), watch(() => e.loop, (t) => {
|
|
1593
|
+
b(t);
|
|
1594
|
+
}), watch(() => e.speed, (t) => {
|
|
1595
|
+
d(t);
|
|
1596
|
+
}), watch(() => e.progress, (t) => {
|
|
1597
|
+
m(t);
|
|
1598
1598
|
}), onMounted(async () => {
|
|
1599
|
-
await nextTick(), await
|
|
1599
|
+
await nextTick(), await h();
|
|
1600
1600
|
}), onUnmounted(() => {
|
|
1601
|
-
|
|
1602
|
-
}), (
|
|
1601
|
+
u && (u.stop(), u = null), l && (l = null), p = null;
|
|
1602
|
+
}), (t, w) => (openBlock(), createElementBlock("div", {
|
|
1603
1603
|
ref_key: "containerRef",
|
|
1604
|
-
ref:
|
|
1604
|
+
ref: a,
|
|
1605
1605
|
class: "svga-player-container"
|
|
1606
1606
|
}, [
|
|
1607
1607
|
createElementVNode("canvas", {
|
|
1608
1608
|
ref_key: "canvasRef",
|
|
1609
|
-
ref:
|
|
1609
|
+
ref: c,
|
|
1610
1610
|
class: "svga-player-canvas"
|
|
1611
1611
|
}, null, 512)
|
|
1612
1612
|
], 512));
|
|
1613
1613
|
}
|
|
1614
|
-
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1614
|
+
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-6b83dcf1"]]), _hoisted_1$a = { class: "search-dropdown" }, _hoisted_2$a = ["placeholder"], _hoisted_3$7 = ["onClick"], _hoisted_4$6 = { class: "item-text" }, _sfc_main$c = {
|
|
1615
1615
|
__name: "hbis-search-input",
|
|
1616
1616
|
props: {
|
|
1617
1617
|
list: {
|
|
@@ -1645,79 +1645,79 @@ const _sfc_main$6 = {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
},
|
|
1647
1647
|
emits: ["clearIcon", "search", "select"],
|
|
1648
|
-
setup(
|
|
1649
|
-
const
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1648
|
+
setup(r, { emit: g }) {
|
|
1649
|
+
const i = r, e = g, o = ref(i.defaultValue), a = ref(!1), c = ref(!1), l = ref([]);
|
|
1650
|
+
function u() {
|
|
1651
|
+
o.value = "", l.value = [], c.value = !1, e("clearIcon", "", []);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
if (!
|
|
1653
|
+
function p() {
|
|
1654
|
+
if (!i.enterSearch)
|
|
1655
1655
|
return;
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1658
|
-
(
|
|
1659
|
-
),
|
|
1656
|
+
const y = o.value;
|
|
1657
|
+
l.value = i.list.filter(
|
|
1658
|
+
(m) => m.label && m.label.includes(y)
|
|
1659
|
+
), c.value = l.value.length > 0, e("search", y, l.value);
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
if (
|
|
1661
|
+
function h() {
|
|
1662
|
+
if (i.enterSearch)
|
|
1663
1663
|
return;
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
(
|
|
1667
|
-
),
|
|
1664
|
+
const y = o.value;
|
|
1665
|
+
l.value = i.list.filter(
|
|
1666
|
+
(m) => m.label && m.label.includes(y)
|
|
1667
|
+
), c.value = l.value.length > 0, e("search", y, l.value);
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1671
|
-
(
|
|
1672
|
-
),
|
|
1669
|
+
function s() {
|
|
1670
|
+
i.onFocusShowList && (l.value = i.list.filter(
|
|
1671
|
+
(y) => y.label && y.label.includes(o.value)
|
|
1672
|
+
), c.value = !0), a.value = !0;
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function n() {
|
|
1675
1675
|
setTimeout(() => {
|
|
1676
|
-
|
|
1676
|
+
a.value = !1, c.value = !1;
|
|
1677
1677
|
}, 150);
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1680
|
-
|
|
1679
|
+
function f(y) {
|
|
1680
|
+
o.value = y.label, c.value = !1, e("select", y);
|
|
1681
1681
|
}
|
|
1682
1682
|
return onMounted(() => {
|
|
1683
|
-
|
|
1684
|
-
}), (
|
|
1683
|
+
i.defaultValue && (o.value = i.defaultValue);
|
|
1684
|
+
}), (y, m) => (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
1685
1685
|
createElementVNode("div", {
|
|
1686
|
-
class: normalizeClass(["input-wrapper", { focus:
|
|
1686
|
+
class: normalizeClass(["input-wrapper", { focus: a.value }])
|
|
1687
1687
|
}, [
|
|
1688
1688
|
withDirectives(createElementVNode("input", {
|
|
1689
1689
|
class: "search-input",
|
|
1690
|
-
placeholder:
|
|
1691
|
-
"onUpdate:modelValue":
|
|
1692
|
-
onInput:
|
|
1693
|
-
onFocus:
|
|
1694
|
-
onBlur:
|
|
1695
|
-
onKeyup: withKeys(
|
|
1696
|
-
}, null, 40, _hoisted_2$
|
|
1697
|
-
[vModelText,
|
|
1690
|
+
placeholder: r.placeholder,
|
|
1691
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => o.value = d),
|
|
1692
|
+
onInput: h,
|
|
1693
|
+
onFocus: s,
|
|
1694
|
+
onBlur: n,
|
|
1695
|
+
onKeyup: withKeys(p, ["enter"])
|
|
1696
|
+
}, null, 40, _hoisted_2$a), [
|
|
1697
|
+
[vModelText, o.value]
|
|
1698
1698
|
]),
|
|
1699
|
-
|
|
1699
|
+
o.value && r.showClear ? (openBlock(), createElementBlock("div", {
|
|
1700
1700
|
key: 0,
|
|
1701
1701
|
class: "clear-icon",
|
|
1702
|
-
onClick:
|
|
1702
|
+
onClick: u
|
|
1703
1703
|
}, "×")) : createCommentVNode("", !0)
|
|
1704
1704
|
], 2),
|
|
1705
|
-
|
|
1705
|
+
c.value && l.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1706
1706
|
key: 0,
|
|
1707
1707
|
class: "dropdown-list",
|
|
1708
|
-
style: normalizeStyle({ maxHeight:
|
|
1708
|
+
style: normalizeStyle({ maxHeight: r.maxHeight + "px" })
|
|
1709
1709
|
}, [
|
|
1710
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1711
|
-
key:
|
|
1710
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (d, b) => (openBlock(), createElementBlock("div", {
|
|
1711
|
+
key: b,
|
|
1712
1712
|
class: "dropdown-item",
|
|
1713
|
-
onClick: (
|
|
1713
|
+
onClick: (t) => f(d)
|
|
1714
1714
|
}, [
|
|
1715
|
-
createElementVNode("span", _hoisted_4$
|
|
1716
|
-
], 8, _hoisted_3$
|
|
1715
|
+
createElementVNode("span", _hoisted_4$6, toDisplayString(d.label), 1)
|
|
1716
|
+
], 8, _hoisted_3$7))), 128))
|
|
1717
1717
|
], 4)) : createCommentVNode("", !0)
|
|
1718
1718
|
]));
|
|
1719
1719
|
}
|
|
1720
|
-
}, _hoisted_1$
|
|
1720
|
+
}, _hoisted_1$9 = ["src", "alt"], _hoisted_2$9 = ["onClick"], _sfc_main$b = {
|
|
1721
1721
|
__name: "hbis-swiper",
|
|
1722
1722
|
props: {
|
|
1723
1723
|
data: {
|
|
@@ -1739,7 +1739,7 @@ const _sfc_main$6 = {
|
|
|
1739
1739
|
direction: {
|
|
1740
1740
|
type: String,
|
|
1741
1741
|
default: "horizontal",
|
|
1742
|
-
validator: (
|
|
1742
|
+
validator: (r) => ["horizontal", "vertical"].includes(r)
|
|
1743
1743
|
},
|
|
1744
1744
|
showIndicators: {
|
|
1745
1745
|
type: Boolean,
|
|
@@ -1748,12 +1748,12 @@ const _sfc_main$6 = {
|
|
|
1748
1748
|
indicatorType: {
|
|
1749
1749
|
type: String,
|
|
1750
1750
|
default: "dots",
|
|
1751
|
-
validator: (
|
|
1751
|
+
validator: (r) => ["dots", "numbers", "none"].includes(r)
|
|
1752
1752
|
},
|
|
1753
1753
|
indicatorPosition: {
|
|
1754
1754
|
type: String,
|
|
1755
1755
|
default: "bottom",
|
|
1756
|
-
validator: (
|
|
1756
|
+
validator: (r) => ["top", "bottom", "left", "right"].includes(r)
|
|
1757
1757
|
},
|
|
1758
1758
|
showArrows: {
|
|
1759
1759
|
type: Boolean,
|
|
@@ -1801,161 +1801,161 @@ const _sfc_main$6 = {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
},
|
|
1803
1803
|
emits: ["change", "transition-start", "transition-end"],
|
|
1804
|
-
setup(
|
|
1805
|
-
const
|
|
1804
|
+
setup(r, { expose: g, emit: i }) {
|
|
1805
|
+
const e = r, o = i, a = ref(null), c = ref(0), l = ref(!1), u = ref(!1), p = ref(0), h = ref(0), s = ref(0), n = ref(null);
|
|
1806
1806
|
ref(!1);
|
|
1807
|
-
const
|
|
1808
|
-
width: typeof
|
|
1809
|
-
height: typeof
|
|
1807
|
+
const f = computed(() => !e.loop || e.data.length <= 1 ? e.data : [e.data[e.data.length - 1], ...e.data, e.data[0]]), y = computed(() => ({
|
|
1808
|
+
width: typeof e.width == "number" ? `${e.width}px` : e.width,
|
|
1809
|
+
height: typeof e.height == "number" ? `${e.height}px` : e.height,
|
|
1810
1810
|
position: "relative",
|
|
1811
1811
|
overflow: "hidden"
|
|
1812
|
-
})),
|
|
1813
|
-
transform: `translate(${
|
|
1814
|
-
transition:
|
|
1812
|
+
})), m = computed(() => ({
|
|
1813
|
+
transform: `translate(${e.direction === "horizontal" ? `${s.value}px, 0` : `0, ${s.value}px`})`,
|
|
1814
|
+
transition: l.value ? `transform ${e.duration}ms ease` : "none",
|
|
1815
1815
|
display: "flex",
|
|
1816
|
-
flexDirection:
|
|
1817
|
-
width:
|
|
1818
|
-
height:
|
|
1816
|
+
flexDirection: e.direction === "horizontal" ? "row" : "column",
|
|
1817
|
+
width: e.direction === "horizontal" ? "100%" : "auto",
|
|
1818
|
+
height: e.direction === "horizontal" ? "100%" : "auto"
|
|
1819
1819
|
})), d = computed(() => ({
|
|
1820
|
-
width: typeof
|
|
1821
|
-
height: typeof
|
|
1820
|
+
width: typeof e.slideWidth == "number" ? `${e.slideWidth}px` : e.slideWidth,
|
|
1821
|
+
height: typeof e.slideHeight == "number" ? `${e.slideHeight}px` : e.slideHeight,
|
|
1822
1822
|
flexShrink: 0,
|
|
1823
1823
|
overflow: "hidden"
|
|
1824
|
-
})),
|
|
1825
|
-
backgroundColor:
|
|
1826
|
-
width:
|
|
1827
|
-
height: `${
|
|
1828
|
-
borderRadius:
|
|
1829
|
-
})),
|
|
1830
|
-
if (!
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1833
|
-
},
|
|
1834
|
-
|
|
1835
|
-
},
|
|
1836
|
-
|
|
1837
|
-
},
|
|
1838
|
-
|
|
1824
|
+
})), b = computed(() => ({
|
|
1825
|
+
backgroundColor: e.indicatorColor,
|
|
1826
|
+
width: e.indicatorType === "numbers" ? "24px" : `${e.indicatorSize}px`,
|
|
1827
|
+
height: `${e.indicatorSize}px`,
|
|
1828
|
+
borderRadius: e.indicatorType === "numbers" ? "4px" : "50%"
|
|
1829
|
+
})), t = computed(() => !e.loop || e.data.length <= 1 ? c.value : (c.value - 1 + e.data.length) % e.data.length), w = () => {
|
|
1830
|
+
if (!a.value) return;
|
|
1831
|
+
const B = e.direction === "horizontal" ? a.value.offsetWidth : a.value.offsetHeight;
|
|
1832
|
+
B && (s.value = -c.value * B);
|
|
1833
|
+
}, v = (B) => {
|
|
1834
|
+
l.value || u.value || B < 0 || B >= f.value.length || (l.value = !0, c.value = B, o("change", t.value));
|
|
1835
|
+
}, _ = () => {
|
|
1836
|
+
l.value || u.value || (l.value = !0, c.value++, o("change", t.value));
|
|
1837
|
+
}, E = () => {
|
|
1838
|
+
l.value || u.value || (l.value = !0, c.value--, o("change", t.value));
|
|
1839
1839
|
}, S = () => {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
}, 0)) :
|
|
1843
|
-
|
|
1840
|
+
l.value = !1, o("transition-end", t.value), e.loop && e.data.length > 1 && (c.value === 0 ? (l.value = !0, c.value = f.value.length - 2, setTimeout(() => {
|
|
1841
|
+
l.value = !1;
|
|
1842
|
+
}, 0)) : c.value === f.value.length - 1 && (l.value = !0, c.value = 1, setTimeout(() => {
|
|
1843
|
+
l.value = !1;
|
|
1844
1844
|
}, 0)));
|
|
1845
|
+
}, $ = () => {
|
|
1846
|
+
A(), e.autoplay && e.data.length > 1 && (n.value = setInterval(() => {
|
|
1847
|
+
_();
|
|
1848
|
+
}, e.interval));
|
|
1845
1849
|
}, A = () => {
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
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;
|
|
1850
|
+
n.value && (clearInterval(n.value), n.value = null);
|
|
1851
|
+
}, z = (B) => {
|
|
1852
|
+
var V, O;
|
|
1853
|
+
if (B.touches.length !== 1) return;
|
|
1854
|
+
A(), u.value = !0;
|
|
1855
|
+
const N = B.touches[0];
|
|
1856
|
+
p.value = N.clientX || N.pageX, h.value = N.clientY || N.pageY;
|
|
1857
|
+
const F = e.direction === "horizontal" ? (V = a.value) == null ? void 0 : V.offsetWidth : (O = a.value) == null ? void 0 : O.offsetHeight;
|
|
1858
|
+
s.value = -c.value * (F || 0);
|
|
1859
|
+
}, I = (B) => {
|
|
1860
|
+
var T, C;
|
|
1861
|
+
if (!u.value) return;
|
|
1862
|
+
const N = B.touches[0], F = N.clientX || N.pageX, V = N.clientY || N.pageY, O = F - p.value, R = V - h.value, k = e.direction === "horizontal" ? (T = a.value) == null ? void 0 : T.offsetWidth : (C = a.value) == null ? void 0 : C.offsetHeight, x = e.direction === "horizontal" ? O : R;
|
|
1863
|
+
s.value = -c.value * (k || 0) + x * e.touchRatio;
|
|
1864
1864
|
}, D = () => {
|
|
1865
|
-
var
|
|
1866
|
-
if (!
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1869
|
-
Math.abs(
|
|
1870
|
-
|
|
1871
|
-
},
|
|
1865
|
+
var V, O;
|
|
1866
|
+
if (!u.value) return;
|
|
1867
|
+
u.value = !1;
|
|
1868
|
+
const B = e.direction === "horizontal" ? (V = a.value) == null ? void 0 : V.offsetWidth : (O = a.value) == null ? void 0 : O.offsetHeight, N = -c.value * (B || 0), F = s.value - N;
|
|
1869
|
+
Math.abs(F) > e.threshold ? F > 0 ? E() : _() : (l.value = !0, s.value = N, setTimeout(() => {
|
|
1870
|
+
l.value = !1;
|
|
1871
|
+
}, e.duration)), $();
|
|
1872
1872
|
};
|
|
1873
|
-
return watch(() =>
|
|
1874
|
-
|
|
1875
|
-
}, { immediate: !0 }), watch(() =>
|
|
1876
|
-
|
|
1877
|
-
}), watch(
|
|
1878
|
-
|
|
1873
|
+
return watch(() => e.data, () => {
|
|
1874
|
+
c.value = e.loop ? 1 : 0, w();
|
|
1875
|
+
}, { immediate: !0 }), watch(() => e.autoplay, (B) => {
|
|
1876
|
+
B ? $() : A();
|
|
1877
|
+
}), watch(c, () => {
|
|
1878
|
+
w();
|
|
1879
1879
|
}), onMounted(() => {
|
|
1880
|
-
var
|
|
1881
|
-
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1880
|
+
var N;
|
|
1881
|
+
w(), $();
|
|
1882
|
+
const B = (N = a.value) == null ? void 0 : N.parentElement;
|
|
1883
|
+
B && (B.addEventListener("touchstart", z, { passive: !0 }), B.addEventListener("touchmove", I, { passive: !0 }), B.addEventListener("touchend", D, { passive: !0 })), window.addEventListener("resize", w);
|
|
1884
1884
|
}), onUnmounted(() => {
|
|
1885
|
-
var
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1889
|
-
}),
|
|
1890
|
-
next:
|
|
1891
|
-
prev:
|
|
1892
|
-
goToSlide:
|
|
1893
|
-
startAutoplay:
|
|
1894
|
-
stopAutoplay:
|
|
1895
|
-
}), (
|
|
1896
|
-
class: normalizeClass(["hbis-swiper", { "is-vertical":
|
|
1897
|
-
style: normalizeStyle(
|
|
1885
|
+
var N;
|
|
1886
|
+
A();
|
|
1887
|
+
const B = (N = a.value) == null ? void 0 : N.parentElement;
|
|
1888
|
+
B && (B.removeEventListener("touchstart", z), B.removeEventListener("touchmove", I), B.removeEventListener("touchend", D)), window.removeEventListener("resize", w);
|
|
1889
|
+
}), g({
|
|
1890
|
+
next: _,
|
|
1891
|
+
prev: E,
|
|
1892
|
+
goToSlide: v,
|
|
1893
|
+
startAutoplay: $,
|
|
1894
|
+
stopAutoplay: A
|
|
1895
|
+
}), (B, N) => (openBlock(), createElementBlock("div", {
|
|
1896
|
+
class: normalizeClass(["hbis-swiper", { "is-vertical": r.direction === "vertical" }]),
|
|
1897
|
+
style: normalizeStyle(y.value)
|
|
1898
1898
|
}, [
|
|
1899
1899
|
createElementVNode("div", {
|
|
1900
1900
|
class: "swiper-wrapper",
|
|
1901
1901
|
ref_key: "wrapperRef",
|
|
1902
|
-
ref:
|
|
1903
|
-
style: normalizeStyle(
|
|
1902
|
+
ref: a,
|
|
1903
|
+
style: normalizeStyle(m.value),
|
|
1904
1904
|
onTransitionend: S
|
|
1905
1905
|
}, [
|
|
1906
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1906
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (F, V) => (openBlock(), createElementBlock("div", {
|
|
1907
1907
|
class: "swiper-slide",
|
|
1908
|
-
key:
|
|
1908
|
+
key: V,
|
|
1909
1909
|
style: normalizeStyle(d.value)
|
|
1910
1910
|
}, [
|
|
1911
|
-
renderSlot(
|
|
1912
|
-
item:
|
|
1913
|
-
index:
|
|
1911
|
+
renderSlot(B.$slots, "default", {
|
|
1912
|
+
item: F,
|
|
1913
|
+
index: V
|
|
1914
1914
|
}, () => [
|
|
1915
1915
|
createElementVNode("img", {
|
|
1916
|
-
src:
|
|
1917
|
-
alt: `slide-${
|
|
1916
|
+
src: F,
|
|
1917
|
+
alt: `slide-${V}`,
|
|
1918
1918
|
class: "swiper-image"
|
|
1919
|
-
}, null, 8, _hoisted_1$
|
|
1919
|
+
}, null, 8, _hoisted_1$9)
|
|
1920
1920
|
], !0)
|
|
1921
1921
|
], 4))), 128))
|
|
1922
1922
|
], 36),
|
|
1923
|
-
|
|
1923
|
+
r.showIndicators && f.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1924
1924
|
key: 0,
|
|
1925
|
-
class: normalizeClass(["swiper-indicators",
|
|
1925
|
+
class: normalizeClass(["swiper-indicators", r.indicatorPosition])
|
|
1926
1926
|
}, [
|
|
1927
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1928
|
-
key:
|
|
1929
|
-
class: normalizeClass(["indicator", { active:
|
|
1930
|
-
style: normalizeStyle(
|
|
1931
|
-
onClick: (
|
|
1927
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (F, V) => (openBlock(), createElementBlock("span", {
|
|
1928
|
+
key: V,
|
|
1929
|
+
class: normalizeClass(["indicator", { active: c.value === V, "is-dots": r.indicatorType === "dots", "is-numbers": r.indicatorType === "numbers" }]),
|
|
1930
|
+
style: normalizeStyle(b.value),
|
|
1931
|
+
onClick: (O) => v(V)
|
|
1932
1932
|
}, [
|
|
1933
|
-
|
|
1934
|
-
createTextVNode(toDisplayString(
|
|
1933
|
+
r.indicatorType === "numbers" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1934
|
+
createTextVNode(toDisplayString(V + 1), 1)
|
|
1935
1935
|
], 64)) : createCommentVNode("", !0)
|
|
1936
|
-
], 14, _hoisted_2$
|
|
1936
|
+
], 14, _hoisted_2$9))), 128))
|
|
1937
1937
|
], 2)) : createCommentVNode("", !0),
|
|
1938
|
-
|
|
1938
|
+
r.showArrows && f.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1939
1939
|
key: 1,
|
|
1940
1940
|
class: "swiper-arrow swiper-arrow-prev",
|
|
1941
|
-
onClick:
|
|
1941
|
+
onClick: E
|
|
1942
1942
|
}, [
|
|
1943
|
-
renderSlot(
|
|
1944
|
-
|
|
1943
|
+
renderSlot(B.$slots, "arrow-prev", {}, () => [
|
|
1944
|
+
N[0] || (N[0] = createElementVNode("span", { class: "arrow-icon" }, "‹", -1))
|
|
1945
1945
|
], !0)
|
|
1946
1946
|
])) : createCommentVNode("", !0),
|
|
1947
|
-
|
|
1947
|
+
r.showArrows && f.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
1948
1948
|
key: 2,
|
|
1949
1949
|
class: "swiper-arrow swiper-arrow-next",
|
|
1950
|
-
onClick:
|
|
1950
|
+
onClick: _
|
|
1951
1951
|
}, [
|
|
1952
|
-
renderSlot(
|
|
1953
|
-
|
|
1952
|
+
renderSlot(B.$slots, "arrow-next", {}, () => [
|
|
1953
|
+
N[1] || (N[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$b, [["__scopeId", "data-v-61e2df95"]]), _hoisted_1$8 = { class: "dropdown-filter" }, _hoisted_2$8 = { class: "filter-container" }, _hoisted_3$6 = ["onClick"], _hoisted_4$5 = { class: "filter-label" }, _hoisted_5$4 = { class: "filter-value-group" }, _hoisted_6$3 = { class: "filter-value" }, _hoisted_7$3 = ["onClick"], _sfc_main$a = {
|
|
1959
1959
|
__name: "hbis-dropdown-select",
|
|
1960
1960
|
props: {
|
|
1961
1961
|
// 筛选配置项
|
|
@@ -1995,74 +1995,74 @@ const _sfc_main$6 = {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
},
|
|
1997
1997
|
emits: ["update:modelValue", "change"],
|
|
1998
|
-
setup(
|
|
1999
|
-
const
|
|
2000
|
-
|
|
2001
|
-
},
|
|
2002
|
-
const
|
|
2003
|
-
...
|
|
1998
|
+
setup(r, { emit: g }) {
|
|
1999
|
+
const i = r, e = g, o = ref(-1), a = ref(i.options), c = (h) => {
|
|
2000
|
+
o.value === h ? o.value = -1 : o.value = h;
|
|
2001
|
+
}, l = (h, s, n) => {
|
|
2002
|
+
const f = {
|
|
2003
|
+
...i.modelValue
|
|
2004
2004
|
};
|
|
2005
|
-
|
|
2006
|
-
item:
|
|
2007
|
-
option:
|
|
2008
|
-
index:
|
|
2009
|
-
}),
|
|
2010
|
-
},
|
|
2011
|
-
const
|
|
2012
|
-
if (
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2005
|
+
f[h.key] = s.value, e("update:modelValue", f), e("change", {
|
|
2006
|
+
item: h,
|
|
2007
|
+
option: s,
|
|
2008
|
+
index: n
|
|
2009
|
+
}), o.value = -1;
|
|
2010
|
+
}, u = (h) => {
|
|
2011
|
+
const s = i.modelValue[h.key];
|
|
2012
|
+
if (s !== void 0) {
|
|
2013
|
+
const n = h.options.find((f) => f.value === s);
|
|
2014
|
+
return n ? n.label : "请选择";
|
|
2015
2015
|
}
|
|
2016
2016
|
return "请选择";
|
|
2017
|
-
},
|
|
2018
|
-
return (
|
|
2019
|
-
createElementVNode("div", _hoisted_2$
|
|
2020
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2021
|
-
key:
|
|
2022
|
-
class: normalizeClass(["filter-item", { active:
|
|
2017
|
+
}, p = (h, s) => i.modelValue[h.key] === s.value;
|
|
2018
|
+
return (h, s) => (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2019
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
2020
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (n, f) => (openBlock(), createElementBlock("div", {
|
|
2021
|
+
key: f,
|
|
2022
|
+
class: normalizeClass(["filter-item", { active: o.value === f }])
|
|
2023
2023
|
}, [
|
|
2024
2024
|
createElementVNode("div", {
|
|
2025
2025
|
class: "filter-header",
|
|
2026
|
-
onClick: (
|
|
2026
|
+
onClick: (y) => c(f)
|
|
2027
2027
|
}, [
|
|
2028
|
-
createElementVNode("span", _hoisted_4$
|
|
2029
|
-
createElementVNode("div", _hoisted_5$
|
|
2030
|
-
createElementVNode("span", _hoisted_6$
|
|
2031
|
-
|
|
2028
|
+
createElementVNode("span", _hoisted_4$5, toDisplayString(n.label), 1),
|
|
2029
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
2030
|
+
createElementVNode("span", _hoisted_6$3, toDisplayString(u(n)), 1),
|
|
2031
|
+
i.showArrow ? (openBlock(), createElementBlock("div", {
|
|
2032
2032
|
key: 0,
|
|
2033
|
-
class: normalizeClass(["arrow", { up:
|
|
2033
|
+
class: normalizeClass(["arrow", { up: o.value === f }])
|
|
2034
2034
|
}, null, 2)) : createCommentVNode("", !0)
|
|
2035
2035
|
])
|
|
2036
|
-
], 8, _hoisted_3$
|
|
2037
|
-
|
|
2036
|
+
], 8, _hoisted_3$6),
|
|
2037
|
+
o.value === f ? (openBlock(), createElementBlock("div", {
|
|
2038
2038
|
key: 0,
|
|
2039
|
-
class: normalizeClass([
|
|
2040
|
-
style: normalizeStyle(
|
|
2039
|
+
class: normalizeClass([i.showScrollBar ? "dropdown-menu-show" : "dropdown-menu-hide"]),
|
|
2040
|
+
style: normalizeStyle(i.listHeight ? `height: ${i.listHeight}px;` : `height: ${n.options.length * 40}px;`)
|
|
2041
2041
|
}, [
|
|
2042
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2043
|
-
key:
|
|
2044
|
-
class: normalizeClass(["dropdown-item", { selected:
|
|
2045
|
-
onClick: (d) =>
|
|
2042
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.options, (y, m) => (openBlock(), createElementBlock("div", {
|
|
2043
|
+
key: m,
|
|
2044
|
+
class: normalizeClass(["dropdown-item", { selected: p(n, y) }]),
|
|
2045
|
+
onClick: (d) => l(n, y, f)
|
|
2046
2046
|
}, [
|
|
2047
2047
|
createElementVNode("span", {
|
|
2048
|
-
style: normalizeStyle(
|
|
2049
|
-
}, toDisplayString(
|
|
2050
|
-
], 10, _hoisted_7$
|
|
2048
|
+
style: normalizeStyle(p(n, y) ? `color: ${i.chosenColor};` : `color: ${i.unChosenColor};`)
|
|
2049
|
+
}, toDisplayString(y.label), 5)
|
|
2050
|
+
], 10, _hoisted_7$3))), 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$a, [["__scopeId", "data-v-1a98ef80"]]), _hoisted_1$7 = {
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
class: "hbis-password-input"
|
|
2059
|
-
}, _hoisted_2$
|
|
2059
|
+
}, _hoisted_2$7 = { class: "password-dialog" }, _hoisted_3$5 = { class: "password-header" }, _hoisted_4$4 = { class: "password-title" }, _hoisted_5$3 = { class: "password-body" }, _hoisted_6$2 = { class: "password-input-container" }, _hoisted_7$2 = {
|
|
2060
2060
|
key: 0,
|
|
2061
2061
|
class: "password-visible"
|
|
2062
|
-
}, _hoisted_8 = {
|
|
2062
|
+
}, _hoisted_8$2 = {
|
|
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$1 = { class: "password-keyboard" }, _hoisted_10 = ["onClick"], _hoisted_11 = { class: "password-footer" }, _sfc_main$9 = {
|
|
2066
2066
|
__name: "hbis-password-input",
|
|
2067
2067
|
props: {
|
|
2068
2068
|
/**
|
|
@@ -2129,76 +2129,76 @@ const _sfc_main$6 = {
|
|
|
2129
2129
|
*/
|
|
2130
2130
|
"confirm"
|
|
2131
2131
|
],
|
|
2132
|
-
setup(
|
|
2133
|
-
const
|
|
2134
|
-
watch(
|
|
2135
|
-
if (
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2132
|
+
setup(r, { emit: g }) {
|
|
2133
|
+
const i = r, e = g, o = ref([]), a = (h) => ["清除", "删除"].includes(h);
|
|
2134
|
+
watch(o, (h) => {
|
|
2135
|
+
if (h.length === i.maxLength) {
|
|
2136
|
+
const s = h.join("");
|
|
2137
|
+
e("complete", s);
|
|
2138
2138
|
}
|
|
2139
2139
|
}, { deep: !0 });
|
|
2140
|
-
const
|
|
2141
|
-
|
|
2142
|
-
},
|
|
2140
|
+
const c = (h) => {
|
|
2141
|
+
h === "清除" ? o.value = [] : h === "删除" ? o.value = o.value.slice(0, -1) : /^[0-9]$/.test(h) && o.value.length < i.maxLength && o.value.push(h);
|
|
2142
|
+
}, l = () => {
|
|
2143
|
+
}, u = () => {
|
|
2144
|
+
e("close"), e("update:visible", !1);
|
|
2143
2145
|
}, p = () => {
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
const l = r.value.join("");
|
|
2147
|
-
t("confirm", l);
|
|
2146
|
+
const h = o.value.join("");
|
|
2147
|
+
e("confirm", h);
|
|
2148
2148
|
};
|
|
2149
2149
|
return onMounted(() => {
|
|
2150
|
-
|
|
2151
|
-
}), watch(() =>
|
|
2152
|
-
|
|
2153
|
-
}), (
|
|
2150
|
+
o.value = [];
|
|
2151
|
+
}), watch(() => i.visible, (h) => {
|
|
2152
|
+
h && (o.value = []);
|
|
2153
|
+
}), (h, s) => r.visible ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2154
2154
|
createElementVNode("div", {
|
|
2155
2155
|
class: "password-overlay",
|
|
2156
|
-
onClick:
|
|
2156
|
+
onClick: l
|
|
2157
2157
|
}),
|
|
2158
|
-
createElementVNode("div", _hoisted_2$
|
|
2159
|
-
createElementVNode("div", _hoisted_3$
|
|
2160
|
-
createElementVNode("h3", _hoisted_4, toDisplayString(
|
|
2158
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
2159
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
2160
|
+
createElementVNode("h3", _hoisted_4$4, toDisplayString(r.title), 1),
|
|
2161
2161
|
createElementVNode("button", {
|
|
2162
2162
|
class: "password-close",
|
|
2163
|
-
onClick:
|
|
2163
|
+
onClick: u
|
|
2164
2164
|
}, "×")
|
|
2165
2165
|
]),
|
|
2166
|
-
createElementVNode("div", _hoisted_5, [
|
|
2167
|
-
createElementVNode("div", _hoisted_6, [
|
|
2168
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2169
|
-
key:
|
|
2166
|
+
createElementVNode("div", _hoisted_5$3, [
|
|
2167
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
2168
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.maxLength, (n, f) => (openBlock(), createElementBlock("div", {
|
|
2169
|
+
key: f,
|
|
2170
2170
|
class: "password-input-item"
|
|
2171
2171
|
}, [
|
|
2172
|
-
|
|
2172
|
+
r.showPassword ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString(o.value[f] || ""), 1)) : (openBlock(), createElementBlock("span", _hoisted_8$2, toDisplayString(o.value[f] ? "●" : ""), 1))
|
|
2173
2173
|
]))), 128))
|
|
2174
2174
|
]),
|
|
2175
|
-
createElementVNode("div", _hoisted_9, [
|
|
2176
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2177
|
-
key:
|
|
2175
|
+
createElementVNode("div", _hoisted_9$1, [
|
|
2176
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.keyboardLayout, (n, f) => (openBlock(), createElementBlock("div", {
|
|
2177
|
+
key: f,
|
|
2178
2178
|
class: "keyboard-row"
|
|
2179
2179
|
}, [
|
|
2180
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2181
|
-
key:
|
|
2182
|
-
class: normalizeClass(["keyboard-key", { "keyboard-key-action":
|
|
2183
|
-
onClick: (d) =>
|
|
2184
|
-
}, toDisplayString(
|
|
2180
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n, (y, m) => (openBlock(), createElementBlock("button", {
|
|
2181
|
+
key: m,
|
|
2182
|
+
class: normalizeClass(["keyboard-key", { "keyboard-key-action": a(y) }]),
|
|
2183
|
+
onClick: (d) => c(y)
|
|
2184
|
+
}, toDisplayString(y), 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: u
|
|
2192
2192
|
}, "取消"),
|
|
2193
2193
|
createElementVNode("button", {
|
|
2194
2194
|
class: "password-confirm",
|
|
2195
|
-
onClick:
|
|
2196
|
-
}, toDisplayString(
|
|
2195
|
+
onClick: p
|
|
2196
|
+
}, toDisplayString(r.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$9, [["__scopeId", "data-v-32ee9eeb"]]), _hoisted_1$6 = { class: "hbis-empty-content" }, _hoisted_2$6 = ["src"], _sfc_main$8 = {
|
|
2202
2202
|
__name: "hbis-empty",
|
|
2203
2203
|
props: {
|
|
2204
2204
|
/**
|
|
@@ -2272,38 +2272,38 @@ const _sfc_main$6 = {
|
|
|
2272
2272
|
default: () => ({})
|
|
2273
2273
|
}
|
|
2274
2274
|
},
|
|
2275
|
-
setup(
|
|
2276
|
-
const
|
|
2277
|
-
width: typeof
|
|
2278
|
-
height: typeof
|
|
2279
|
-
},
|
|
2280
|
-
color:
|
|
2281
|
-
fontSize: typeof
|
|
2275
|
+
setup(r) {
|
|
2276
|
+
const g = r, i = {
|
|
2277
|
+
width: typeof g.iconWidth == "number" ? `${g.iconWidth}px` : g.iconWidth,
|
|
2278
|
+
height: typeof g.iconHeight == "number" ? `${g.iconHeight}px` : g.iconHeight
|
|
2279
|
+
}, e = {
|
|
2280
|
+
color: g.textColor,
|
|
2281
|
+
fontSize: typeof g.textFontSize == "number" ? `${g.textFontSize}px` : g.textFontSize
|
|
2282
2282
|
};
|
|
2283
|
-
return (
|
|
2283
|
+
return (o, a) => r.visible ? (openBlock(), createElementBlock("div", {
|
|
2284
2284
|
key: 0,
|
|
2285
2285
|
class: "hbis-empty-container",
|
|
2286
|
-
style: normalizeStyle(
|
|
2286
|
+
style: normalizeStyle(r.containerStyle)
|
|
2287
2287
|
}, [
|
|
2288
|
-
renderSlot(
|
|
2289
|
-
createElementVNode("div", _hoisted_1$
|
|
2290
|
-
|
|
2288
|
+
renderSlot(o.$slots, "default", {}, () => [
|
|
2289
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
2290
|
+
r.showIcon ? (openBlock(), createElementBlock("image", {
|
|
2291
2291
|
key: 0,
|
|
2292
|
-
src:
|
|
2293
|
-
style:
|
|
2292
|
+
src: r.icon,
|
|
2293
|
+
style: i,
|
|
2294
2294
|
class: "hbis-empty-image",
|
|
2295
2295
|
mode: "aspectFit"
|
|
2296
|
-
}, null, 8, _hoisted_2$
|
|
2297
|
-
|
|
2296
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("", !0),
|
|
2297
|
+
r.showText ? (openBlock(), createElementBlock("div", {
|
|
2298
2298
|
key: 1,
|
|
2299
|
-
style:
|
|
2299
|
+
style: e,
|
|
2300
2300
|
class: "hbis-empty-text"
|
|
2301
|
-
}, toDisplayString(
|
|
2301
|
+
}, toDisplayString(r.text), 1)) : createCommentVNode("", !0)
|
|
2302
2302
|
])
|
|
2303
2303
|
], !0)
|
|
2304
2304
|
], 4)) : createCommentVNode("", !0);
|
|
2305
2305
|
}
|
|
2306
|
-
}, hbisEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2306
|
+
}, hbisEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-27a2026a"]]), _hoisted_1$5 = ["onClick"], _hoisted_2$5 = ["src"], _hoisted_3$4 = { class: "hbis-bubble-option-text" }, _sfc_main$7 = {
|
|
2307
2307
|
__name: "hbis-bubble-box",
|
|
2308
2308
|
props: {
|
|
2309
2309
|
/**
|
|
@@ -2321,7 +2321,7 @@ const _sfc_main$6 = {
|
|
|
2321
2321
|
position: {
|
|
2322
2322
|
type: String,
|
|
2323
2323
|
default: "top",
|
|
2324
|
-
validator: (
|
|
2324
|
+
validator: (r) => ["top", "bottom", "left", "right"].includes(r)
|
|
2325
2325
|
},
|
|
2326
2326
|
/**
|
|
2327
2327
|
* 气泡弹框宽度,默认单位 rpx
|
|
@@ -2388,81 +2388,1293 @@ const _sfc_main$6 = {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
},
|
|
2390
2390
|
emits: ["open", "close", "click"],
|
|
2391
|
-
setup(
|
|
2392
|
-
const
|
|
2393
|
-
const
|
|
2394
|
-
zIndex:
|
|
2395
|
-
backgroundColor:
|
|
2391
|
+
setup(r, { expose: g, emit: i }) {
|
|
2392
|
+
const e = r, o = i, a = ref(!1), c = ref(null), l = computed(() => {
|
|
2393
|
+
const m = {
|
|
2394
|
+
zIndex: e.zIndex,
|
|
2395
|
+
backgroundColor: e.bgColor
|
|
2396
2396
|
};
|
|
2397
|
-
return
|
|
2398
|
-
}),
|
|
2399
|
-
const
|
|
2400
|
-
return
|
|
2401
|
-
}),
|
|
2397
|
+
return e.width && (m.width = typeof e.width == "number" ? `${e.width}rpx` : e.width), e.minWidth && (m.minWidth = typeof e.minWidth == "number" ? `${e.minWidth}rpx` : e.minWidth), e.height && (m.height = typeof e.height == "number" ? `${e.height}rpx` : e.height), m;
|
|
2398
|
+
}), u = computed(() => {
|
|
2399
|
+
const m = {};
|
|
2400
|
+
return e.height && (m.maxHeight = typeof e.height == "number" ? `${e.height}rpx` : e.height, m.overflowY = "auto"), m;
|
|
2401
|
+
}), p = (m) => {
|
|
2402
2402
|
const d = {};
|
|
2403
|
-
return
|
|
2404
|
-
},
|
|
2405
|
-
|
|
2406
|
-
},
|
|
2407
|
-
|
|
2408
|
-
document.addEventListener("click",
|
|
2403
|
+
return m.textColor ? d.color = m.textColor : e.textColor && (d.color = e.textColor), d;
|
|
2404
|
+
}, h = () => {
|
|
2405
|
+
a.value ? n() : s();
|
|
2406
|
+
}, s = () => {
|
|
2407
|
+
a.value = !0, o("open"), setTimeout(() => {
|
|
2408
|
+
document.addEventListener("click", y);
|
|
2409
2409
|
}, 0);
|
|
2410
|
-
},
|
|
2411
|
-
|
|
2412
|
-
},
|
|
2413
|
-
d.disabled ||
|
|
2414
|
-
},
|
|
2415
|
-
|
|
2410
|
+
}, n = () => {
|
|
2411
|
+
a.value = !1, o("close"), document.removeEventListener("click", y);
|
|
2412
|
+
}, f = (m, d) => {
|
|
2413
|
+
d.disabled || e.disabled || (o("click", m), e.autoClose && n());
|
|
2414
|
+
}, y = (m) => {
|
|
2415
|
+
c.value && !c.value.contains(m.target) && n();
|
|
2416
2416
|
};
|
|
2417
2417
|
return onUnmounted(() => {
|
|
2418
|
-
document.removeEventListener("click",
|
|
2419
|
-
}),
|
|
2420
|
-
open:
|
|
2421
|
-
close:
|
|
2422
|
-
}), (
|
|
2418
|
+
document.removeEventListener("click", y);
|
|
2419
|
+
}), g({
|
|
2420
|
+
open: s,
|
|
2421
|
+
close: n
|
|
2422
|
+
}), (m, d) => (openBlock(), createElementBlock("div", {
|
|
2423
2423
|
ref_key: "bubbleRef",
|
|
2424
|
-
ref:
|
|
2424
|
+
ref: c,
|
|
2425
2425
|
class: "hbis-bubble-box"
|
|
2426
2426
|
}, [
|
|
2427
2427
|
createElementVNode("div", {
|
|
2428
2428
|
class: "hbis-bubble-trigger",
|
|
2429
|
-
onClick:
|
|
2429
|
+
onClick: h
|
|
2430
2430
|
}, [
|
|
2431
|
-
renderSlot(
|
|
2431
|
+
renderSlot(m.$slots, "default", {}, void 0, !0)
|
|
2432
2432
|
]),
|
|
2433
|
-
|
|
2433
|
+
a.value ? (openBlock(), createElementBlock("div", {
|
|
2434
2434
|
key: 0,
|
|
2435
|
-
class: normalizeClass(["hbis-bubble-popup", [`position-${
|
|
2436
|
-
style: normalizeStyle(
|
|
2435
|
+
class: normalizeClass(["hbis-bubble-popup", [`position-${r.position}`, { "auto-close": r.autoClose }]]),
|
|
2436
|
+
style: normalizeStyle(l.value),
|
|
2437
2437
|
onClick: d[0] || (d[0] = withModifiers(() => {
|
|
2438
2438
|
}, ["stop"]))
|
|
2439
2439
|
}, [
|
|
2440
2440
|
createElementVNode("div", {
|
|
2441
2441
|
class: "hbis-bubble-options",
|
|
2442
|
-
style: normalizeStyle(
|
|
2442
|
+
style: normalizeStyle(u.value)
|
|
2443
2443
|
}, [
|
|
2444
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2445
|
-
key:
|
|
2446
|
-
class: normalizeClass(["hbis-bubble-option", { disabled:
|
|
2447
|
-
style: normalizeStyle(
|
|
2448
|
-
onClick: (
|
|
2444
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.options, (b, t) => (openBlock(), createElementBlock("div", {
|
|
2445
|
+
key: t,
|
|
2446
|
+
class: normalizeClass(["hbis-bubble-option", { disabled: b.disabled || r.disabled }]),
|
|
2447
|
+
style: normalizeStyle(p(b)),
|
|
2448
|
+
onClick: (w) => f(t, b)
|
|
2449
2449
|
}, [
|
|
2450
|
-
|
|
2450
|
+
b.icon ? (openBlock(), createElementBlock("image", {
|
|
2451
2451
|
key: 0,
|
|
2452
|
-
src:
|
|
2452
|
+
src: b.icon,
|
|
2453
2453
|
class: "hbis-bubble-option-icon",
|
|
2454
2454
|
mode: "aspectFit"
|
|
2455
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", !0),
|
|
2456
|
-
createElementVNode("text", _hoisted_3, toDisplayString(
|
|
2457
|
-
], 14, _hoisted_1))), 128))
|
|
2455
|
+
}, null, 8, _hoisted_2$5)) : createCommentVNode("", !0),
|
|
2456
|
+
createElementVNode("text", _hoisted_3$4, toDisplayString(b.text), 1)
|
|
2457
|
+
], 14, _hoisted_1$5))), 128))
|
|
2458
2458
|
], 4),
|
|
2459
2459
|
createElementVNode("div", {
|
|
2460
|
-
class: normalizeClass(["hbis-bubble-arrow", `arrow-${
|
|
2460
|
+
class: normalizeClass(["hbis-bubble-arrow", `arrow-${r.position}`])
|
|
2461
2461
|
}, null, 2)
|
|
2462
2462
|
], 6)) : createCommentVNode("", !0)
|
|
2463
2463
|
], 512));
|
|
2464
2464
|
}
|
|
2465
|
-
}, hbisBubbleBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7ba99b3"]])
|
|
2465
|
+
}, hbisBubbleBox = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-f7ba99b3"]]), _hoisted_1$4 = {
|
|
2466
|
+
key: 0,
|
|
2467
|
+
class: "hbis-share-sheet-header"
|
|
2468
|
+
}, _hoisted_2$4 = {
|
|
2469
|
+
key: 0,
|
|
2470
|
+
class: "hbis-share-sheet-title"
|
|
2471
|
+
}, _hoisted_3$3 = {
|
|
2472
|
+
key: 1,
|
|
2473
|
+
class: "hbis-share-sheet-description"
|
|
2474
|
+
}, _hoisted_4$3 = { class: "hbis-share-sheet-content" }, _hoisted_5$2 = ["onClick"], _hoisted_6$1 = ["src"], _hoisted_7$1 = {
|
|
2475
|
+
key: 1,
|
|
2476
|
+
class: "hbis-share-sheet-item-icon-text"
|
|
2477
|
+
}, _hoisted_8$1 = { class: "hbis-share-sheet-footer" }, _sfc_main$6 = {
|
|
2478
|
+
__name: "hbis-share-sheet",
|
|
2479
|
+
props: {
|
|
2480
|
+
/**
|
|
2481
|
+
* 控制显示/隐藏
|
|
2482
|
+
*/
|
|
2483
|
+
visible: {
|
|
2484
|
+
type: Boolean,
|
|
2485
|
+
default: !1
|
|
2486
|
+
},
|
|
2487
|
+
/**
|
|
2488
|
+
* 分享项列表(支持一维数组或二维数组)
|
|
2489
|
+
* @type {ShareSheetItem[] | ShareSheetItem[][]}
|
|
2490
|
+
*/
|
|
2491
|
+
itemList: {
|
|
2492
|
+
type: Array,
|
|
2493
|
+
default: () => []
|
|
2494
|
+
},
|
|
2495
|
+
/**
|
|
2496
|
+
* 标题
|
|
2497
|
+
*/
|
|
2498
|
+
title: {
|
|
2499
|
+
type: String,
|
|
2500
|
+
default: ""
|
|
2501
|
+
},
|
|
2502
|
+
/**
|
|
2503
|
+
* 描述
|
|
2504
|
+
*/
|
|
2505
|
+
description: {
|
|
2506
|
+
type: String,
|
|
2507
|
+
default: ""
|
|
2508
|
+
},
|
|
2509
|
+
/**
|
|
2510
|
+
* 取消按钮文字
|
|
2511
|
+
*/
|
|
2512
|
+
cancel: {
|
|
2513
|
+
type: String,
|
|
2514
|
+
default: "取消"
|
|
2515
|
+
},
|
|
2516
|
+
/**
|
|
2517
|
+
* 动画持续时间(毫秒)
|
|
2518
|
+
*/
|
|
2519
|
+
duration: {
|
|
2520
|
+
type: Number,
|
|
2521
|
+
default: 300
|
|
2522
|
+
},
|
|
2523
|
+
/**
|
|
2524
|
+
* z-index
|
|
2525
|
+
*/
|
|
2526
|
+
zIndex: {
|
|
2527
|
+
type: Number,
|
|
2528
|
+
default: 9999
|
|
2529
|
+
}
|
|
2530
|
+
},
|
|
2531
|
+
emits: ["update:visible", "select", "cancel", "open", "close"],
|
|
2532
|
+
setup(r, { expose: g, emit: i }) {
|
|
2533
|
+
const e = r, o = i, a = computed(() => !e.itemList || e.itemList.length === 0 ? [] : Array.isArray(e.itemList[0]) ? e.itemList : [e.itemList]), c = (m) => m ? m.startsWith("http://") || m.startsWith("https://") || m.startsWith("/") || m.includes(".png") || m.includes(".jpg") || m.includes(".jpeg") || m.includes(".gif") : !1, l = (m) => {
|
|
2534
|
+
const d = {};
|
|
2535
|
+
return m.background && (d.backgroundColor = m.background), d;
|
|
2536
|
+
}, u = (m) => {
|
|
2537
|
+
const d = {};
|
|
2538
|
+
return m.color && (d.color = m.color), m.iconFamily && (d.fontFamily = m.iconFamily), d;
|
|
2539
|
+
}, p = () => {
|
|
2540
|
+
}, h = () => {
|
|
2541
|
+
f();
|
|
2542
|
+
}, s = (m, d, b) => {
|
|
2543
|
+
o("select", m, d, b), f();
|
|
2544
|
+
}, n = () => {
|
|
2545
|
+
o("cancel"), f();
|
|
2546
|
+
}, f = () => {
|
|
2547
|
+
o("update:visible", !1), o("close"), document.removeEventListener("touchmove", y);
|
|
2548
|
+
}, y = (m) => {
|
|
2549
|
+
m.preventDefault();
|
|
2550
|
+
};
|
|
2551
|
+
return watch(() => e.visible, (m) => {
|
|
2552
|
+
m ? (o("open"), document.body.style.overflow = "hidden", document.addEventListener("touchmove", y, { passive: !1 })) : (document.body.style.overflow = "", document.removeEventListener("touchmove", y));
|
|
2553
|
+
}), onUnmounted(() => {
|
|
2554
|
+
document.body.style.overflow = "", document.removeEventListener("touchmove", y);
|
|
2555
|
+
}), g({
|
|
2556
|
+
open: () => o("update:visible", !0),
|
|
2557
|
+
close: f
|
|
2558
|
+
}), (m, d) => r.visible ? (openBlock(), createElementBlock("div", {
|
|
2559
|
+
key: 0,
|
|
2560
|
+
class: "hbis-share-sheet-container",
|
|
2561
|
+
onClick: p
|
|
2562
|
+
}, [
|
|
2563
|
+
createElementVNode("div", {
|
|
2564
|
+
class: "hbis-share-sheet-overlay",
|
|
2565
|
+
onClick: h
|
|
2566
|
+
}),
|
|
2567
|
+
createElementVNode("div", {
|
|
2568
|
+
class: "hbis-share-sheet-panel",
|
|
2569
|
+
onClick: d[0] || (d[0] = withModifiers(() => {
|
|
2570
|
+
}, ["stop"]))
|
|
2571
|
+
}, [
|
|
2572
|
+
r.title || r.description ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2573
|
+
r.title ? (openBlock(), createElementBlock("h3", _hoisted_2$4, toDisplayString(r.title), 1)) : createCommentVNode("", !0),
|
|
2574
|
+
r.description ? (openBlock(), createElementBlock("p", _hoisted_3$3, toDisplayString(r.description), 1)) : createCommentVNode("", !0)
|
|
2575
|
+
])) : createCommentVNode("", !0),
|
|
2576
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
2577
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (b, t) => (openBlock(), createElementBlock("div", {
|
|
2578
|
+
key: t,
|
|
2579
|
+
class: "hbis-share-sheet-row"
|
|
2580
|
+
}, [
|
|
2581
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b, (w, v) => (openBlock(), createElementBlock("div", {
|
|
2582
|
+
key: `${t}-${v}`,
|
|
2583
|
+
class: "hbis-share-sheet-item",
|
|
2584
|
+
style: normalizeStyle(l(w)),
|
|
2585
|
+
onClick: (_) => s(w, v, t)
|
|
2586
|
+
}, [
|
|
2587
|
+
createElementVNode("div", {
|
|
2588
|
+
class: "hbis-share-sheet-item-icon",
|
|
2589
|
+
style: normalizeStyle(u(w))
|
|
2590
|
+
}, [
|
|
2591
|
+
c(w.icon) ? (openBlock(), createElementBlock("image", {
|
|
2592
|
+
key: 0,
|
|
2593
|
+
src: w.icon,
|
|
2594
|
+
class: "hbis-share-sheet-item-icon-image",
|
|
2595
|
+
mode: "aspectFit"
|
|
2596
|
+
}, null, 8, _hoisted_6$1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(w.icon), 1))
|
|
2597
|
+
], 4),
|
|
2598
|
+
createElementVNode("div", {
|
|
2599
|
+
class: "hbis-share-sheet-item-name",
|
|
2600
|
+
style: normalizeStyle({ color: w.color || "#333" })
|
|
2601
|
+
}, toDisplayString(w.name), 5)
|
|
2602
|
+
], 12, _hoisted_5$2))), 128))
|
|
2603
|
+
]))), 128))
|
|
2604
|
+
]),
|
|
2605
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
2606
|
+
createElementVNode("button", {
|
|
2607
|
+
class: "hbis-share-sheet-cancel",
|
|
2608
|
+
onClick: n
|
|
2609
|
+
}, toDisplayString(r.cancel), 1)
|
|
2610
|
+
])
|
|
2611
|
+
])
|
|
2612
|
+
])) : createCommentVNode("", !0);
|
|
2613
|
+
}
|
|
2614
|
+
}, hbisShareSheet = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-55c87ab1"]]), _sfc_main$5 = {
|
|
2615
|
+
__name: "hbis-popup",
|
|
2616
|
+
props: {
|
|
2617
|
+
/**
|
|
2618
|
+
* 控制显示/隐藏
|
|
2619
|
+
*/
|
|
2620
|
+
visible: {
|
|
2621
|
+
type: Boolean,
|
|
2622
|
+
default: !1
|
|
2623
|
+
},
|
|
2624
|
+
/**
|
|
2625
|
+
* 弹出位置
|
|
2626
|
+
*/
|
|
2627
|
+
position: {
|
|
2628
|
+
type: String,
|
|
2629
|
+
default: "center",
|
|
2630
|
+
validator: (r) => ["center", "top", "right", "bottom", "left"].includes(r)
|
|
2631
|
+
},
|
|
2632
|
+
/**
|
|
2633
|
+
* 是否显示关闭按钮
|
|
2634
|
+
*/
|
|
2635
|
+
closable: {
|
|
2636
|
+
type: Boolean,
|
|
2637
|
+
default: !1
|
|
2638
|
+
},
|
|
2639
|
+
/**
|
|
2640
|
+
* 点击遮罩是否关闭
|
|
2641
|
+
*/
|
|
2642
|
+
closeOnClickModal: {
|
|
2643
|
+
type: Boolean,
|
|
2644
|
+
default: !0
|
|
2645
|
+
},
|
|
2646
|
+
/**
|
|
2647
|
+
* 动画持续时间(毫秒)
|
|
2648
|
+
*/
|
|
2649
|
+
duration: {
|
|
2650
|
+
type: [Number, Boolean],
|
|
2651
|
+
default: 300
|
|
2652
|
+
},
|
|
2653
|
+
/**
|
|
2654
|
+
* z-index
|
|
2655
|
+
*/
|
|
2656
|
+
zIndex: {
|
|
2657
|
+
type: Number,
|
|
2658
|
+
default: 10
|
|
2659
|
+
},
|
|
2660
|
+
/**
|
|
2661
|
+
* 自定义弹出层样式
|
|
2662
|
+
*/
|
|
2663
|
+
customStyle: {
|
|
2664
|
+
type: String,
|
|
2665
|
+
default: ""
|
|
2666
|
+
},
|
|
2667
|
+
/**
|
|
2668
|
+
* 是否显示遮罩
|
|
2669
|
+
*/
|
|
2670
|
+
modal: {
|
|
2671
|
+
type: Boolean,
|
|
2672
|
+
default: !0
|
|
2673
|
+
},
|
|
2674
|
+
/**
|
|
2675
|
+
* 自定义遮罩样式
|
|
2676
|
+
*/
|
|
2677
|
+
modalStyle: {
|
|
2678
|
+
type: String,
|
|
2679
|
+
default: ""
|
|
2680
|
+
},
|
|
2681
|
+
/**
|
|
2682
|
+
* 是否当关闭时将弹出层隐藏(display: none)
|
|
2683
|
+
*/
|
|
2684
|
+
hideWhenClose: {
|
|
2685
|
+
type: Boolean,
|
|
2686
|
+
default: !0
|
|
2687
|
+
},
|
|
2688
|
+
/**
|
|
2689
|
+
* 弹层内容懒渲染,触发展示时才渲染内容
|
|
2690
|
+
*/
|
|
2691
|
+
lazyRender: {
|
|
2692
|
+
type: Boolean,
|
|
2693
|
+
default: !0
|
|
2694
|
+
},
|
|
2695
|
+
/**
|
|
2696
|
+
* 弹出面板是否设置底部安全距离(iphone X 类型的机型)
|
|
2697
|
+
*/
|
|
2698
|
+
safeAreaInsetBottom: {
|
|
2699
|
+
type: Boolean,
|
|
2700
|
+
default: !1
|
|
2701
|
+
},
|
|
2702
|
+
/**
|
|
2703
|
+
* 动画类型
|
|
2704
|
+
*/
|
|
2705
|
+
transition: {
|
|
2706
|
+
type: String,
|
|
2707
|
+
default: "fade",
|
|
2708
|
+
validator: (r) => ["fade", "fade-up", "fade-down", "fade-left", "fade-right", "slide-up", "slide-down", "slide-left", "slide-right", "zoom-in"].includes(r)
|
|
2709
|
+
},
|
|
2710
|
+
/**
|
|
2711
|
+
* 是否锁定背景滚动
|
|
2712
|
+
*/
|
|
2713
|
+
lockScroll: {
|
|
2714
|
+
type: Boolean,
|
|
2715
|
+
default: !0
|
|
2716
|
+
},
|
|
2717
|
+
/**
|
|
2718
|
+
* 是否从页面中脱离出来,用于解决各种 fixed 失效问题
|
|
2719
|
+
*/
|
|
2720
|
+
rootPortal: {
|
|
2721
|
+
type: Boolean,
|
|
2722
|
+
default: !1
|
|
2723
|
+
},
|
|
2724
|
+
/**
|
|
2725
|
+
* 根节点样式
|
|
2726
|
+
*/
|
|
2727
|
+
customClass: {
|
|
2728
|
+
type: String,
|
|
2729
|
+
default: ""
|
|
2730
|
+
}
|
|
2731
|
+
},
|
|
2732
|
+
emits: ["update:visible", "close", "click-modal", "before-enter", "enter", "after-enter", "before-leave", "leave", "after-leave"],
|
|
2733
|
+
setup(r, { expose: g, emit: i }) {
|
|
2734
|
+
const e = r, o = i, a = computed(() => ({
|
|
2735
|
+
zIndex: e.zIndex
|
|
2736
|
+
})), c = computed(() => {
|
|
2737
|
+
const n = {};
|
|
2738
|
+
return e.customStyle && e.customStyle.split(";").filter((y) => y.trim()).forEach((y) => {
|
|
2739
|
+
const [m, d] = y.split(":").map((b) => b.trim());
|
|
2740
|
+
m && d && (n[m] = d);
|
|
2741
|
+
}), e.safeAreaInsetBottom && e.position === "bottom" && (n.paddingBottom = "env(safe-area-inset-bottom)"), n;
|
|
2742
|
+
}), l = computed(() => {
|
|
2743
|
+
const n = {};
|
|
2744
|
+
return e.modalStyle && e.modalStyle.split(";").filter((y) => y.trim()).forEach((y) => {
|
|
2745
|
+
const [m, d] = y.split(":").map((b) => b.trim());
|
|
2746
|
+
m && d && (n[m] = d);
|
|
2747
|
+
}), n;
|
|
2748
|
+
}), u = () => {
|
|
2749
|
+
}, p = () => {
|
|
2750
|
+
o("click-modal"), e.closeOnClickModal && h();
|
|
2751
|
+
}, h = () => {
|
|
2752
|
+
o("close"), o("update:visible", !1), document.removeEventListener("touchmove", s), e.lockScroll && (document.body.style.overflow = "");
|
|
2753
|
+
}, s = (n) => {
|
|
2754
|
+
n.preventDefault();
|
|
2755
|
+
};
|
|
2756
|
+
return watch(() => e.visible, (n) => {
|
|
2757
|
+
n ? (o("before-enter"), e.lockScroll && (document.body.style.overflow = "hidden", document.addEventListener("touchmove", s, { passive: !1 })), setTimeout(() => {
|
|
2758
|
+
o("enter"), setTimeout(() => {
|
|
2759
|
+
o("after-enter");
|
|
2760
|
+
}, e.duration);
|
|
2761
|
+
}, 0)) : (o("before-leave"), setTimeout(() => {
|
|
2762
|
+
o("leave"), setTimeout(() => {
|
|
2763
|
+
o("after-leave");
|
|
2764
|
+
}, e.duration);
|
|
2765
|
+
}, 0));
|
|
2766
|
+
}), onUnmounted(() => {
|
|
2767
|
+
document.body.style.overflow = "", document.removeEventListener("touchmove", s);
|
|
2768
|
+
}), g({
|
|
2769
|
+
open: () => o("update:visible", !0),
|
|
2770
|
+
close: h
|
|
2771
|
+
}), (n, f) => r.visible || !r.hideWhenClose ? (openBlock(), createElementBlock("div", {
|
|
2772
|
+
key: 0,
|
|
2773
|
+
class: "hbis-popup-container",
|
|
2774
|
+
style: normalizeStyle(a.value),
|
|
2775
|
+
onClick: u
|
|
2776
|
+
}, [
|
|
2777
|
+
r.modal ? (openBlock(), createElementBlock("div", {
|
|
2778
|
+
key: 0,
|
|
2779
|
+
class: "hbis-popup-overlay",
|
|
2780
|
+
style: normalizeStyle(l.value),
|
|
2781
|
+
onClick: p
|
|
2782
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
2783
|
+
createElementVNode("div", {
|
|
2784
|
+
class: normalizeClass(["hbis-popup-content", [`hbis-popup-position-${r.position}`, { "hbis-popup-closable": r.closable }]]),
|
|
2785
|
+
style: normalizeStyle(c.value),
|
|
2786
|
+
onClick: f[0] || (f[0] = withModifiers(() => {
|
|
2787
|
+
}, ["stop"]))
|
|
2788
|
+
}, [
|
|
2789
|
+
r.closable ? (openBlock(), createElementBlock("div", {
|
|
2790
|
+
key: 0,
|
|
2791
|
+
class: "hbis-popup-close",
|
|
2792
|
+
onClick: h
|
|
2793
|
+
}, [...f[1] || (f[1] = [
|
|
2794
|
+
createElementVNode("span", { class: "hbis-popup-close-icon" }, "×", -1)
|
|
2795
|
+
])])) : createCommentVNode("", !0),
|
|
2796
|
+
renderSlot(n.$slots, "default", {}, void 0, !0)
|
|
2797
|
+
], 6)
|
|
2798
|
+
], 4)) : createCommentVNode("", !0);
|
|
2799
|
+
}
|
|
2800
|
+
}, hbisPopup = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-091517df"]]), _hoisted_1$3 = { class: "hbis-navbar-container" }, _hoisted_2$3 = {
|
|
2801
|
+
key: 0,
|
|
2802
|
+
class: "hbis-navbar-left-arrow"
|
|
2803
|
+
}, _hoisted_3$2 = {
|
|
2804
|
+
key: 1,
|
|
2805
|
+
class: "hbis-navbar-left-text"
|
|
2806
|
+
}, _hoisted_4$2 = { class: "hbis-navbar-title" }, _hoisted_5$1 = { key: 0 }, _sfc_main$4 = {
|
|
2807
|
+
__name: "hbis-navbar",
|
|
2808
|
+
props: {
|
|
2809
|
+
/**
|
|
2810
|
+
* 卡片标题
|
|
2811
|
+
*/
|
|
2812
|
+
title: {
|
|
2813
|
+
type: String,
|
|
2814
|
+
default: ""
|
|
2815
|
+
},
|
|
2816
|
+
/**
|
|
2817
|
+
* 左侧文案
|
|
2818
|
+
*/
|
|
2819
|
+
leftText: {
|
|
2820
|
+
type: String,
|
|
2821
|
+
default: ""
|
|
2822
|
+
},
|
|
2823
|
+
/**
|
|
2824
|
+
* 右侧文案
|
|
2825
|
+
*/
|
|
2826
|
+
rightText: {
|
|
2827
|
+
type: String,
|
|
2828
|
+
default: ""
|
|
2829
|
+
},
|
|
2830
|
+
/**
|
|
2831
|
+
* 显示左侧箭头
|
|
2832
|
+
*/
|
|
2833
|
+
leftArrow: {
|
|
2834
|
+
type: Boolean,
|
|
2835
|
+
default: !1
|
|
2836
|
+
},
|
|
2837
|
+
/**
|
|
2838
|
+
* 显示下边框
|
|
2839
|
+
*/
|
|
2840
|
+
bordered: {
|
|
2841
|
+
type: Boolean,
|
|
2842
|
+
default: !0
|
|
2843
|
+
},
|
|
2844
|
+
/**
|
|
2845
|
+
* 固定到顶部
|
|
2846
|
+
*/
|
|
2847
|
+
fixed: {
|
|
2848
|
+
type: Boolean,
|
|
2849
|
+
default: !1
|
|
2850
|
+
},
|
|
2851
|
+
/**
|
|
2852
|
+
* 固定在顶部时,在标签位置生成一个等高的占位元素
|
|
2853
|
+
*/
|
|
2854
|
+
placeholder: {
|
|
2855
|
+
type: Boolean,
|
|
2856
|
+
default: !1
|
|
2857
|
+
},
|
|
2858
|
+
/**
|
|
2859
|
+
* 导航栏 z-index
|
|
2860
|
+
*/
|
|
2861
|
+
zIndex: {
|
|
2862
|
+
type: Number,
|
|
2863
|
+
default: 1
|
|
2864
|
+
},
|
|
2865
|
+
/**
|
|
2866
|
+
* 开启顶部安全区适配
|
|
2867
|
+
*/
|
|
2868
|
+
safeAreaInsetTop: {
|
|
2869
|
+
type: Boolean,
|
|
2870
|
+
default: !1
|
|
2871
|
+
},
|
|
2872
|
+
/**
|
|
2873
|
+
* 禁用左侧按钮,禁用时透明度降低,且无法点击
|
|
2874
|
+
*/
|
|
2875
|
+
leftDisabled: {
|
|
2876
|
+
type: Boolean,
|
|
2877
|
+
default: !1
|
|
2878
|
+
},
|
|
2879
|
+
/**
|
|
2880
|
+
* 禁用右侧按钮,禁用时透明度降低,且无法点击
|
|
2881
|
+
*/
|
|
2882
|
+
rightDisabled: {
|
|
2883
|
+
type: Boolean,
|
|
2884
|
+
default: !1
|
|
2885
|
+
},
|
|
2886
|
+
/**
|
|
2887
|
+
* 根节点样式类
|
|
2888
|
+
*/
|
|
2889
|
+
customClass: {
|
|
2890
|
+
type: String,
|
|
2891
|
+
default: ""
|
|
2892
|
+
},
|
|
2893
|
+
/**
|
|
2894
|
+
* 根节点样式
|
|
2895
|
+
*/
|
|
2896
|
+
customStyle: {
|
|
2897
|
+
type: String,
|
|
2898
|
+
default: ""
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
emits: ["click-left", "click-right"],
|
|
2902
|
+
setup(r, { emit: g }) {
|
|
2903
|
+
const i = r, e = g, o = computed(() => {
|
|
2904
|
+
const u = {};
|
|
2905
|
+
return u.zIndex = i.zIndex, i.safeAreaInsetTop && (u.paddingTop = "env(safe-area-inset-top)"), i.customStyle && i.customStyle.split(";").filter((h) => h.trim()).forEach((h) => {
|
|
2906
|
+
const [s, n] = h.split(":").map((f) => f.trim());
|
|
2907
|
+
s && n && (u[s] = n);
|
|
2908
|
+
}), u;
|
|
2909
|
+
}), a = computed(() => {
|
|
2910
|
+
const u = {};
|
|
2911
|
+
return i.safeAreaInsetTop && (u.paddingTop = "env(safe-area-inset-top)"), u;
|
|
2912
|
+
}), c = () => {
|
|
2913
|
+
i.leftDisabled || e("click-left");
|
|
2914
|
+
}, l = () => {
|
|
2915
|
+
i.rightDisabled || e("click-right");
|
|
2916
|
+
};
|
|
2917
|
+
return (u, p) => (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2918
|
+
r.fixed && r.placeholder ? (openBlock(), createElementBlock("div", {
|
|
2919
|
+
key: 0,
|
|
2920
|
+
class: "hbis-navbar-placeholder",
|
|
2921
|
+
style: normalizeStyle(a.value)
|
|
2922
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
2923
|
+
createElementVNode("div", {
|
|
2924
|
+
class: normalizeClass(["hbis-navbar", [
|
|
2925
|
+
{ "hbis-navbar-fixed": r.fixed },
|
|
2926
|
+
{ "hbis-navbar-bordered": r.bordered }
|
|
2927
|
+
]]),
|
|
2928
|
+
style: normalizeStyle(o.value)
|
|
2929
|
+
}, [
|
|
2930
|
+
renderSlot(u.$slots, "capsule", {}, void 0, !0),
|
|
2931
|
+
u.$slots.capsule ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
2932
|
+
key: 0,
|
|
2933
|
+
class: "hbis-navbar-left",
|
|
2934
|
+
onClick: c
|
|
2935
|
+
}, [
|
|
2936
|
+
renderSlot(u.$slots, "left", {}, () => [
|
|
2937
|
+
r.leftText || r.leftArrow ? (openBlock(), createElementBlock("div", {
|
|
2938
|
+
key: 0,
|
|
2939
|
+
class: normalizeClass(["hbis-navbar-left-content", { "hbis-navbar-left-disabled": r.leftDisabled }])
|
|
2940
|
+
}, [
|
|
2941
|
+
r.leftArrow ? (openBlock(), createElementBlock("span", _hoisted_2$3, "←")) : createCommentVNode("", !0),
|
|
2942
|
+
r.leftText ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(r.leftText), 1)) : createCommentVNode("", !0)
|
|
2943
|
+
], 2)) : createCommentVNode("", !0)
|
|
2944
|
+
], !0)
|
|
2945
|
+
])),
|
|
2946
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
2947
|
+
renderSlot(u.$slots, "title", {}, () => [
|
|
2948
|
+
r.title ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(r.title), 1)) : createCommentVNode("", !0)
|
|
2949
|
+
], !0)
|
|
2950
|
+
]),
|
|
2951
|
+
createElementVNode("div", {
|
|
2952
|
+
class: "hbis-navbar-right",
|
|
2953
|
+
onClick: l
|
|
2954
|
+
}, [
|
|
2955
|
+
renderSlot(u.$slots, "right", {}, () => [
|
|
2956
|
+
r.rightText ? (openBlock(), createElementBlock("div", {
|
|
2957
|
+
key: 0,
|
|
2958
|
+
class: normalizeClass(["hbis-navbar-right-content", { "hbis-navbar-right-disabled": r.rightDisabled }])
|
|
2959
|
+
}, toDisplayString(r.rightText), 3)) : createCommentVNode("", !0)
|
|
2960
|
+
], !0)
|
|
2961
|
+
])
|
|
2962
|
+
], 6)
|
|
2963
|
+
]));
|
|
2964
|
+
}
|
|
2965
|
+
}, hbisNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6ca82b09"]]), _hoisted_1$2 = ["onClick"], _hoisted_2$2 = { class: "hbis-segmented-item-label" }, _sfc_main$3 = {
|
|
2966
|
+
__name: "hbis-segmented",
|
|
2967
|
+
props: {
|
|
2968
|
+
/**
|
|
2969
|
+
* 当前选中的值
|
|
2970
|
+
*/
|
|
2971
|
+
value: {
|
|
2972
|
+
type: [String, Number],
|
|
2973
|
+
default: ""
|
|
2974
|
+
},
|
|
2975
|
+
/**
|
|
2976
|
+
* 是否禁用分段器
|
|
2977
|
+
*/
|
|
2978
|
+
disabled: {
|
|
2979
|
+
type: Boolean,
|
|
2980
|
+
default: !1
|
|
2981
|
+
},
|
|
2982
|
+
/**
|
|
2983
|
+
* 控件尺寸
|
|
2984
|
+
*/
|
|
2985
|
+
size: {
|
|
2986
|
+
type: String,
|
|
2987
|
+
default: "middle",
|
|
2988
|
+
validator: (r) => ["large", "middle", "small"].includes(r)
|
|
2989
|
+
},
|
|
2990
|
+
/**
|
|
2991
|
+
* 数据集合
|
|
2992
|
+
*/
|
|
2993
|
+
options: {
|
|
2994
|
+
type: Array,
|
|
2995
|
+
default: () => []
|
|
2996
|
+
},
|
|
2997
|
+
/**
|
|
2998
|
+
* 切换选项时是否振动
|
|
2999
|
+
*/
|
|
3000
|
+
vibrateShort: {
|
|
3001
|
+
type: Boolean,
|
|
3002
|
+
default: !1
|
|
3003
|
+
},
|
|
3004
|
+
/**
|
|
3005
|
+
* 自定义样式
|
|
3006
|
+
*/
|
|
3007
|
+
customStyle: {
|
|
3008
|
+
type: String,
|
|
3009
|
+
default: ""
|
|
3010
|
+
},
|
|
3011
|
+
/**
|
|
3012
|
+
* 自定义样式类
|
|
3013
|
+
*/
|
|
3014
|
+
customClass: {
|
|
3015
|
+
type: String,
|
|
3016
|
+
default: ""
|
|
3017
|
+
}
|
|
3018
|
+
},
|
|
3019
|
+
emits: ["update:value", "change", "click"],
|
|
3020
|
+
setup(r, { expose: g, emit: i }) {
|
|
3021
|
+
const e = r, o = i, a = ref(null), c = ref(null), l = computed(() => e.options.map((n) => typeof n == "string" || typeof n == "number" ? {
|
|
3022
|
+
value: n,
|
|
3023
|
+
disabled: !1
|
|
3024
|
+
} : n)), u = computed(() => {
|
|
3025
|
+
const n = {};
|
|
3026
|
+
return e.customStyle && e.customStyle.split(";").filter((y) => y.trim()).forEach((y) => {
|
|
3027
|
+
const [m, d] = y.split(":").map((b) => b.trim());
|
|
3028
|
+
m && d && (n[m] = d);
|
|
3029
|
+
}), n;
|
|
3030
|
+
}), p = ref({}), h = (n, f) => {
|
|
3031
|
+
e.disabled || n.disabled || (o("click", n), n.value !== e.value && (e.vibrateShort && typeof navigator < "u" && navigator.vibrate && navigator.vibrate(10), o("update:value", n.value), o("change", n), nextTick(() => {
|
|
3032
|
+
s();
|
|
3033
|
+
})));
|
|
3034
|
+
}, s = (n = !0) => {
|
|
3035
|
+
if (!a.value || !c.value)
|
|
3036
|
+
return;
|
|
3037
|
+
const f = a.value.querySelector(".hbis-segmented-item-active");
|
|
3038
|
+
if (!f)
|
|
3039
|
+
return;
|
|
3040
|
+
const { left: y, width: m } = f.getBoundingClientRect(), { left: d } = a.value.getBoundingClientRect();
|
|
3041
|
+
p.value = {
|
|
3042
|
+
left: `${y - d}px`,
|
|
3043
|
+
width: `${m}px`,
|
|
3044
|
+
transition: n ? "all 0.3s ease" : "none"
|
|
3045
|
+
};
|
|
3046
|
+
};
|
|
3047
|
+
return watch(() => e.value, () => {
|
|
3048
|
+
nextTick(() => {
|
|
3049
|
+
s();
|
|
3050
|
+
});
|
|
3051
|
+
}), watch(() => e.options, () => {
|
|
3052
|
+
nextTick(() => {
|
|
3053
|
+
s(!1);
|
|
3054
|
+
});
|
|
3055
|
+
}, { deep: !0 }), onMounted(() => {
|
|
3056
|
+
nextTick(() => {
|
|
3057
|
+
s(!1);
|
|
3058
|
+
});
|
|
3059
|
+
}), g({
|
|
3060
|
+
updateActiveStyle: s
|
|
3061
|
+
}), (n, f) => (openBlock(), createElementBlock("div", {
|
|
3062
|
+
class: normalizeClass(["hbis-segmented", [
|
|
3063
|
+
`hbis-segmented-${r.size}`,
|
|
3064
|
+
{ "hbis-segmented-disabled": r.disabled }
|
|
3065
|
+
]]),
|
|
3066
|
+
style: normalizeStyle(u.value)
|
|
3067
|
+
}, [
|
|
3068
|
+
createElementVNode("div", {
|
|
3069
|
+
class: "hbis-segmented-container",
|
|
3070
|
+
ref_key: "containerRef",
|
|
3071
|
+
ref: a
|
|
3072
|
+
}, [
|
|
3073
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (y, m) => (openBlock(), createElementBlock("div", {
|
|
3074
|
+
key: y.value,
|
|
3075
|
+
class: normalizeClass(["hbis-segmented-item", {
|
|
3076
|
+
"hbis-segmented-item-active": y.value === r.value,
|
|
3077
|
+
"hbis-segmented-item-disabled": y.disabled
|
|
3078
|
+
}]),
|
|
3079
|
+
onClick: (d) => h(y)
|
|
3080
|
+
}, [
|
|
3081
|
+
renderSlot(n.$slots, "label", { option: y }, () => [
|
|
3082
|
+
createElementVNode("span", _hoisted_2$2, toDisplayString(y.value), 1)
|
|
3083
|
+
], !0)
|
|
3084
|
+
], 10, _hoisted_1$2))), 128)),
|
|
3085
|
+
createElementVNode("div", {
|
|
3086
|
+
class: "hbis-segmented-active",
|
|
3087
|
+
ref_key: "activeRef",
|
|
3088
|
+
ref: c,
|
|
3089
|
+
style: normalizeStyle(p.value)
|
|
3090
|
+
}, null, 4)
|
|
3091
|
+
], 512)
|
|
3092
|
+
], 6));
|
|
3093
|
+
}
|
|
3094
|
+
}, hbisSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b45fdcb8"]]), _hoisted_1$1 = {
|
|
3095
|
+
key: 0,
|
|
3096
|
+
class: "hbis-checkbox-button-content"
|
|
3097
|
+
}, _hoisted_2$1 = {
|
|
3098
|
+
key: 1,
|
|
3099
|
+
class: "hbis-checkbox-content"
|
|
3100
|
+
}, _hoisted_3$1 = {
|
|
3101
|
+
key: 0,
|
|
3102
|
+
class: "hbis-checkbox-icon-check"
|
|
3103
|
+
}, _hoisted_4$1 = {
|
|
3104
|
+
key: 0,
|
|
3105
|
+
class: "hbis-checkbox-label"
|
|
3106
|
+
}, _sfc_main$2 = {
|
|
3107
|
+
__name: "hbis-checkbox",
|
|
3108
|
+
props: {
|
|
3109
|
+
/**
|
|
3110
|
+
* 绑定值
|
|
3111
|
+
*/
|
|
3112
|
+
modelValue: {
|
|
3113
|
+
type: [Boolean, String, Number],
|
|
3114
|
+
default: !1
|
|
3115
|
+
},
|
|
3116
|
+
/**
|
|
3117
|
+
* 选中值
|
|
3118
|
+
*/
|
|
3119
|
+
trueValue: {
|
|
3120
|
+
type: [Boolean, String, Number],
|
|
3121
|
+
default: !0
|
|
3122
|
+
},
|
|
3123
|
+
/**
|
|
3124
|
+
* 未选中值
|
|
3125
|
+
*/
|
|
3126
|
+
falseValue: {
|
|
3127
|
+
type: [Boolean, String, Number],
|
|
3128
|
+
default: !1
|
|
3129
|
+
},
|
|
3130
|
+
/**
|
|
3131
|
+
* 图标形状
|
|
3132
|
+
*/
|
|
3133
|
+
shape: {
|
|
3134
|
+
type: String,
|
|
3135
|
+
default: "circle",
|
|
3136
|
+
validator: (r) => ["circle", "square", "button"].includes(r)
|
|
3137
|
+
},
|
|
3138
|
+
/**
|
|
3139
|
+
* 选中颜色
|
|
3140
|
+
*/
|
|
3141
|
+
checkedColor: {
|
|
3142
|
+
type: String,
|
|
3143
|
+
default: "#409eff"
|
|
3144
|
+
},
|
|
3145
|
+
/**
|
|
3146
|
+
* 是否禁用
|
|
3147
|
+
*/
|
|
3148
|
+
disabled: {
|
|
3149
|
+
type: Boolean,
|
|
3150
|
+
default: !1
|
|
3151
|
+
},
|
|
3152
|
+
/**
|
|
3153
|
+
* 自定义样式
|
|
3154
|
+
*/
|
|
3155
|
+
customStyle: {
|
|
3156
|
+
type: String,
|
|
3157
|
+
default: ""
|
|
3158
|
+
},
|
|
3159
|
+
/**
|
|
3160
|
+
* 自定义样式类
|
|
3161
|
+
*/
|
|
3162
|
+
customClass: {
|
|
3163
|
+
type: String,
|
|
3164
|
+
default: ""
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
3167
|
+
emits: ["update:modelValue", "change"],
|
|
3168
|
+
setup(r, { expose: g, emit: i }) {
|
|
3169
|
+
const e = r, o = i, a = inject("checkboxGroup", null), c = computed(() => e.disabled || a && a.disabled), l = computed(() => a ? a.value.value.includes(e.modelValue) : e.modelValue === e.trueValue), u = computed(() => {
|
|
3170
|
+
const n = {};
|
|
3171
|
+
return e.customStyle && e.customStyle.split(";").filter((y) => y.trim()).forEach((y) => {
|
|
3172
|
+
const [m, d] = y.split(":").map((b) => b.trim());
|
|
3173
|
+
m && d && (n[m] = d);
|
|
3174
|
+
}), n;
|
|
3175
|
+
}), p = computed(() => ({
|
|
3176
|
+
borderColor: l.value ? e.checkedColor : "#dcdfe6",
|
|
3177
|
+
backgroundColor: l.value ? e.checkedColor : "transparent",
|
|
3178
|
+
color: l.value ? "#fff" : "transparent"
|
|
3179
|
+
})), h = () => {
|
|
3180
|
+
if (!c.value)
|
|
3181
|
+
if (a)
|
|
3182
|
+
a.toggle(e.modelValue);
|
|
3183
|
+
else {
|
|
3184
|
+
const n = l.value ? e.falseValue : e.trueValue;
|
|
3185
|
+
o("update:modelValue", n), o("change", { value: n });
|
|
3186
|
+
}
|
|
3187
|
+
};
|
|
3188
|
+
return g({
|
|
3189
|
+
toggle: () => {
|
|
3190
|
+
h();
|
|
3191
|
+
}
|
|
3192
|
+
}), (n, f) => (openBlock(), createElementBlock("div", {
|
|
3193
|
+
class: normalizeClass(["hbis-checkbox", [
|
|
3194
|
+
`hbis-checkbox-${r.shape}`,
|
|
3195
|
+
{ "hbis-checkbox-disabled": c.value },
|
|
3196
|
+
{ "hbis-checkbox-checked": l.value },
|
|
3197
|
+
{ "hbis-checkbox-button": r.shape === "button" }
|
|
3198
|
+
]]),
|
|
3199
|
+
style: normalizeStyle(u.value),
|
|
3200
|
+
onClick: h
|
|
3201
|
+
}, [
|
|
3202
|
+
r.shape === "button" ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
3203
|
+
renderSlot(n.$slots, "default", {}, void 0, !0)
|
|
3204
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
3205
|
+
createElementVNode("div", {
|
|
3206
|
+
class: "hbis-checkbox-icon",
|
|
3207
|
+
style: normalizeStyle(p.value)
|
|
3208
|
+
}, [
|
|
3209
|
+
l.value ? (openBlock(), createElementBlock("span", _hoisted_3$1, "✓")) : createCommentVNode("", !0)
|
|
3210
|
+
], 4),
|
|
3211
|
+
n.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
3212
|
+
renderSlot(n.$slots, "default", {}, void 0, !0)
|
|
3213
|
+
])) : createCommentVNode("", !0)
|
|
3214
|
+
]))
|
|
3215
|
+
], 6));
|
|
3216
|
+
}
|
|
3217
|
+
}, hbisCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-65b8f51f"]]), _sfc_main$1 = {
|
|
3218
|
+
__name: "hbis-checkbox-group",
|
|
3219
|
+
props: {
|
|
3220
|
+
/**
|
|
3221
|
+
* 绑定值
|
|
3222
|
+
*/
|
|
3223
|
+
modelValue: {
|
|
3224
|
+
type: Array,
|
|
3225
|
+
default: () => []
|
|
3226
|
+
},
|
|
3227
|
+
/**
|
|
3228
|
+
* 是否禁用
|
|
3229
|
+
*/
|
|
3230
|
+
disabled: {
|
|
3231
|
+
type: Boolean,
|
|
3232
|
+
default: !1
|
|
3233
|
+
},
|
|
3234
|
+
/**
|
|
3235
|
+
* 是否同行展示
|
|
3236
|
+
*/
|
|
3237
|
+
inline: {
|
|
3238
|
+
type: Boolean,
|
|
3239
|
+
default: !1
|
|
3240
|
+
},
|
|
3241
|
+
/**
|
|
3242
|
+
* 开启表单模式
|
|
3243
|
+
*/
|
|
3244
|
+
cell: {
|
|
3245
|
+
type: Boolean,
|
|
3246
|
+
default: !1
|
|
3247
|
+
},
|
|
3248
|
+
/**
|
|
3249
|
+
* 最小选中数量
|
|
3250
|
+
*/
|
|
3251
|
+
min: {
|
|
3252
|
+
type: Number,
|
|
3253
|
+
default: 0
|
|
3254
|
+
},
|
|
3255
|
+
/**
|
|
3256
|
+
* 最大选中数量
|
|
3257
|
+
*/
|
|
3258
|
+
max: {
|
|
3259
|
+
type: Number,
|
|
3260
|
+
default: 1 / 0
|
|
3261
|
+
},
|
|
3262
|
+
/**
|
|
3263
|
+
* 自定义样式
|
|
3264
|
+
*/
|
|
3265
|
+
customStyle: {
|
|
3266
|
+
type: String,
|
|
3267
|
+
default: ""
|
|
3268
|
+
},
|
|
3269
|
+
/**
|
|
3270
|
+
* 自定义样式类
|
|
3271
|
+
*/
|
|
3272
|
+
customClass: {
|
|
3273
|
+
type: String,
|
|
3274
|
+
default: ""
|
|
3275
|
+
}
|
|
3276
|
+
},
|
|
3277
|
+
emits: ["update:modelValue", "change"],
|
|
3278
|
+
setup(r, { emit: g }) {
|
|
3279
|
+
const i = r, e = g, o = ref([...i.modelValue]), a = {
|
|
3280
|
+
value: o,
|
|
3281
|
+
disabled: i.disabled,
|
|
3282
|
+
toggle: c
|
|
3283
|
+
};
|
|
3284
|
+
provide("checkboxGroup", a);
|
|
3285
|
+
function c(u) {
|
|
3286
|
+
const p = o.value.indexOf(u);
|
|
3287
|
+
if (p === -1) {
|
|
3288
|
+
if (o.value.length >= i.max)
|
|
3289
|
+
return;
|
|
3290
|
+
o.value.push(u);
|
|
3291
|
+
} else {
|
|
3292
|
+
if (o.value.length <= i.min)
|
|
3293
|
+
return;
|
|
3294
|
+
o.value.splice(p, 1);
|
|
3295
|
+
}
|
|
3296
|
+
e("update:modelValue", [...o.value]), e("change", { value: [...o.value] });
|
|
3297
|
+
}
|
|
3298
|
+
watch(() => i.modelValue, (u) => {
|
|
3299
|
+
o.value = [...u];
|
|
3300
|
+
}, { deep: !0 }), watch(() => i.disabled, (u) => {
|
|
3301
|
+
a.disabled = u;
|
|
3302
|
+
});
|
|
3303
|
+
const l = {
|
|
3304
|
+
// 可以根据需要添加样式
|
|
3305
|
+
};
|
|
3306
|
+
return (u, p) => (openBlock(), createElementBlock("div", {
|
|
3307
|
+
class: normalizeClass(["hbis-checkbox-group", [
|
|
3308
|
+
{ "hbis-checkbox-group-inline": r.inline },
|
|
3309
|
+
{ "hbis-checkbox-group-cell": r.cell }
|
|
3310
|
+
]]),
|
|
3311
|
+
style: l
|
|
3312
|
+
}, [
|
|
3313
|
+
renderSlot(u.$slots, "default", {}, void 0, !0)
|
|
3314
|
+
], 2));
|
|
3315
|
+
}
|
|
3316
|
+
}, hbisCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-a7d0f349"]]), _hoisted_1 = {
|
|
3317
|
+
key: 0,
|
|
3318
|
+
class: "hbis-input-required"
|
|
3319
|
+
}, _hoisted_2 = { class: "hbis-input-container" }, _hoisted_3 = {
|
|
3320
|
+
key: 0,
|
|
3321
|
+
class: "hbis-input-prefix"
|
|
3322
|
+
}, _hoisted_4 = {
|
|
3323
|
+
key: 0,
|
|
3324
|
+
class: "hbis-input-icon"
|
|
3325
|
+
}, _hoisted_5 = ["type", "placeholder", "disabled", "readonly", "maxlength", "placeholder-style", "placeholder-class", "focus", "cursor-spacing", "cursor", "selection-start", "selection-end", "adjust-position", "confirm-type", "confirm-hold", "always-embed"], _hoisted_6 = {
|
|
3326
|
+
key: 2,
|
|
3327
|
+
class: "hbis-input-suffix"
|
|
3328
|
+
}, _hoisted_7 = {
|
|
3329
|
+
key: 0,
|
|
3330
|
+
class: "hbis-input-icon"
|
|
3331
|
+
}, _hoisted_8 = { class: "hbis-input-icon" }, _hoisted_9 = {
|
|
3332
|
+
key: 1,
|
|
3333
|
+
class: "hbis-input-word-limit"
|
|
3334
|
+
}, _sfc_main = {
|
|
3335
|
+
__name: "hbis-input",
|
|
3336
|
+
props: {
|
|
3337
|
+
/**
|
|
3338
|
+
* 类型
|
|
3339
|
+
*/
|
|
3340
|
+
type: {
|
|
3341
|
+
type: String,
|
|
3342
|
+
default: "text",
|
|
3343
|
+
validator: (r) => ["text", "number", "digit", "idcard", "safe-password", "nickname", "tel"].includes(r)
|
|
3344
|
+
},
|
|
3345
|
+
/**
|
|
3346
|
+
* 绑定值
|
|
3347
|
+
*/
|
|
3348
|
+
modelValue: {
|
|
3349
|
+
type: [String, Number],
|
|
3350
|
+
default: ""
|
|
3351
|
+
},
|
|
3352
|
+
/**
|
|
3353
|
+
* 占位文本
|
|
3354
|
+
*/
|
|
3355
|
+
placeholder: {
|
|
3356
|
+
type: String,
|
|
3357
|
+
default: "请输入..."
|
|
3358
|
+
},
|
|
3359
|
+
/**
|
|
3360
|
+
* 显示清空按钮
|
|
3361
|
+
*/
|
|
3362
|
+
clearable: {
|
|
3363
|
+
type: Boolean,
|
|
3364
|
+
default: !1
|
|
3365
|
+
},
|
|
3366
|
+
/**
|
|
3367
|
+
* 原生属性,最大长度
|
|
3368
|
+
*/
|
|
3369
|
+
maxlength: {
|
|
3370
|
+
type: Number,
|
|
3371
|
+
default: -1
|
|
3372
|
+
},
|
|
3373
|
+
/**
|
|
3374
|
+
* 显示为密码框
|
|
3375
|
+
*/
|
|
3376
|
+
showPassword: {
|
|
3377
|
+
type: Boolean,
|
|
3378
|
+
default: !1
|
|
3379
|
+
},
|
|
3380
|
+
/**
|
|
3381
|
+
* 原生属性,禁用
|
|
3382
|
+
*/
|
|
3383
|
+
disabled: {
|
|
3384
|
+
type: Boolean,
|
|
3385
|
+
default: !1
|
|
3386
|
+
},
|
|
3387
|
+
/**
|
|
3388
|
+
* 只读
|
|
3389
|
+
*/
|
|
3390
|
+
readonly: {
|
|
3391
|
+
type: Boolean,
|
|
3392
|
+
default: !1
|
|
3393
|
+
},
|
|
3394
|
+
/**
|
|
3395
|
+
* 前置图标
|
|
3396
|
+
*/
|
|
3397
|
+
prefixIcon: {
|
|
3398
|
+
type: String,
|
|
3399
|
+
default: ""
|
|
3400
|
+
},
|
|
3401
|
+
/**
|
|
3402
|
+
* 后置图标
|
|
3403
|
+
*/
|
|
3404
|
+
suffixIcon: {
|
|
3405
|
+
type: String,
|
|
3406
|
+
default: ""
|
|
3407
|
+
},
|
|
3408
|
+
/**
|
|
3409
|
+
* 显示字数限制,需要同时设置 maxlength
|
|
3410
|
+
*/
|
|
3411
|
+
showWordLimit: {
|
|
3412
|
+
type: Boolean,
|
|
3413
|
+
default: !1
|
|
3414
|
+
},
|
|
3415
|
+
/**
|
|
3416
|
+
* 设置键盘右下角按钮的文字,仅在type='text'时生效
|
|
3417
|
+
*/
|
|
3418
|
+
confirmType: {
|
|
3419
|
+
type: String,
|
|
3420
|
+
default: "done",
|
|
3421
|
+
validator: (r) => ["done", "go", "next", "search", "send"].includes(r)
|
|
3422
|
+
},
|
|
3423
|
+
/**
|
|
3424
|
+
* 点击键盘右下角按钮时是否保持键盘不收起
|
|
3425
|
+
*/
|
|
3426
|
+
confirmHold: {
|
|
3427
|
+
type: Boolean,
|
|
3428
|
+
default: !1
|
|
3429
|
+
},
|
|
3430
|
+
/**
|
|
3431
|
+
* 微信小程序原生属性,强制 input 处于同层状态
|
|
3432
|
+
*/
|
|
3433
|
+
alwaysEmbed: {
|
|
3434
|
+
type: Boolean,
|
|
3435
|
+
default: !1
|
|
3436
|
+
},
|
|
3437
|
+
/**
|
|
3438
|
+
* 原生属性,指定 placeholder 的样式
|
|
3439
|
+
*/
|
|
3440
|
+
placeholderStyle: {
|
|
3441
|
+
type: String,
|
|
3442
|
+
default: ""
|
|
3443
|
+
},
|
|
3444
|
+
/**
|
|
3445
|
+
* 原生属性,指定 placeholder 的样式类
|
|
3446
|
+
*/
|
|
3447
|
+
placeholderClass: {
|
|
3448
|
+
type: String,
|
|
3449
|
+
default: ""
|
|
3450
|
+
},
|
|
3451
|
+
/**
|
|
3452
|
+
* 原生属性,获取焦点
|
|
3453
|
+
*/
|
|
3454
|
+
focus: {
|
|
3455
|
+
type: Boolean,
|
|
3456
|
+
default: !1
|
|
3457
|
+
},
|
|
3458
|
+
/**
|
|
3459
|
+
* 原生属性,指定光标与键盘的距离
|
|
3460
|
+
*/
|
|
3461
|
+
cursorSpacing: {
|
|
3462
|
+
type: Number,
|
|
3463
|
+
default: 0
|
|
3464
|
+
},
|
|
3465
|
+
/**
|
|
3466
|
+
* 原生属性,指定focus时的光标位置
|
|
3467
|
+
*/
|
|
3468
|
+
cursor: {
|
|
3469
|
+
type: Number,
|
|
3470
|
+
default: -1
|
|
3471
|
+
},
|
|
3472
|
+
/**
|
|
3473
|
+
* 原生属性,光标起始位置
|
|
3474
|
+
*/
|
|
3475
|
+
selectionStart: {
|
|
3476
|
+
type: Number,
|
|
3477
|
+
default: -1
|
|
3478
|
+
},
|
|
3479
|
+
/**
|
|
3480
|
+
* 原生属性,光标结束位置
|
|
3481
|
+
*/
|
|
3482
|
+
selectionEnd: {
|
|
3483
|
+
type: Number,
|
|
3484
|
+
default: -1
|
|
3485
|
+
},
|
|
3486
|
+
/**
|
|
3487
|
+
* 原生属性,键盘弹起时,是否自动上推页面
|
|
3488
|
+
*/
|
|
3489
|
+
adjustPosition: {
|
|
3490
|
+
type: Boolean,
|
|
3491
|
+
default: !0
|
|
3492
|
+
},
|
|
3493
|
+
/**
|
|
3494
|
+
* 设置左侧标题
|
|
3495
|
+
*/
|
|
3496
|
+
label: {
|
|
3497
|
+
type: String,
|
|
3498
|
+
default: ""
|
|
3499
|
+
},
|
|
3500
|
+
/**
|
|
3501
|
+
* 设置输入框大小
|
|
3502
|
+
*/
|
|
3503
|
+
size: {
|
|
3504
|
+
type: String,
|
|
3505
|
+
default: "",
|
|
3506
|
+
validator: (r) => ["", "large"].includes(r)
|
|
3507
|
+
},
|
|
3508
|
+
/**
|
|
3509
|
+
* 设置输入框错误状态,错误状态时为红色
|
|
3510
|
+
*/
|
|
3511
|
+
error: {
|
|
3512
|
+
type: Boolean,
|
|
3513
|
+
default: !1
|
|
3514
|
+
},
|
|
3515
|
+
/**
|
|
3516
|
+
* 当有label属性时,设置标题和输入框垂直居中
|
|
3517
|
+
*/
|
|
3518
|
+
center: {
|
|
3519
|
+
type: Boolean,
|
|
3520
|
+
default: !1
|
|
3521
|
+
},
|
|
3522
|
+
/**
|
|
3523
|
+
* 设置左侧标题宽度
|
|
3524
|
+
*/
|
|
3525
|
+
labelWidth: {
|
|
3526
|
+
type: String,
|
|
3527
|
+
default: "33%"
|
|
3528
|
+
},
|
|
3529
|
+
/**
|
|
3530
|
+
* cell 类型下必填
|
|
3531
|
+
*/
|
|
3532
|
+
required: {
|
|
3533
|
+
type: Boolean,
|
|
3534
|
+
default: !1
|
|
3535
|
+
},
|
|
3536
|
+
/**
|
|
3537
|
+
* 控制是否聚焦时才展示清空按钮
|
|
3538
|
+
*/
|
|
3539
|
+
clearTrigger: {
|
|
3540
|
+
type: String,
|
|
3541
|
+
default: "",
|
|
3542
|
+
validator: (r) => ["", "focus"].includes(r)
|
|
3543
|
+
},
|
|
3544
|
+
/**
|
|
3545
|
+
* 点击清除按钮时是否自动聚焦
|
|
3546
|
+
*/
|
|
3547
|
+
focusWhenClear: {
|
|
3548
|
+
type: Boolean,
|
|
3549
|
+
default: !0
|
|
3550
|
+
},
|
|
3551
|
+
/**
|
|
3552
|
+
* 自定义样式
|
|
3553
|
+
*/
|
|
3554
|
+
customStyle: {
|
|
3555
|
+
type: String,
|
|
3556
|
+
default: ""
|
|
3557
|
+
},
|
|
3558
|
+
/**
|
|
3559
|
+
* 自定义样式类
|
|
3560
|
+
*/
|
|
3561
|
+
customClass: {
|
|
3562
|
+
type: String,
|
|
3563
|
+
default: ""
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur", "confirm", "clear"],
|
|
3567
|
+
setup(r, { expose: g, emit: i }) {
|
|
3568
|
+
const e = r, o = i, a = ref(e.modelValue), c = ref(!1), l = ref(!1), u = ref(null), p = computed(() => e.showPassword && !c.value ? "password" : e.type), h = computed(() => e.clearTrigger !== "focus"), s = computed(() => {
|
|
3569
|
+
const v = {};
|
|
3570
|
+
return e.customStyle && e.customStyle.split(";").filter((E) => E.trim()).forEach((E) => {
|
|
3571
|
+
const [S, $] = E.split(":").map((A) => A.trim());
|
|
3572
|
+
S && $ && (v[S] = $);
|
|
3573
|
+
}), v;
|
|
3574
|
+
}), n = computed(() => ({
|
|
3575
|
+
width: e.labelWidth
|
|
3576
|
+
})), f = (v) => {
|
|
3577
|
+
const _ = v.target.value;
|
|
3578
|
+
a.value = _, o("update:modelValue", _), o("input", v);
|
|
3579
|
+
}, y = (v) => {
|
|
3580
|
+
o("change", v);
|
|
3581
|
+
}, m = (v) => {
|
|
3582
|
+
l.value = !0, o("focus", v);
|
|
3583
|
+
}, d = (v) => {
|
|
3584
|
+
l.value = !1, o("blur", v);
|
|
3585
|
+
}, b = (v) => {
|
|
3586
|
+
o("confirm", v);
|
|
3587
|
+
}, t = () => {
|
|
3588
|
+
a.value = "", o("update:modelValue", ""), o("clear"), e.focusWhenClear && u.value && u.value.focus();
|
|
3589
|
+
}, w = () => {
|
|
3590
|
+
c.value = !c.value;
|
|
3591
|
+
};
|
|
3592
|
+
return watch(() => e.modelValue, (v) => {
|
|
3593
|
+
a.value = v;
|
|
3594
|
+
}), g({
|
|
3595
|
+
focus: () => {
|
|
3596
|
+
var v;
|
|
3597
|
+
return (v = u.value) == null ? void 0 : v.focus();
|
|
3598
|
+
},
|
|
3599
|
+
blur: () => {
|
|
3600
|
+
var v;
|
|
3601
|
+
return (v = u.value) == null ? void 0 : v.blur();
|
|
3602
|
+
}
|
|
3603
|
+
}), (v, _) => (openBlock(), createElementBlock("div", {
|
|
3604
|
+
class: normalizeClass(["hbis-input", [
|
|
3605
|
+
`hbis-input-${r.size}`,
|
|
3606
|
+
{ "hbis-input-disabled": r.disabled },
|
|
3607
|
+
{ "hbis-input-error": r.error },
|
|
3608
|
+
{ "hbis-input-center": r.center }
|
|
3609
|
+
]]),
|
|
3610
|
+
style: normalizeStyle(s.value)
|
|
3611
|
+
}, [
|
|
3612
|
+
r.label ? (openBlock(), createElementBlock("div", {
|
|
3613
|
+
key: 0,
|
|
3614
|
+
class: "hbis-input-label",
|
|
3615
|
+
style: normalizeStyle(n.value)
|
|
3616
|
+
}, [
|
|
3617
|
+
r.required ? (openBlock(), createElementBlock("span", _hoisted_1, "*")) : createCommentVNode("", !0),
|
|
3618
|
+
createTextVNode(" " + toDisplayString(r.label), 1)
|
|
3619
|
+
], 4)) : createCommentVNode("", !0),
|
|
3620
|
+
createElementVNode("div", _hoisted_2, [
|
|
3621
|
+
r.prefixIcon || v.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
3622
|
+
renderSlot(v.$slots, "prefix", {}, () => [
|
|
3623
|
+
r.prefixIcon ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(r.prefixIcon), 1)) : createCommentVNode("", !0)
|
|
3624
|
+
], !0)
|
|
3625
|
+
])) : createCommentVNode("", !0),
|
|
3626
|
+
r.type !== "textarea" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
3627
|
+
key: 1,
|
|
3628
|
+
type: p.value,
|
|
3629
|
+
"onUpdate:modelValue": _[0] || (_[0] = (E) => a.value = E),
|
|
3630
|
+
placeholder: r.placeholder,
|
|
3631
|
+
disabled: r.disabled,
|
|
3632
|
+
readonly: r.readonly,
|
|
3633
|
+
maxlength: r.maxlength,
|
|
3634
|
+
"placeholder-style": r.placeholderStyle,
|
|
3635
|
+
"placeholder-class": r.placeholderClass,
|
|
3636
|
+
focus: r.focus,
|
|
3637
|
+
"cursor-spacing": r.cursorSpacing,
|
|
3638
|
+
cursor: r.cursor,
|
|
3639
|
+
"selection-start": r.selectionStart,
|
|
3640
|
+
"selection-end": r.selectionEnd,
|
|
3641
|
+
"adjust-position": r.adjustPosition,
|
|
3642
|
+
"confirm-type": r.confirmType,
|
|
3643
|
+
"confirm-hold": r.confirmHold,
|
|
3644
|
+
"always-embed": r.alwaysEmbed,
|
|
3645
|
+
onInput: f,
|
|
3646
|
+
onChange: y,
|
|
3647
|
+
onFocus: m,
|
|
3648
|
+
onBlur: d,
|
|
3649
|
+
onConfirm: b,
|
|
3650
|
+
class: "hbis-input-field"
|
|
3651
|
+
}, null, 40, _hoisted_5)), [
|
|
3652
|
+
[vModelDynamic, a.value]
|
|
3653
|
+
]) : createCommentVNode("", !0),
|
|
3654
|
+
r.suffixIcon || v.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
3655
|
+
renderSlot(v.$slots, "suffix", {}, () => [
|
|
3656
|
+
r.suffixIcon ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(r.suffixIcon), 1)) : createCommentVNode("", !0)
|
|
3657
|
+
], !0)
|
|
3658
|
+
])) : createCommentVNode("", !0),
|
|
3659
|
+
r.showPassword ? (openBlock(), createElementBlock("div", {
|
|
3660
|
+
key: 3,
|
|
3661
|
+
class: "hbis-input-password-toggle",
|
|
3662
|
+
onClick: w
|
|
3663
|
+
}, [
|
|
3664
|
+
createElementVNode("span", _hoisted_8, toDisplayString(c.value ? "👁️" : "👁️🗨️"), 1)
|
|
3665
|
+
])) : createCommentVNode("", !0),
|
|
3666
|
+
r.clearable && (h.value || r.clearTrigger === "focus" && l.value) && a.value ? (openBlock(), createElementBlock("div", {
|
|
3667
|
+
key: 4,
|
|
3668
|
+
class: "hbis-input-clear",
|
|
3669
|
+
onClick: t
|
|
3670
|
+
}, [..._[1] || (_[1] = [
|
|
3671
|
+
createElementVNode("span", { class: "hbis-input-icon" }, "✕", -1)
|
|
3672
|
+
])])) : createCommentVNode("", !0)
|
|
3673
|
+
]),
|
|
3674
|
+
r.showWordLimit && r.maxlength ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(a.value.length) + "/" + toDisplayString(r.maxlength), 1)) : createCommentVNode("", !0)
|
|
3675
|
+
], 6));
|
|
3676
|
+
}
|
|
3677
|
+
}, hbisInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4c67f39f"]]);
|
|
2466
3678
|
export {
|
|
2467
3679
|
C1,
|
|
2468
3680
|
C2,
|
|
@@ -2472,13 +3684,20 @@ export {
|
|
|
2472
3684
|
HbisWaterfall,
|
|
2473
3685
|
HbisAutoScrollList as hbisAutoScrollList,
|
|
2474
3686
|
hbisBubbleBox,
|
|
3687
|
+
hbisCheckbox,
|
|
3688
|
+
hbisCheckboxGroup,
|
|
2475
3689
|
hbisDateStrip,
|
|
2476
3690
|
hbisDropdownSelect as hbisDropDownSelect,
|
|
2477
3691
|
hbisEmpty,
|
|
3692
|
+
hbisInput,
|
|
2478
3693
|
hbisLoading,
|
|
3694
|
+
hbisNavbar,
|
|
2479
3695
|
hbisPasswordInput,
|
|
2480
|
-
|
|
2481
|
-
_sfc_main$
|
|
3696
|
+
hbisPopup,
|
|
3697
|
+
_sfc_main$i as hbisPreviewImage,
|
|
3698
|
+
_sfc_main$c as hbisSearchInput,
|
|
3699
|
+
hbisSegmented,
|
|
3700
|
+
hbisShareSheet,
|
|
2482
3701
|
HbisSmsInput as hbisSmsInput,
|
|
2483
3702
|
HbisSvgaPlayer as hbisSvgaPlayer,
|
|
2484
3703
|
hbisSwiper,
|