focusin-mini-ui 1.0.0 → 1.0.2
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/FocusinMiniUi.es.js +130 -311
- package/dist/FocusinMiniUi.umd.js +1 -1
- package/dist/style.css +1 -1
- package/index.ts +6 -0
- package/package.json +37 -34
- package/packages/fs-button/index.scss +1 -0
- package/packages/{CommonWdButton → fs-button}/index.vue +4 -1
- package/packages/fs-demo/index.scss +0 -0
- package/packages/fs-demo/index.vue +8 -0
- package/packages/index.js +4 -10
- package/style.scss +225 -0
- package/utils/base64.ts +30 -0
- package/utils/common.ts +749 -0
- package/packages/CommonButton/context.ts +0 -20
- package/packages/CommonButton/index.vue +0 -111
- package/packages/CommonButton/sButton.vue +0 -38
- package/packages/CommonCollapse/index.vue +0 -113
- package/packages/CommonEmpty/index.vue +0 -31
- package/packages/CommonForm/index.vue +0 -752
package/dist/FocusinMiniUi.es.js
CHANGED
|
@@ -1,265 +1,85 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { mode: i, onClick: o } = inject(D), { option: s } = t, n = () => {
|
|
9
|
-
console.log("onClick"), o(i, s);
|
|
10
|
-
};
|
|
11
|
-
return (c, l) => (m(), v("view", {
|
|
12
|
-
class: $(["button-item w-full", { active: c.option.isActive }]),
|
|
13
|
-
onTap: n
|
|
14
|
-
}, G(c.option.label), 35));
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
const y = (t, i) => {
|
|
18
|
-
const o = t.__vccOpts || t;
|
|
19
|
-
for (const [s, n] of i)
|
|
20
|
-
o[s] = n;
|
|
21
|
-
return o;
|
|
22
|
-
}, ae = /* @__PURE__ */ y(se, [["__scopeId", "data-v-3e8a5cc8"]]), ie = { class: "common-button grid grid-cols-3" }, le = /* @__PURE__ */ _({
|
|
23
|
-
__name: "index",
|
|
24
|
-
props: {
|
|
25
|
-
mode: { default: "single" },
|
|
26
|
-
options: { default: () => [] },
|
|
27
|
-
modelValue: {}
|
|
28
|
-
},
|
|
29
|
-
emits: ["update:modelValue"],
|
|
30
|
-
setup(t, { emit: i }) {
|
|
31
|
-
const o = t, s = i, n = ref(
|
|
32
|
-
o.options.map((l) => ({ ...l, isActive: !1 }))
|
|
33
|
-
), c = (l, d) => {
|
|
34
|
-
if (console.log("onClick"), l === "single") {
|
|
35
|
-
n.value.forEach((r) => {
|
|
36
|
-
r.value === d.value ? r.isActive = !r.isActive : r.isActive = !1;
|
|
37
|
-
});
|
|
38
|
-
const a = n.value.find((r) => r.isActive);
|
|
39
|
-
a ? s("update:modelValue", a.value) : s("update:modelValue", null);
|
|
40
|
-
} else {
|
|
41
|
-
n.value.forEach((r) => {
|
|
42
|
-
r.value === d.value && (r.isActive = !r.isActive);
|
|
43
|
-
});
|
|
44
|
-
const a = n.value.filter((r) => r.isActive);
|
|
45
|
-
s(
|
|
46
|
-
"update:modelValue",
|
|
47
|
-
a.map((r) => r.value)
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return provide(D, {
|
|
52
|
-
mode: o.mode,
|
|
53
|
-
onClick: c
|
|
54
|
-
}), watch(
|
|
55
|
-
() => o.options,
|
|
56
|
-
() => {
|
|
57
|
-
n.value = o.options.map((l) => ({ ...l, isActive: !1 })), console.log(o.modelValue);
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
deep: !0
|
|
61
|
-
}
|
|
62
|
-
), watch(
|
|
63
|
-
() => o.modelValue,
|
|
64
|
-
(l, d) => {
|
|
65
|
-
console.log("props.modelValue", l, d, n.value), o.mode === "single" ? n.value.forEach((a) => {
|
|
66
|
-
a.value === l ? a.isActive = !0 : a.isActive = !1;
|
|
67
|
-
}) : Array.isArray(l) && n.value.forEach((a) => {
|
|
68
|
-
l.includes(a.value) ? a.isActive = !0 : a.isActive = !1;
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
immediate: !0
|
|
73
|
-
}
|
|
74
|
-
), (l, d) => (m(), v("view", ie, [
|
|
75
|
-
(m(!0), v(Y, null, Z(I(n), (a) => (m(), T(ae, {
|
|
76
|
-
key: a.value,
|
|
77
|
-
option: a
|
|
78
|
-
}, null, 8, ["option"]))), 128))
|
|
79
|
-
]));
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
const j = /* @__PURE__ */ y(le, [["__scopeId", "data-v-ee7334b9"]]), re = (t) => (ee("data-v-60a05d39"), t = t(), te(), t), ce = /* @__PURE__ */ re(() => /* @__PURE__ */ p("div", { class: "hr" }, null, -1)), de = { class: "titleCenter" }, ue = { class: "icon" }, pe = /* @__PURE__ */ _({
|
|
83
|
-
__name: "index",
|
|
84
|
-
props: {
|
|
85
|
-
title: {
|
|
86
|
-
type: String,
|
|
87
|
-
default: ""
|
|
88
|
-
},
|
|
89
|
-
fold: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: !0
|
|
92
|
-
},
|
|
93
|
-
isFold: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: !0
|
|
96
|
-
},
|
|
97
|
-
hasPadding: {
|
|
98
|
-
type: Boolean,
|
|
99
|
-
default: !1
|
|
100
|
-
},
|
|
101
|
-
contentStyle: {
|
|
102
|
-
type: Object,
|
|
103
|
-
default: () => ({})
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
setup(t) {
|
|
107
|
-
const i = t, o = k(!0);
|
|
108
|
-
O(
|
|
109
|
-
() => i.isFold,
|
|
110
|
-
(n) => {
|
|
111
|
-
o.value = n;
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
immediate: !0,
|
|
115
|
-
deep: !0
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
const s = () => {
|
|
119
|
-
o.value = !o.value;
|
|
120
|
-
};
|
|
121
|
-
return (n, c) => {
|
|
122
|
-
const l = E("wd-icon");
|
|
123
|
-
return m(), v("div", {
|
|
124
|
-
class: $(["zCard", { isOpen: o.value, "has-padding": t.hasPadding }])
|
|
125
|
-
}, [
|
|
126
|
-
p("div", {
|
|
127
|
-
class: $(["title", { "has-padding": !t.hasPadding }]),
|
|
128
|
-
onClick: s
|
|
129
|
-
}, [
|
|
130
|
-
ce,
|
|
131
|
-
p("p", null, G(t.title), 1),
|
|
132
|
-
p("div", de, [
|
|
133
|
-
A(n.$slots, "titleCenter", {}, void 0, !0)
|
|
134
|
-
]),
|
|
135
|
-
A(n.$slots, "right", {}, void 0, !0),
|
|
136
|
-
M(p("div", ue, [
|
|
137
|
-
x(l, {
|
|
138
|
-
name: "arrow-up",
|
|
139
|
-
color: "rgba(145, 152, 170, 1)",
|
|
140
|
-
size: "18px"
|
|
141
|
-
})
|
|
142
|
-
], 512), [
|
|
143
|
-
[F, t.fold]
|
|
144
|
-
])
|
|
145
|
-
], 2),
|
|
146
|
-
M(p("div", {
|
|
147
|
-
class: "content",
|
|
148
|
-
style: z(t.contentStyle)
|
|
149
|
-
}, [
|
|
150
|
-
A(n.$slots, "default", {}, void 0, !0)
|
|
151
|
-
], 4), [
|
|
152
|
-
[F, o.value]
|
|
153
|
-
])
|
|
154
|
-
], 2);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
const L = /* @__PURE__ */ y(pe, [["__scopeId", "data-v-60a05d39"]]), me = /* @__PURE__ */ _({
|
|
159
|
-
__name: "index",
|
|
160
|
-
props: {
|
|
161
|
-
tip: {
|
|
162
|
-
type: String,
|
|
163
|
-
default: "暂无内容"
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
setup(t) {
|
|
167
|
-
const i = {}.VITE_BASE_OSS + "login/empty.svg", o = t, s = computed(() => o.tip);
|
|
168
|
-
return (n, c) => {
|
|
169
|
-
const l = E("wd-status-tip");
|
|
170
|
-
return m(), T(l, {
|
|
171
|
-
class: "common-empty",
|
|
172
|
-
"image-size": {
|
|
173
|
-
height: "320rpx",
|
|
174
|
-
width: "320rpx"
|
|
175
|
-
},
|
|
176
|
-
image: i,
|
|
177
|
-
tip: I(s)
|
|
178
|
-
}, null, 8, ["tip"]);
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
const N = /* @__PURE__ */ y(me, [["__scopeId", "data-v-cf5f4d86"]]), V = (t) => t != null;
|
|
183
|
-
function fe(t, i, o = {}) {
|
|
184
|
-
let s = null, n, c, l;
|
|
185
|
-
const d = V(o.leading) ? o.leading : !1, a = V(o.trailing) ? o.trailing : !0;
|
|
186
|
-
function r() {
|
|
187
|
-
n !== void 0 && (l = t.apply(c, n), n = void 0);
|
|
1
|
+
import { defineComponent as D, ref as k, computed as L, watch as N, resolveComponent as O, openBlock as S, createElementBlock as P, normalizeStyle as _, normalizeClass as R, unref as z, createElementVNode as C, createBlock as V, createCommentVNode as j, renderSlot as q } from "vue";
|
|
2
|
+
const T = (n) => n != null;
|
|
3
|
+
function H(n, s, t = {}) {
|
|
4
|
+
let o = null, a, u, d;
|
|
5
|
+
const c = T(t.leading) ? t.leading : !1, r = T(t.trailing) ? t.trailing : !0;
|
|
6
|
+
function g() {
|
|
7
|
+
a !== void 0 && (d = n.apply(u, a), a = void 0);
|
|
188
8
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
9
|
+
function m() {
|
|
10
|
+
o = setTimeout(() => {
|
|
11
|
+
o = null, r && g();
|
|
12
|
+
}, s);
|
|
193
13
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
14
|
+
function h() {
|
|
15
|
+
o !== null && (clearTimeout(o), o = null);
|
|
196
16
|
}
|
|
197
|
-
function
|
|
198
|
-
return
|
|
17
|
+
function y(...v) {
|
|
18
|
+
return a = v, u = this, o === null ? (c && g(), m()) : r && (h(), m()), d;
|
|
199
19
|
}
|
|
200
|
-
return
|
|
20
|
+
return y;
|
|
201
21
|
}
|
|
202
|
-
const
|
|
203
|
-
let
|
|
204
|
-
for (let
|
|
205
|
-
const [
|
|
206
|
-
|
|
22
|
+
const b = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"], A = (n) => n.replace(/[+/]/g, (s) => s === "+" ? "-" : "_").replace(/=+\$/m, ""), J = (n, s = !1) => {
|
|
23
|
+
let t = "";
|
|
24
|
+
for (let o = 0, a = n.length; o < a; o += 3) {
|
|
25
|
+
const [u, d, c] = [n[o], n[o + 1], n[o + 2]], r = u << 16 | d << 8 | c;
|
|
26
|
+
t += b[r >>> 18], t += b[r >>> 12 & 63], t += typeof d < "u" ? b[r >>> 6 & 63] : "=", t += typeof c < "u" ? b[r & 63] : "=";
|
|
207
27
|
}
|
|
208
|
-
return
|
|
209
|
-
},
|
|
210
|
-
if (
|
|
28
|
+
return s ? A(t) : t;
|
|
29
|
+
}, K = typeof btoa == "function" ? (n) => btoa(n) : (n) => {
|
|
30
|
+
if (n.charCodeAt(0) > 255)
|
|
211
31
|
throw new RangeError("The string contains invalid characters.");
|
|
212
|
-
return
|
|
213
|
-
},
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
return
|
|
32
|
+
return J(Uint8Array.from(n, (s) => s.charCodeAt(0)));
|
|
33
|
+
}, Q = (n) => unescape(encodeURIComponent(n));
|
|
34
|
+
function W(n, s = !1) {
|
|
35
|
+
const t = K(Q(n));
|
|
36
|
+
return s ? A(t) : t;
|
|
217
37
|
}
|
|
218
|
-
const
|
|
38
|
+
const p = (n) => ({
|
|
219
39
|
type: Boolean,
|
|
220
|
-
default:
|
|
221
|
-
}),
|
|
40
|
+
default: n
|
|
41
|
+
}), f = (n) => ({
|
|
222
42
|
type: String,
|
|
223
|
-
default:
|
|
224
|
-
}),
|
|
43
|
+
default: n
|
|
44
|
+
}), X = {
|
|
225
45
|
/**
|
|
226
46
|
* 自定义根节点样式
|
|
227
47
|
*/
|
|
228
|
-
customStyle:
|
|
48
|
+
customStyle: f(""),
|
|
229
49
|
/**
|
|
230
50
|
* 自定义根节点样式类
|
|
231
51
|
*/
|
|
232
|
-
customClass:
|
|
233
|
-
},
|
|
234
|
-
...
|
|
52
|
+
customClass: f("")
|
|
53
|
+
}, Y = {
|
|
54
|
+
...X,
|
|
235
55
|
/**
|
|
236
56
|
* 幽灵按钮
|
|
237
57
|
*/
|
|
238
|
-
plain:
|
|
58
|
+
plain: p(!1),
|
|
239
59
|
/**
|
|
240
60
|
* 圆角按钮
|
|
241
61
|
*/
|
|
242
|
-
round:
|
|
62
|
+
round: p(!0),
|
|
243
63
|
/**
|
|
244
64
|
* 禁用按钮
|
|
245
65
|
*/
|
|
246
|
-
disabled:
|
|
66
|
+
disabled: p(!1),
|
|
247
67
|
/**
|
|
248
68
|
* 是否细边框
|
|
249
69
|
*/
|
|
250
|
-
hairline:
|
|
70
|
+
hairline: p(!1),
|
|
251
71
|
/**
|
|
252
72
|
* 块状按钮
|
|
253
73
|
*/
|
|
254
|
-
block:
|
|
74
|
+
block: p(!1),
|
|
255
75
|
/**
|
|
256
76
|
* 按钮类型,可选值:primary / success / info / warning / error / text / icon
|
|
257
77
|
*/
|
|
258
|
-
type:
|
|
78
|
+
type: f("primary"),
|
|
259
79
|
/**
|
|
260
80
|
* 按钮尺寸,可选值:small / medium / large
|
|
261
81
|
*/
|
|
262
|
-
size:
|
|
82
|
+
size: f("medium"),
|
|
263
83
|
/**
|
|
264
84
|
* 图标类名
|
|
265
85
|
*/
|
|
@@ -267,11 +87,11 @@ const g = (t) => ({
|
|
|
267
87
|
/**
|
|
268
88
|
* 类名前缀,用于使用自定义图标,用法参考Icon组件
|
|
269
89
|
*/
|
|
270
|
-
classPrefix:
|
|
90
|
+
classPrefix: f("wd-icon"),
|
|
271
91
|
/**
|
|
272
92
|
* 加载中按钮
|
|
273
93
|
*/
|
|
274
|
-
loading:
|
|
94
|
+
loading: p(!1),
|
|
275
95
|
/**
|
|
276
96
|
* 加载图标颜色
|
|
277
97
|
*/
|
|
@@ -321,12 +141,12 @@ const g = (t) => ({
|
|
|
321
141
|
* 可选值:'phoneNumber' | 'userInfo'
|
|
322
142
|
*/
|
|
323
143
|
scope: String
|
|
324
|
-
},
|
|
144
|
+
}, Z = ["id", "hover-class", "hover-start-time", "hover-stay-time", "open-type", "send-message-title", "send-message-path", "send-message-img", "app-parameter", "show-message-card", "session-from", "lang", "hover-stop-propagation", "scope"], x = { class: "wd-button__content" }, ee = {
|
|
325
145
|
key: 0,
|
|
326
146
|
class: "wd-button__loading"
|
|
327
|
-
},
|
|
147
|
+
}, ne = { class: "wd-button__text" }, oe = /* @__PURE__ */ D({
|
|
328
148
|
__name: "index",
|
|
329
|
-
props:
|
|
149
|
+
props: Y,
|
|
330
150
|
emits: [
|
|
331
151
|
"click",
|
|
332
152
|
"getuserinfo",
|
|
@@ -338,81 +158,81 @@ const g = (t) => ({
|
|
|
338
158
|
"chooseavatar",
|
|
339
159
|
"agreeprivacyauthorization"
|
|
340
160
|
],
|
|
341
|
-
setup(
|
|
342
|
-
const
|
|
343
|
-
console.log("customClass value:",
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
() =>
|
|
161
|
+
setup(n, { emit: s }) {
|
|
162
|
+
const t = (e = "#4D80F0", l = !0) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${l ? e : "#fff"}" offset="0%" stop-opacity="0"/><stop stop-color="${l ? e : "#fff"}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${l ? "#fff" : e}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`, o = n, a = s;
|
|
163
|
+
console.log("customClass value:", o.customClass);
|
|
164
|
+
const u = k(20), d = k(70), c = k(""), r = L(() => `background-image: url(${c.value});`);
|
|
165
|
+
N(
|
|
166
|
+
() => o.loading,
|
|
347
167
|
() => {
|
|
348
|
-
|
|
168
|
+
F();
|
|
349
169
|
},
|
|
350
170
|
{ deep: !0, immediate: !0 }
|
|
351
171
|
);
|
|
352
|
-
const
|
|
353
|
-
!
|
|
172
|
+
const g = H((e) => {
|
|
173
|
+
!o.disabled && !o.loading && a("click", e);
|
|
354
174
|
}, 1e3, { leading: !0, trailing: !1 });
|
|
355
|
-
function
|
|
356
|
-
|
|
175
|
+
function m(e) {
|
|
176
|
+
o.scope === "phoneNumber" ? v(e) : o.scope === "userInfo" && h(e);
|
|
357
177
|
}
|
|
358
|
-
function
|
|
359
|
-
|
|
178
|
+
function h(e) {
|
|
179
|
+
a("getuserinfo", e.detail);
|
|
360
180
|
}
|
|
361
|
-
function
|
|
362
|
-
|
|
181
|
+
function y(e) {
|
|
182
|
+
a("contact", e.detail);
|
|
363
183
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
184
|
+
function v(e) {
|
|
185
|
+
a("getphonenumber", e.detail);
|
|
366
186
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
187
|
+
function M(e) {
|
|
188
|
+
a("error", e.detail);
|
|
369
189
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
190
|
+
function B(e) {
|
|
191
|
+
a("launchapp", e.detail);
|
|
372
192
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
193
|
+
function $(e) {
|
|
194
|
+
a("opensetting", e.detail);
|
|
375
195
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
196
|
+
function G(e) {
|
|
197
|
+
a("chooseavatar", e.detail);
|
|
378
198
|
}
|
|
379
|
-
function
|
|
380
|
-
|
|
199
|
+
function E(e) {
|
|
200
|
+
a("agreeprivacyauthorization", e.detail);
|
|
381
201
|
}
|
|
382
|
-
function
|
|
383
|
-
const { loadingColor: e, type:
|
|
384
|
-
let
|
|
385
|
-
if (!
|
|
386
|
-
switch (
|
|
202
|
+
function F() {
|
|
203
|
+
const { loadingColor: e, type: l, plain: w } = o;
|
|
204
|
+
let i = e;
|
|
205
|
+
if (!i)
|
|
206
|
+
switch (l) {
|
|
387
207
|
case "primary":
|
|
388
|
-
|
|
208
|
+
i = "#4D80F0";
|
|
389
209
|
break;
|
|
390
210
|
case "success":
|
|
391
|
-
|
|
211
|
+
i = "#34d19d";
|
|
392
212
|
break;
|
|
393
213
|
case "info":
|
|
394
|
-
|
|
214
|
+
i = "#333";
|
|
395
215
|
break;
|
|
396
216
|
case "warning":
|
|
397
|
-
|
|
217
|
+
i = "#f0883a";
|
|
398
218
|
break;
|
|
399
219
|
case "error":
|
|
400
|
-
|
|
220
|
+
i = "#fa4350";
|
|
401
221
|
break;
|
|
402
222
|
case "default":
|
|
403
|
-
|
|
223
|
+
i = "#333";
|
|
404
224
|
break;
|
|
405
225
|
}
|
|
406
|
-
const
|
|
407
|
-
|
|
226
|
+
const U = t(i, !w);
|
|
227
|
+
c.value = `"data:image/svg+xml;base64,${W(U)}"`;
|
|
408
228
|
}
|
|
409
|
-
return (e,
|
|
410
|
-
const
|
|
411
|
-
return
|
|
229
|
+
return (e, l) => {
|
|
230
|
+
const w = O("wd-icon");
|
|
231
|
+
return S(), P("button", {
|
|
412
232
|
id: e.buttonId,
|
|
413
233
|
"hover-class": `${e.disabled || e.loading ? "" : "wd-button--active"}`,
|
|
414
|
-
style:
|
|
415
|
-
class:
|
|
234
|
+
style: _(e.customStyle),
|
|
235
|
+
class: R([
|
|
416
236
|
"wd-button",
|
|
417
237
|
`is-${e.type}`,
|
|
418
238
|
`is-${e.size}`,
|
|
@@ -426,8 +246,8 @@ const g = (t) => ({
|
|
|
426
246
|
},
|
|
427
247
|
e.customClass
|
|
428
248
|
]),
|
|
429
|
-
"hover-start-time":
|
|
430
|
-
"hover-stay-time":
|
|
249
|
+
"hover-start-time": u.value,
|
|
250
|
+
"hover-stay-time": d.value,
|
|
431
251
|
"open-type": e.disabled || e.loading ? void 0 : e.openType,
|
|
432
252
|
"send-message-title": e.sendMessageTitle,
|
|
433
253
|
"send-message-path": e.sendMessagePath,
|
|
@@ -438,53 +258,52 @@ const g = (t) => ({
|
|
|
438
258
|
lang: e.lang,
|
|
439
259
|
"hover-stop-propagation": e.hoverStopPropagation,
|
|
440
260
|
scope: e.scope,
|
|
441
|
-
onClick:
|
|
442
|
-
(...
|
|
443
|
-
"on:getAuthorize":
|
|
444
|
-
onGetuserinfo:
|
|
445
|
-
onContact:
|
|
446
|
-
onGetphonenumber:
|
|
447
|
-
onError:
|
|
448
|
-
onLaunchapp:
|
|
449
|
-
onOpensetting:
|
|
450
|
-
onChooseavatar:
|
|
451
|
-
onAgreeprivacyauthorization:
|
|
261
|
+
onClick: l[0] || (l[0] = //@ts-ignore
|
|
262
|
+
(...i) => z(g) && z(g)(...i)),
|
|
263
|
+
"on:getAuthorize": m,
|
|
264
|
+
onGetuserinfo: h,
|
|
265
|
+
onContact: y,
|
|
266
|
+
onGetphonenumber: v,
|
|
267
|
+
onError: M,
|
|
268
|
+
onLaunchapp: B,
|
|
269
|
+
onOpensetting: $,
|
|
270
|
+
onChooseavatar: G,
|
|
271
|
+
onAgreeprivacyauthorization: E
|
|
452
272
|
}, [
|
|
453
|
-
|
|
454
|
-
e.loading ? (
|
|
455
|
-
|
|
273
|
+
C("view", x, [
|
|
274
|
+
e.loading ? (S(), P("view", ee, [
|
|
275
|
+
C("view", {
|
|
456
276
|
class: "wd-button__loading-svg",
|
|
457
|
-
style:
|
|
277
|
+
style: _(r.value)
|
|
458
278
|
}, null, 4)
|
|
459
|
-
])) : e.icon ? (
|
|
279
|
+
])) : e.icon ? (S(), V(w, {
|
|
460
280
|
key: 1,
|
|
461
281
|
"custom-class": "wd-button__icon",
|
|
462
282
|
name: e.icon,
|
|
463
283
|
classPrefix: e.classPrefix
|
|
464
|
-
}, null, 8, ["name", "classPrefix"])) :
|
|
465
|
-
|
|
466
|
-
|
|
284
|
+
}, null, 8, ["name", "classPrefix"])) : j("", !0),
|
|
285
|
+
C("view", ne, [
|
|
286
|
+
q(e.$slots, "default", {}, void 0, !0)
|
|
467
287
|
])
|
|
468
288
|
])
|
|
469
|
-
], 46,
|
|
289
|
+
], 46, Z);
|
|
470
290
|
};
|
|
471
291
|
}
|
|
472
292
|
});
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
293
|
+
const te = (n, s) => {
|
|
294
|
+
const t = n.__vccOpts || n;
|
|
295
|
+
for (const [o, a] of s)
|
|
296
|
+
t[o] = a;
|
|
297
|
+
return t;
|
|
298
|
+
}, I = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-1e123813"]]), ae = [I], se = (n) => {
|
|
299
|
+
ae.forEach((s) => {
|
|
300
|
+
n.component(s.name, s);
|
|
476
301
|
});
|
|
477
|
-
},
|
|
478
|
-
install:
|
|
479
|
-
|
|
480
|
-
CommonCollapse: L,
|
|
481
|
-
CommonEmpty: N,
|
|
482
|
-
CommonWdButton: K
|
|
302
|
+
}, re = {
|
|
303
|
+
install: se,
|
|
304
|
+
FsButton: I
|
|
483
305
|
};
|
|
484
306
|
export {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
N as CommonEmpty,
|
|
488
|
-
K as CommonWdButton,
|
|
489
|
-
Be as default
|
|
307
|
+
I as FsButton,
|
|
308
|
+
re as default
|
|
490
309
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(d=typeof globalThis<"u"?globalThis:d||self,o(d.FocusinMiniUi={},d.Vue))})(this,function(d,o){"use strict";const P=n=>n!=null;function T(n,i,a={}){let t=null,s,g,u;const p=P(a.leading)?a.leading:!1,l=P(a.trailing)?a.trailing:!0;function h(){s!==void 0&&(u=n.apply(g,s),s=void 0)}function y(){t=setTimeout(()=>{t=null,l&&h()},i)}function v(){t!==null&&(clearTimeout(t),t=null)}function w(...k){return s=k,g=this,t===null?(p&&h(),y()):l&&(v(),y()),u}return w}const b=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],_=n=>n.replace(/[+/]/g,i=>i==="+"?"-":"_").replace(/=+\$/m,""),z=(n,i=!1)=>{let a="";for(let t=0,s=n.length;t<s;t+=3){const[g,u,p]=[n[t],n[t+1],n[t+2]],l=g<<16|u<<8|p;a+=b[l>>>18],a+=b[l>>>12&63],a+=typeof u<"u"?b[l>>>6&63]:"=",a+=typeof p<"u"?b[l&63]:"="}return i?_(a):a},B=typeof btoa=="function"?n=>btoa(n):n=>{if(n.charCodeAt(0)>255)throw new RangeError("The string contains invalid characters.");return z(Uint8Array.from(n,i=>i.charCodeAt(0)))},M=n=>unescape(encodeURIComponent(n));function A(n,i=!1){const a=B(M(n));return i?_(a):a}const f=n=>({type:Boolean,default:n}),m=n=>({type:String,default:n}),I={...{customStyle:m(""),customClass:m("")},plain:f(!1),round:f(!0),disabled:f(!1),hairline:f(!1),block:f(!1),type:m("primary"),size:m("medium"),icon:String,classPrefix:m("wd-icon"),loading:f(!1),loadingColor:String,openType:String,hoverStopPropagation:Boolean,lang:String,sessionFrom:String,sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,appParameter:String,showMessageCard:Boolean,buttonId:String,scope:String},E=["id","hover-class","hover-start-time","hover-stay-time","open-type","send-message-title","send-message-path","send-message-img","app-parameter","show-message-card","session-from","lang","hover-stop-propagation","scope"],$={class:"wd-button__content"},F={key:0,class:"wd-button__loading"},G={class:"wd-button__text"},N=o.defineComponent({__name:"index",props:I,emits:["click","getuserinfo","contact","getphonenumber","error","launchapp","opensetting","chooseavatar","agreeprivacyauthorization"],setup(n,{emit:i}){const a=(e="#4D80F0",c=!0)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${c?e:"#fff"}" offset="0%" stop-opacity="0"/><stop stop-color="${c?e:"#fff"}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${c?"#fff":e}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`,t=n,s=i;console.log("customClass value:",t.customClass);const g=o.ref(20),u=o.ref(70),p=o.ref(""),l=o.computed(()=>`background-image: url(${p.value});`);o.watch(()=>t.loading,()=>{q()},{deep:!0,immediate:!0});const h=T(e=>{!t.disabled&&!t.loading&&s("click",e)},1e3,{leading:!0,trailing:!1});function y(e){t.scope==="phoneNumber"?k(e):t.scope==="userInfo"&&v(e)}function v(e){s("getuserinfo",e.detail)}function w(e){s("contact",e.detail)}function k(e){s("getphonenumber",e.detail)}function O(e){s("error",e.detail)}function D(e){s("launchapp",e.detail)}function L(e){s("opensetting",e.detail)}function j(e){s("chooseavatar",e.detail)}function R(e){s("agreeprivacyauthorization",e.detail)}function q(){const{loadingColor:e,type:c,plain:C}=t;let r=e;if(!r)switch(c){case"primary":r="#4D80F0";break;case"success":r="#34d19d";break;case"info":r="#333";break;case"warning":r="#f0883a";break;case"error":r="#fa4350";break;case"default":r="#333";break}const H=a(r,!C);p.value=`"data:image/svg+xml;base64,${A(H)}"`}return(e,c)=>{const C=o.resolveComponent("wd-icon");return o.openBlock(),o.createElementBlock("button",{id:e.buttonId,"hover-class":`${e.disabled||e.loading?"":"wd-button--active"}`,style:o.normalizeStyle(e.customStyle),class:o.normalizeClass(["wd-button",`is-${e.type}`,`is-${e.size}`,{"is-round":e.round,"is-hairline":e.hairline,"is-plain":e.plain,"is-disabled":e.disabled,"is-block":e.block,"is-loading":e.loading},e.customClass]),"hover-start-time":g.value,"hover-stay-time":u.value,"open-type":e.disabled||e.loading?void 0:e.openType,"send-message-title":e.sendMessageTitle,"send-message-path":e.sendMessagePath,"send-message-img":e.sendMessageImg,"app-parameter":e.appParameter,"show-message-card":e.showMessageCard,"session-from":e.sessionFrom,lang:e.lang,"hover-stop-propagation":e.hoverStopPropagation,scope:e.scope,onClick:c[0]||(c[0]=(...r)=>o.unref(h)&&o.unref(h)(...r)),"on:getAuthorize":y,onGetuserinfo:v,onContact:w,onGetphonenumber:k,onError:O,onLaunchapp:D,onOpensetting:L,onChooseavatar:j,onAgreeprivacyauthorization:R},[o.createElementVNode("view",$,[e.loading?(o.openBlock(),o.createElementBlock("view",F,[o.createElementVNode("view",{class:"wd-button__loading-svg",style:o.normalizeStyle(l.value)},null,4)])):e.icon?(o.openBlock(),o.createBlock(C,{key:1,"custom-class":"wd-button__icon",name:e.icon,classPrefix:e.classPrefix},null,8,["name","classPrefix"])):o.createCommentVNode("",!0),o.createElementVNode("view",G,[o.renderSlot(e.$slots,"default",{},void 0,!0)])])],46,E)}}}),K="",S=((n,i)=>{const a=n.__vccOpts||n;for(const[t,s]of i)a[t]=s;return a})(N,[["__scopeId","data-v-1e123813"]]),U=[S],V={install:n=>{U.forEach(i=>{n.component(i.name,i)})},FsButton:S};d.FsButton=S,d.default=V,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|