widget.qw 1.0.75 → 1.0.77
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/.env.development +1 -1
- package/README.md +2 -0
- package/build/style.css +5 -19
- package/build/widget.qw.es.js +1497 -93
- package/build/widget.qw.umd.js +1496 -92
- package/package.json +1 -1
- package/src/components/FilePicker.vue +44 -17
- package/src/components/images_picker.vue +40 -25
- package/src/views/filepicker/index.vue +2 -1
- package/src/views/imagespicker/index.vue +2 -2
package/build/widget.qw.umd.js
CHANGED
|
@@ -4,6 +4,7 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __pow = Math.pow;
|
|
7
8
|
var __defNormalProp = (obj2, key, value) => key in obj2 ? __defProp(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
|
|
8
9
|
var __spreadValues = (a, b) => {
|
|
9
10
|
for (var prop in b || (b = {}))
|
|
@@ -1250,13 +1251,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1250
1251
|
var Axios = Axios_1;
|
|
1251
1252
|
var mergeConfig = mergeConfig$2;
|
|
1252
1253
|
var defaults$3 = defaults_1;
|
|
1253
|
-
function createInstance$1(
|
|
1254
|
-
var context = new Axios(
|
|
1254
|
+
function createInstance$1(defaultConfig2) {
|
|
1255
|
+
var context = new Axios(defaultConfig2);
|
|
1255
1256
|
var instance2 = bind$2(Axios.prototype.request, context);
|
|
1256
1257
|
utils$3.extend(instance2, Axios.prototype, context);
|
|
1257
1258
|
utils$3.extend(instance2, context);
|
|
1258
1259
|
instance2.create = function create(instanceConfig) {
|
|
1259
|
-
return createInstance$1(mergeConfig(
|
|
1260
|
+
return createInstance$1(mergeConfig(defaultConfig2, instanceConfig));
|
|
1260
1261
|
};
|
|
1261
1262
|
return instance2;
|
|
1262
1263
|
}
|
|
@@ -3381,15 +3382,140 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3381
3382
|
type: Boolean,
|
|
3382
3383
|
default: true
|
|
3383
3384
|
};
|
|
3385
|
+
const makeRequiredProp = (type) => ({
|
|
3386
|
+
type,
|
|
3387
|
+
required: true
|
|
3388
|
+
});
|
|
3389
|
+
const makeArrayProp = () => ({
|
|
3390
|
+
type: Array,
|
|
3391
|
+
default: () => []
|
|
3392
|
+
});
|
|
3384
3393
|
const makeNumberProp = (defaultVal) => ({
|
|
3385
3394
|
type: Number,
|
|
3386
3395
|
default: defaultVal
|
|
3387
3396
|
});
|
|
3397
|
+
const makeNumericProp = (defaultVal) => ({
|
|
3398
|
+
type: numericProp,
|
|
3399
|
+
default: defaultVal
|
|
3400
|
+
});
|
|
3388
3401
|
const makeStringProp = (defaultVal) => ({
|
|
3389
3402
|
type: String,
|
|
3390
3403
|
default: defaultVal
|
|
3391
3404
|
});
|
|
3392
3405
|
var inBrowser = typeof window !== "undefined";
|
|
3406
|
+
function raf(fn) {
|
|
3407
|
+
return inBrowser ? requestAnimationFrame(fn) : -1;
|
|
3408
|
+
}
|
|
3409
|
+
function doubleRaf(fn) {
|
|
3410
|
+
raf(() => raf(fn));
|
|
3411
|
+
}
|
|
3412
|
+
var isWindow = (val) => val === window;
|
|
3413
|
+
var makeDOMRect = (width2, height2) => ({
|
|
3414
|
+
top: 0,
|
|
3415
|
+
left: 0,
|
|
3416
|
+
right: width2,
|
|
3417
|
+
bottom: height2,
|
|
3418
|
+
width: width2,
|
|
3419
|
+
height: height2
|
|
3420
|
+
});
|
|
3421
|
+
var useRect = (elementOrRef) => {
|
|
3422
|
+
const element = vue.unref(elementOrRef);
|
|
3423
|
+
if (isWindow(element)) {
|
|
3424
|
+
const width2 = element.innerWidth;
|
|
3425
|
+
const height2 = element.innerHeight;
|
|
3426
|
+
return makeDOMRect(width2, height2);
|
|
3427
|
+
}
|
|
3428
|
+
if (element == null ? void 0 : element.getBoundingClientRect) {
|
|
3429
|
+
return element.getBoundingClientRect();
|
|
3430
|
+
}
|
|
3431
|
+
return makeDOMRect(0, 0);
|
|
3432
|
+
};
|
|
3433
|
+
function useParent(key) {
|
|
3434
|
+
const parent = vue.inject(key, null);
|
|
3435
|
+
if (parent) {
|
|
3436
|
+
const instance2 = vue.getCurrentInstance();
|
|
3437
|
+
const { link, unlink, internalChildren } = parent;
|
|
3438
|
+
link(instance2);
|
|
3439
|
+
vue.onUnmounted(() => unlink(instance2));
|
|
3440
|
+
const index = vue.computed(() => internalChildren.indexOf(instance2));
|
|
3441
|
+
return {
|
|
3442
|
+
parent,
|
|
3443
|
+
index
|
|
3444
|
+
};
|
|
3445
|
+
}
|
|
3446
|
+
return {
|
|
3447
|
+
parent: null,
|
|
3448
|
+
index: vue.ref(-1)
|
|
3449
|
+
};
|
|
3450
|
+
}
|
|
3451
|
+
function flattenVNodes(children) {
|
|
3452
|
+
const result = [];
|
|
3453
|
+
const traverse = (children2) => {
|
|
3454
|
+
if (Array.isArray(children2)) {
|
|
3455
|
+
children2.forEach((child) => {
|
|
3456
|
+
var _a;
|
|
3457
|
+
if (vue.isVNode(child)) {
|
|
3458
|
+
result.push(child);
|
|
3459
|
+
if ((_a = child.component) == null ? void 0 : _a.subTree) {
|
|
3460
|
+
result.push(child.component.subTree);
|
|
3461
|
+
traverse(child.component.subTree.children);
|
|
3462
|
+
}
|
|
3463
|
+
if (child.children) {
|
|
3464
|
+
traverse(child.children);
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
});
|
|
3468
|
+
}
|
|
3469
|
+
};
|
|
3470
|
+
traverse(children);
|
|
3471
|
+
return result;
|
|
3472
|
+
}
|
|
3473
|
+
var findVNodeIndex = (vnodes, vnode) => {
|
|
3474
|
+
const index = vnodes.indexOf(vnode);
|
|
3475
|
+
if (index === -1) {
|
|
3476
|
+
return vnodes.findIndex((item) => vnode.key !== void 0 && vnode.key !== null && item.type === vnode.type && item.key === vnode.key);
|
|
3477
|
+
}
|
|
3478
|
+
return index;
|
|
3479
|
+
};
|
|
3480
|
+
function sortChildren(parent, publicChildren, internalChildren) {
|
|
3481
|
+
const vnodes = flattenVNodes(parent.subTree.children);
|
|
3482
|
+
internalChildren.sort((a, b) => findVNodeIndex(vnodes, a.vnode) - findVNodeIndex(vnodes, b.vnode));
|
|
3483
|
+
const orderedPublicChildren = internalChildren.map((item) => item.proxy);
|
|
3484
|
+
publicChildren.sort((a, b) => {
|
|
3485
|
+
const indexA = orderedPublicChildren.indexOf(a);
|
|
3486
|
+
const indexB = orderedPublicChildren.indexOf(b);
|
|
3487
|
+
return indexA - indexB;
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
function useChildren(key) {
|
|
3491
|
+
const publicChildren = vue.reactive([]);
|
|
3492
|
+
const internalChildren = vue.reactive([]);
|
|
3493
|
+
const parent = vue.getCurrentInstance();
|
|
3494
|
+
const linkChildren = (value) => {
|
|
3495
|
+
const link = (child) => {
|
|
3496
|
+
if (child.proxy) {
|
|
3497
|
+
internalChildren.push(child);
|
|
3498
|
+
publicChildren.push(child.proxy);
|
|
3499
|
+
sortChildren(parent, publicChildren, internalChildren);
|
|
3500
|
+
}
|
|
3501
|
+
};
|
|
3502
|
+
const unlink = (child) => {
|
|
3503
|
+
const index = internalChildren.indexOf(child);
|
|
3504
|
+
publicChildren.splice(index, 1);
|
|
3505
|
+
internalChildren.splice(index, 1);
|
|
3506
|
+
};
|
|
3507
|
+
vue.provide(key, Object.assign({
|
|
3508
|
+
link,
|
|
3509
|
+
unlink,
|
|
3510
|
+
children: publicChildren,
|
|
3511
|
+
internalChildren
|
|
3512
|
+
}, value));
|
|
3513
|
+
};
|
|
3514
|
+
return {
|
|
3515
|
+
children: publicChildren,
|
|
3516
|
+
linkChildren
|
|
3517
|
+
};
|
|
3518
|
+
}
|
|
3393
3519
|
function onMountedOrActivated(hook) {
|
|
3394
3520
|
let mounted;
|
|
3395
3521
|
vue.onMounted(() => {
|
|
@@ -3485,6 +3611,20 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3485
3611
|
}
|
|
3486
3612
|
return root;
|
|
3487
3613
|
}
|
|
3614
|
+
var visibility;
|
|
3615
|
+
function usePageVisibility() {
|
|
3616
|
+
if (!visibility) {
|
|
3617
|
+
visibility = vue.ref("visible");
|
|
3618
|
+
if (inBrowser) {
|
|
3619
|
+
const update = () => {
|
|
3620
|
+
visibility.value = document.hidden ? "hidden" : "visible";
|
|
3621
|
+
};
|
|
3622
|
+
update();
|
|
3623
|
+
window.addEventListener("visibilitychange", update);
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
return visibility;
|
|
3627
|
+
}
|
|
3488
3628
|
isIOS();
|
|
3489
3629
|
const stopPropagation = (event) => event.stopPropagation();
|
|
3490
3630
|
function preventDefault(event, isStopPropagation) {
|
|
@@ -3495,7 +3635,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3495
3635
|
stopPropagation(event);
|
|
3496
3636
|
}
|
|
3497
3637
|
}
|
|
3498
|
-
|
|
3638
|
+
function isHidden(elementRef) {
|
|
3639
|
+
const el = vue.unref(elementRef);
|
|
3640
|
+
if (!el) {
|
|
3641
|
+
return false;
|
|
3642
|
+
}
|
|
3643
|
+
const style = window.getComputedStyle(el);
|
|
3644
|
+
const hidden = style.display === "none";
|
|
3645
|
+
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
3646
|
+
return hidden || parentHidden;
|
|
3647
|
+
}
|
|
3648
|
+
const { width: windowWidth, height: windowHeight } = useWindowSize();
|
|
3499
3649
|
function addUnit(value) {
|
|
3500
3650
|
if (isDef$1(value)) {
|
|
3501
3651
|
return isNumeric(value) ? `${value}px` : String(value);
|
|
@@ -3527,6 +3677,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3527
3677
|
const camelizeRE = /-(\w)/g;
|
|
3528
3678
|
const camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());
|
|
3529
3679
|
const kebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
3680
|
+
const clamp = (num, min2, max2) => Math.min(Math.max(num, min2), max2);
|
|
3530
3681
|
const { hasOwnProperty } = Object.prototype;
|
|
3531
3682
|
function assignKey(to2, from2, key) {
|
|
3532
3683
|
const val = from2[key];
|
|
@@ -3545,7 +3696,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3545
3696
|
});
|
|
3546
3697
|
return to2;
|
|
3547
3698
|
}
|
|
3548
|
-
var stdin_default$
|
|
3699
|
+
var stdin_default$d = {
|
|
3549
3700
|
name: "\u59D3\u540D",
|
|
3550
3701
|
tel: "\u7535\u8BDD",
|
|
3551
3702
|
save: "\u4FDD\u5B58",
|
|
@@ -3609,7 +3760,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3609
3760
|
};
|
|
3610
3761
|
const lang$1 = vue.ref("zh-CN");
|
|
3611
3762
|
const messages = vue.reactive({
|
|
3612
|
-
"zh-CN": stdin_default$
|
|
3763
|
+
"zh-CN": stdin_default$d
|
|
3613
3764
|
});
|
|
3614
3765
|
const Locale$1 = {
|
|
3615
3766
|
messages() {
|
|
@@ -3623,11 +3774,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3623
3774
|
deepAssign(messages, newMessages);
|
|
3624
3775
|
}
|
|
3625
3776
|
};
|
|
3626
|
-
var stdin_default$
|
|
3777
|
+
var stdin_default$c = Locale$1;
|
|
3627
3778
|
function createTranslate(name2) {
|
|
3628
3779
|
const prefix = camelize(name2) + ".";
|
|
3629
3780
|
return (path, ...args) => {
|
|
3630
|
-
const messages2 = stdin_default$
|
|
3781
|
+
const messages2 = stdin_default$c.messages();
|
|
3631
3782
|
const message = get$3(messages2, prefix + path) || get$3(messages2, path);
|
|
3632
3783
|
return isFunction$1(message) ? message(...args) : message;
|
|
3633
3784
|
};
|
|
@@ -3663,6 +3814,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3663
3814
|
];
|
|
3664
3815
|
}
|
|
3665
3816
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
3817
|
+
const LONG_PRESS_START_TIME = 500;
|
|
3666
3818
|
const TAP_OFFSET = 5;
|
|
3667
3819
|
function callInterceptor(interceptor, {
|
|
3668
3820
|
args = [],
|
|
@@ -3700,13 +3852,23 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3700
3852
|
return options;
|
|
3701
3853
|
}
|
|
3702
3854
|
const POPUP_TOGGLE_KEY = Symbol();
|
|
3855
|
+
function onPopupReopen(callback) {
|
|
3856
|
+
const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
|
|
3857
|
+
if (popupToggleStatus) {
|
|
3858
|
+
vue.watch(popupToggleStatus, (show) => {
|
|
3859
|
+
if (show) {
|
|
3860
|
+
callback();
|
|
3861
|
+
}
|
|
3862
|
+
});
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3703
3865
|
function useExpose(apis) {
|
|
3704
3866
|
const instance2 = vue.getCurrentInstance();
|
|
3705
3867
|
if (instance2) {
|
|
3706
3868
|
extend$1(instance2.proxy, apis);
|
|
3707
3869
|
}
|
|
3708
3870
|
}
|
|
3709
|
-
const [name$
|
|
3871
|
+
const [name$b, bem$c] = createNamespace("badge");
|
|
3710
3872
|
const badgeProps = {
|
|
3711
3873
|
dot: Boolean,
|
|
3712
3874
|
max: numericProp,
|
|
@@ -3717,8 +3879,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3717
3879
|
showZero: truthProp,
|
|
3718
3880
|
position: makeStringProp("top-right")
|
|
3719
3881
|
};
|
|
3720
|
-
var stdin_default$
|
|
3721
|
-
name: name$
|
|
3882
|
+
var stdin_default$b = vue.defineComponent({
|
|
3883
|
+
name: name$b,
|
|
3722
3884
|
props: badgeProps,
|
|
3723
3885
|
setup(props, {
|
|
3724
3886
|
slots
|
|
@@ -3781,7 +3943,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3781
3943
|
const renderBadge = () => {
|
|
3782
3944
|
if (hasContent() || props.dot) {
|
|
3783
3945
|
return vue.createVNode("div", {
|
|
3784
|
-
"class": bem$
|
|
3946
|
+
"class": bem$c([props.position, {
|
|
3785
3947
|
dot: props.dot,
|
|
3786
3948
|
fixed: !!slots.default
|
|
3787
3949
|
}]),
|
|
@@ -3795,7 +3957,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3795
3957
|
tag
|
|
3796
3958
|
} = props;
|
|
3797
3959
|
return vue.createVNode(tag, {
|
|
3798
|
-
"class": bem$
|
|
3960
|
+
"class": bem$c("wrapper")
|
|
3799
3961
|
}, {
|
|
3800
3962
|
default: () => [slots.default(), renderBadge()]
|
|
3801
3963
|
});
|
|
@@ -3804,14 +3966,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3804
3966
|
};
|
|
3805
3967
|
}
|
|
3806
3968
|
});
|
|
3807
|
-
const Badge = withInstall(stdin_default$
|
|
3969
|
+
const Badge = withInstall(stdin_default$b);
|
|
3808
3970
|
let globalZIndex = 2e3;
|
|
3809
3971
|
const useGlobalZIndex = () => ++globalZIndex;
|
|
3810
3972
|
const setGlobalZIndex = (val) => {
|
|
3811
3973
|
globalZIndex = val;
|
|
3812
3974
|
};
|
|
3813
|
-
const [name$
|
|
3814
|
-
const CONFIG_PROVIDER_KEY = Symbol(name$
|
|
3975
|
+
const [name$a, bem$b] = createNamespace("config-provider");
|
|
3976
|
+
const CONFIG_PROVIDER_KEY = Symbol(name$a);
|
|
3815
3977
|
const configProviderProps = {
|
|
3816
3978
|
tag: makeStringProp("div"),
|
|
3817
3979
|
theme: makeStringProp("light"),
|
|
@@ -3846,7 +4008,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3846
4008
|
});
|
|
3847
4009
|
}
|
|
3848
4010
|
vue.defineComponent({
|
|
3849
|
-
name: name$
|
|
4011
|
+
name: name$a,
|
|
3850
4012
|
props: configProviderProps,
|
|
3851
4013
|
setup(props, {
|
|
3852
4014
|
slots
|
|
@@ -3894,7 +4056,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3894
4056
|
}
|
|
3895
4057
|
});
|
|
3896
4058
|
return () => vue.createVNode(props.tag, {
|
|
3897
|
-
"class": bem$
|
|
4059
|
+
"class": bem$b(),
|
|
3898
4060
|
"style": props.themeVarsScope === "local" ? style.value : void 0
|
|
3899
4061
|
}, {
|
|
3900
4062
|
default: () => {
|
|
@@ -3904,7 +4066,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3904
4066
|
});
|
|
3905
4067
|
}
|
|
3906
4068
|
});
|
|
3907
|
-
const [name$
|
|
4069
|
+
const [name$9, bem$a] = createNamespace("icon");
|
|
3908
4070
|
const isImage = (name2) => name2 == null ? void 0 : name2.includes("/");
|
|
3909
4071
|
const iconProps = {
|
|
3910
4072
|
dot: Boolean,
|
|
@@ -3916,14 +4078,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3916
4078
|
badgeProps: Object,
|
|
3917
4079
|
classPrefix: String
|
|
3918
4080
|
};
|
|
3919
|
-
var stdin_default$
|
|
3920
|
-
name: name$
|
|
4081
|
+
var stdin_default$a = vue.defineComponent({
|
|
4082
|
+
name: name$9,
|
|
3921
4083
|
props: iconProps,
|
|
3922
4084
|
setup(props, {
|
|
3923
4085
|
slots
|
|
3924
4086
|
}) {
|
|
3925
4087
|
const config = vue.inject(CONFIG_PROVIDER_KEY, null);
|
|
3926
|
-
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$
|
|
4088
|
+
const classPrefix = vue.computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$a());
|
|
3927
4089
|
return () => {
|
|
3928
4090
|
const {
|
|
3929
4091
|
tag,
|
|
@@ -3947,7 +4109,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3947
4109
|
default: () => {
|
|
3948
4110
|
var _a;
|
|
3949
4111
|
return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && vue.createVNode("img", {
|
|
3950
|
-
"class": bem$
|
|
4112
|
+
"class": bem$a("image"),
|
|
3951
4113
|
"src": name2
|
|
3952
4114
|
}, null)];
|
|
3953
4115
|
}
|
|
@@ -3955,13 +4117,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3955
4117
|
};
|
|
3956
4118
|
}
|
|
3957
4119
|
});
|
|
3958
|
-
const Icon = withInstall(stdin_default$
|
|
3959
|
-
const [name$
|
|
4120
|
+
const Icon = withInstall(stdin_default$a);
|
|
4121
|
+
const [name$8, bem$9] = createNamespace("loading");
|
|
3960
4122
|
const SpinIcon = Array(12).fill(null).map((_, index) => vue.createVNode("i", {
|
|
3961
|
-
"class": bem$
|
|
4123
|
+
"class": bem$9("line", String(index + 1))
|
|
3962
4124
|
}, null));
|
|
3963
4125
|
const CircularIcon = vue.createVNode("svg", {
|
|
3964
|
-
"class": bem$
|
|
4126
|
+
"class": bem$9("circular"),
|
|
3965
4127
|
"viewBox": "25 25 50 50"
|
|
3966
4128
|
}, [vue.createVNode("circle", {
|
|
3967
4129
|
"cx": "50",
|
|
@@ -3977,8 +4139,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3977
4139
|
textSize: numericProp,
|
|
3978
4140
|
textColor: String
|
|
3979
4141
|
};
|
|
3980
|
-
var stdin_default$
|
|
3981
|
-
name: name$
|
|
4142
|
+
var stdin_default$9 = vue.defineComponent({
|
|
4143
|
+
name: name$8,
|
|
3982
4144
|
props: loadingProps,
|
|
3983
4145
|
setup(props, {
|
|
3984
4146
|
slots
|
|
@@ -3989,7 +4151,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3989
4151
|
const renderIcon = () => {
|
|
3990
4152
|
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
|
3991
4153
|
return vue.createVNode("span", {
|
|
3992
|
-
"class": bem$
|
|
4154
|
+
"class": bem$9("spinner", props.type),
|
|
3993
4155
|
"style": spinnerStyle.value
|
|
3994
4156
|
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
|
3995
4157
|
};
|
|
@@ -3997,7 +4159,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3997
4159
|
var _a;
|
|
3998
4160
|
if (slots.default) {
|
|
3999
4161
|
return vue.createVNode("span", {
|
|
4000
|
-
"class": bem$
|
|
4162
|
+
"class": bem$9("text"),
|
|
4001
4163
|
"style": {
|
|
4002
4164
|
fontSize: addUnit(props.textSize),
|
|
4003
4165
|
color: (_a = props.textColor) != null ? _a : props.color
|
|
@@ -4011,7 +4173,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4011
4173
|
vertical
|
|
4012
4174
|
} = props;
|
|
4013
4175
|
return vue.createVNode("div", {
|
|
4014
|
-
"class": bem$
|
|
4176
|
+
"class": bem$9([type, {
|
|
4015
4177
|
vertical
|
|
4016
4178
|
}]),
|
|
4017
4179
|
"aria-live": "polite",
|
|
@@ -4020,7 +4182,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4020
4182
|
};
|
|
4021
4183
|
}
|
|
4022
4184
|
});
|
|
4023
|
-
const Loading = withInstall(stdin_default$
|
|
4185
|
+
const Loading = withInstall(stdin_default$9);
|
|
4024
4186
|
const popupSharedProps = {
|
|
4025
4187
|
show: Boolean,
|
|
4026
4188
|
zIndex: numericProp,
|
|
@@ -4161,7 +4323,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4161
4323
|
const { scopeId } = ((_a = vue.getCurrentInstance()) == null ? void 0 : _a.vnode) || {};
|
|
4162
4324
|
return scopeId ? { [scopeId]: "" } : null;
|
|
4163
4325
|
};
|
|
4164
|
-
const [name$
|
|
4326
|
+
const [name$7, bem$8] = createNamespace("overlay");
|
|
4165
4327
|
const overlayProps = {
|
|
4166
4328
|
show: Boolean,
|
|
4167
4329
|
zIndex: numericProp,
|
|
@@ -4172,8 +4334,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4172
4334
|
customStyle: Object,
|
|
4173
4335
|
teleport: [String, Object]
|
|
4174
4336
|
};
|
|
4175
|
-
var stdin_default$
|
|
4176
|
-
name: name$
|
|
4337
|
+
var stdin_default$8 = vue.defineComponent({
|
|
4338
|
+
name: name$7,
|
|
4177
4339
|
inheritAttrs: false,
|
|
4178
4340
|
props: overlayProps,
|
|
4179
4341
|
setup(props, {
|
|
@@ -4196,7 +4358,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4196
4358
|
return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
|
4197
4359
|
"ref": root,
|
|
4198
4360
|
"style": style,
|
|
4199
|
-
"class": [bem$
|
|
4361
|
+
"class": [bem$8(), props.className]
|
|
4200
4362
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props.show]]);
|
|
4201
4363
|
});
|
|
4202
4364
|
useEventListener("touchmove", onTouchMove, {
|
|
@@ -4220,8 +4382,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4220
4382
|
};
|
|
4221
4383
|
}
|
|
4222
4384
|
});
|
|
4223
|
-
const Overlay = withInstall(stdin_default$
|
|
4224
|
-
const popupProps = extend$1({}, popupSharedProps, {
|
|
4385
|
+
const Overlay = withInstall(stdin_default$8);
|
|
4386
|
+
const popupProps$1 = extend$1({}, popupSharedProps, {
|
|
4225
4387
|
round: Boolean,
|
|
4226
4388
|
position: makeStringProp("center"),
|
|
4227
4389
|
closeIcon: makeStringProp("cross"),
|
|
@@ -4234,11 +4396,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4234
4396
|
safeAreaInsetTop: Boolean,
|
|
4235
4397
|
safeAreaInsetBottom: Boolean
|
|
4236
4398
|
});
|
|
4237
|
-
const [name$
|
|
4238
|
-
var stdin_default$
|
|
4239
|
-
name: name$
|
|
4399
|
+
const [name$6, bem$7] = createNamespace("popup");
|
|
4400
|
+
var stdin_default$7 = vue.defineComponent({
|
|
4401
|
+
name: name$6,
|
|
4240
4402
|
inheritAttrs: false,
|
|
4241
|
-
props: popupProps,
|
|
4403
|
+
props: popupProps$1,
|
|
4242
4404
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
|
4243
4405
|
setup(props, {
|
|
4244
4406
|
emit,
|
|
@@ -4312,7 +4474,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4312
4474
|
"role": "button",
|
|
4313
4475
|
"tabindex": 0,
|
|
4314
4476
|
"name": props.closeIcon,
|
|
4315
|
-
"class": [bem$
|
|
4477
|
+
"class": [bem$7("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
|
|
4316
4478
|
"classPrefix": props.iconPrefix,
|
|
4317
4479
|
"onClick": onClickCloseIcon
|
|
4318
4480
|
}, null);
|
|
@@ -4346,7 +4508,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4346
4508
|
"style": style.value,
|
|
4347
4509
|
"role": "dialog",
|
|
4348
4510
|
"tabindex": 0,
|
|
4349
|
-
"class": [bem$
|
|
4511
|
+
"class": [bem$7({
|
|
4350
4512
|
round: round2,
|
|
4351
4513
|
[position]: position
|
|
4352
4514
|
}), {
|
|
@@ -4427,7 +4589,443 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4427
4589
|
};
|
|
4428
4590
|
}
|
|
4429
4591
|
});
|
|
4430
|
-
const Popup = withInstall(stdin_default$
|
|
4592
|
+
const Popup = withInstall(stdin_default$7);
|
|
4593
|
+
const [name$5, bem$6] = createNamespace("swipe");
|
|
4594
|
+
const swipeProps = {
|
|
4595
|
+
loop: truthProp,
|
|
4596
|
+
width: numericProp,
|
|
4597
|
+
height: numericProp,
|
|
4598
|
+
vertical: Boolean,
|
|
4599
|
+
autoplay: makeNumericProp(0),
|
|
4600
|
+
duration: makeNumericProp(500),
|
|
4601
|
+
touchable: truthProp,
|
|
4602
|
+
lazyRender: Boolean,
|
|
4603
|
+
initialSwipe: makeNumericProp(0),
|
|
4604
|
+
indicatorColor: String,
|
|
4605
|
+
showIndicators: truthProp,
|
|
4606
|
+
stopPropagation: truthProp
|
|
4607
|
+
};
|
|
4608
|
+
const SWIPE_KEY = Symbol(name$5);
|
|
4609
|
+
var stdin_default$6 = vue.defineComponent({
|
|
4610
|
+
name: name$5,
|
|
4611
|
+
props: swipeProps,
|
|
4612
|
+
emits: ["change", "dragStart", "dragEnd"],
|
|
4613
|
+
setup(props, {
|
|
4614
|
+
emit,
|
|
4615
|
+
slots
|
|
4616
|
+
}) {
|
|
4617
|
+
const root = vue.ref();
|
|
4618
|
+
const track = vue.ref();
|
|
4619
|
+
const state = vue.reactive({
|
|
4620
|
+
rect: null,
|
|
4621
|
+
width: 0,
|
|
4622
|
+
height: 0,
|
|
4623
|
+
offset: 0,
|
|
4624
|
+
active: 0,
|
|
4625
|
+
swiping: false
|
|
4626
|
+
});
|
|
4627
|
+
let dragging = false;
|
|
4628
|
+
const touch = useTouch();
|
|
4629
|
+
const {
|
|
4630
|
+
children,
|
|
4631
|
+
linkChildren
|
|
4632
|
+
} = useChildren(SWIPE_KEY);
|
|
4633
|
+
const count = vue.computed(() => children.length);
|
|
4634
|
+
const size = vue.computed(() => state[props.vertical ? "height" : "width"]);
|
|
4635
|
+
const delta = vue.computed(() => props.vertical ? touch.deltaY.value : touch.deltaX.value);
|
|
4636
|
+
const minOffset = vue.computed(() => {
|
|
4637
|
+
if (state.rect) {
|
|
4638
|
+
const base = props.vertical ? state.rect.height : state.rect.width;
|
|
4639
|
+
return base - size.value * count.value;
|
|
4640
|
+
}
|
|
4641
|
+
return 0;
|
|
4642
|
+
});
|
|
4643
|
+
const maxCount = vue.computed(() => size.value ? Math.ceil(Math.abs(minOffset.value) / size.value) : count.value);
|
|
4644
|
+
const trackSize = vue.computed(() => count.value * size.value);
|
|
4645
|
+
const activeIndicator = vue.computed(() => (state.active + count.value) % count.value);
|
|
4646
|
+
const isCorrectDirection = vue.computed(() => {
|
|
4647
|
+
const expect = props.vertical ? "vertical" : "horizontal";
|
|
4648
|
+
return touch.direction.value === expect;
|
|
4649
|
+
});
|
|
4650
|
+
const trackStyle = vue.computed(() => {
|
|
4651
|
+
const style = {
|
|
4652
|
+
transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
|
|
4653
|
+
transform: `translate${props.vertical ? "Y" : "X"}(${+state.offset.toFixed(2)}px)`
|
|
4654
|
+
};
|
|
4655
|
+
if (size.value) {
|
|
4656
|
+
const mainAxis = props.vertical ? "height" : "width";
|
|
4657
|
+
const crossAxis = props.vertical ? "width" : "height";
|
|
4658
|
+
style[mainAxis] = `${trackSize.value}px`;
|
|
4659
|
+
style[crossAxis] = props[crossAxis] ? `${props[crossAxis]}px` : "";
|
|
4660
|
+
}
|
|
4661
|
+
return style;
|
|
4662
|
+
});
|
|
4663
|
+
const getTargetActive = (pace) => {
|
|
4664
|
+
const {
|
|
4665
|
+
active
|
|
4666
|
+
} = state;
|
|
4667
|
+
if (pace) {
|
|
4668
|
+
if (props.loop) {
|
|
4669
|
+
return clamp(active + pace, -1, count.value);
|
|
4670
|
+
}
|
|
4671
|
+
return clamp(active + pace, 0, maxCount.value);
|
|
4672
|
+
}
|
|
4673
|
+
return active;
|
|
4674
|
+
};
|
|
4675
|
+
const getTargetOffset = (targetActive, offset2 = 0) => {
|
|
4676
|
+
let currentPosition = targetActive * size.value;
|
|
4677
|
+
if (!props.loop) {
|
|
4678
|
+
currentPosition = Math.min(currentPosition, -minOffset.value);
|
|
4679
|
+
}
|
|
4680
|
+
let targetOffset = offset2 - currentPosition;
|
|
4681
|
+
if (!props.loop) {
|
|
4682
|
+
targetOffset = clamp(targetOffset, minOffset.value, 0);
|
|
4683
|
+
}
|
|
4684
|
+
return targetOffset;
|
|
4685
|
+
};
|
|
4686
|
+
const move = ({
|
|
4687
|
+
pace = 0,
|
|
4688
|
+
offset: offset2 = 0,
|
|
4689
|
+
emitChange
|
|
4690
|
+
}) => {
|
|
4691
|
+
if (count.value <= 1) {
|
|
4692
|
+
return;
|
|
4693
|
+
}
|
|
4694
|
+
const {
|
|
4695
|
+
active
|
|
4696
|
+
} = state;
|
|
4697
|
+
const targetActive = getTargetActive(pace);
|
|
4698
|
+
const targetOffset = getTargetOffset(targetActive, offset2);
|
|
4699
|
+
if (props.loop) {
|
|
4700
|
+
if (children[0] && targetOffset !== minOffset.value) {
|
|
4701
|
+
const outRightBound = targetOffset < minOffset.value;
|
|
4702
|
+
children[0].setOffset(outRightBound ? trackSize.value : 0);
|
|
4703
|
+
}
|
|
4704
|
+
if (children[count.value - 1] && targetOffset !== 0) {
|
|
4705
|
+
const outLeftBound = targetOffset > 0;
|
|
4706
|
+
children[count.value - 1].setOffset(outLeftBound ? -trackSize.value : 0);
|
|
4707
|
+
}
|
|
4708
|
+
}
|
|
4709
|
+
state.active = targetActive;
|
|
4710
|
+
state.offset = targetOffset;
|
|
4711
|
+
if (emitChange && targetActive !== active) {
|
|
4712
|
+
emit("change", activeIndicator.value);
|
|
4713
|
+
}
|
|
4714
|
+
};
|
|
4715
|
+
const correctPosition = () => {
|
|
4716
|
+
state.swiping = true;
|
|
4717
|
+
if (state.active <= -1) {
|
|
4718
|
+
move({
|
|
4719
|
+
pace: count.value
|
|
4720
|
+
});
|
|
4721
|
+
} else if (state.active >= count.value) {
|
|
4722
|
+
move({
|
|
4723
|
+
pace: -count.value
|
|
4724
|
+
});
|
|
4725
|
+
}
|
|
4726
|
+
};
|
|
4727
|
+
const prev = () => {
|
|
4728
|
+
correctPosition();
|
|
4729
|
+
touch.reset();
|
|
4730
|
+
doubleRaf(() => {
|
|
4731
|
+
state.swiping = false;
|
|
4732
|
+
move({
|
|
4733
|
+
pace: -1,
|
|
4734
|
+
emitChange: true
|
|
4735
|
+
});
|
|
4736
|
+
});
|
|
4737
|
+
};
|
|
4738
|
+
const next = () => {
|
|
4739
|
+
correctPosition();
|
|
4740
|
+
touch.reset();
|
|
4741
|
+
doubleRaf(() => {
|
|
4742
|
+
state.swiping = false;
|
|
4743
|
+
move({
|
|
4744
|
+
pace: 1,
|
|
4745
|
+
emitChange: true
|
|
4746
|
+
});
|
|
4747
|
+
});
|
|
4748
|
+
};
|
|
4749
|
+
let autoplayTimer;
|
|
4750
|
+
const stopAutoplay = () => clearTimeout(autoplayTimer);
|
|
4751
|
+
const autoplay = () => {
|
|
4752
|
+
stopAutoplay();
|
|
4753
|
+
if (+props.autoplay > 0 && count.value > 1) {
|
|
4754
|
+
autoplayTimer = setTimeout(() => {
|
|
4755
|
+
next();
|
|
4756
|
+
autoplay();
|
|
4757
|
+
}, +props.autoplay);
|
|
4758
|
+
}
|
|
4759
|
+
};
|
|
4760
|
+
const initialize = (active = +props.initialSwipe) => {
|
|
4761
|
+
if (!root.value) {
|
|
4762
|
+
return;
|
|
4763
|
+
}
|
|
4764
|
+
const cb = () => {
|
|
4765
|
+
var _a, _b;
|
|
4766
|
+
if (!isHidden(root)) {
|
|
4767
|
+
const rect = {
|
|
4768
|
+
width: root.value.offsetWidth,
|
|
4769
|
+
height: root.value.offsetHeight
|
|
4770
|
+
};
|
|
4771
|
+
state.rect = rect;
|
|
4772
|
+
state.width = +((_a = props.width) != null ? _a : rect.width);
|
|
4773
|
+
state.height = +((_b = props.height) != null ? _b : rect.height);
|
|
4774
|
+
}
|
|
4775
|
+
if (count.value) {
|
|
4776
|
+
active = Math.min(count.value - 1, active);
|
|
4777
|
+
if (active === -1) {
|
|
4778
|
+
active = count.value - 1;
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4781
|
+
state.active = active;
|
|
4782
|
+
state.swiping = true;
|
|
4783
|
+
state.offset = getTargetOffset(active);
|
|
4784
|
+
children.forEach((swipe) => {
|
|
4785
|
+
swipe.setOffset(0);
|
|
4786
|
+
});
|
|
4787
|
+
autoplay();
|
|
4788
|
+
};
|
|
4789
|
+
if (isHidden(root)) {
|
|
4790
|
+
vue.nextTick().then(cb);
|
|
4791
|
+
} else {
|
|
4792
|
+
cb();
|
|
4793
|
+
}
|
|
4794
|
+
};
|
|
4795
|
+
const resize = () => initialize(state.active);
|
|
4796
|
+
let touchStartTime;
|
|
4797
|
+
const onTouchStart = (event) => {
|
|
4798
|
+
if (!props.touchable || event.touches.length > 1)
|
|
4799
|
+
return;
|
|
4800
|
+
touch.start(event);
|
|
4801
|
+
dragging = false;
|
|
4802
|
+
touchStartTime = Date.now();
|
|
4803
|
+
stopAutoplay();
|
|
4804
|
+
correctPosition();
|
|
4805
|
+
};
|
|
4806
|
+
const onTouchMove = (event) => {
|
|
4807
|
+
if (props.touchable && state.swiping) {
|
|
4808
|
+
touch.move(event);
|
|
4809
|
+
if (isCorrectDirection.value) {
|
|
4810
|
+
const isEdgeTouch = !props.loop && (state.active === 0 && delta.value > 0 || state.active === count.value - 1 && delta.value < 0);
|
|
4811
|
+
if (!isEdgeTouch) {
|
|
4812
|
+
preventDefault(event, props.stopPropagation);
|
|
4813
|
+
move({
|
|
4814
|
+
offset: delta.value
|
|
4815
|
+
});
|
|
4816
|
+
if (!dragging) {
|
|
4817
|
+
emit("dragStart", {
|
|
4818
|
+
index: activeIndicator.value
|
|
4819
|
+
});
|
|
4820
|
+
dragging = true;
|
|
4821
|
+
}
|
|
4822
|
+
}
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
};
|
|
4826
|
+
const onTouchEnd = () => {
|
|
4827
|
+
if (!props.touchable || !state.swiping) {
|
|
4828
|
+
return;
|
|
4829
|
+
}
|
|
4830
|
+
const duration = Date.now() - touchStartTime;
|
|
4831
|
+
const speed = delta.value / duration;
|
|
4832
|
+
const shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta.value) > size.value / 2;
|
|
4833
|
+
if (shouldSwipe && isCorrectDirection.value) {
|
|
4834
|
+
const offset2 = props.vertical ? touch.offsetY.value : touch.offsetX.value;
|
|
4835
|
+
let pace = 0;
|
|
4836
|
+
if (props.loop) {
|
|
4837
|
+
pace = offset2 > 0 ? delta.value > 0 ? -1 : 1 : 0;
|
|
4838
|
+
} else {
|
|
4839
|
+
pace = -Math[delta.value > 0 ? "ceil" : "floor"](delta.value / size.value);
|
|
4840
|
+
}
|
|
4841
|
+
move({
|
|
4842
|
+
pace,
|
|
4843
|
+
emitChange: true
|
|
4844
|
+
});
|
|
4845
|
+
} else if (delta.value) {
|
|
4846
|
+
move({
|
|
4847
|
+
pace: 0
|
|
4848
|
+
});
|
|
4849
|
+
}
|
|
4850
|
+
dragging = false;
|
|
4851
|
+
state.swiping = false;
|
|
4852
|
+
emit("dragEnd", {
|
|
4853
|
+
index: activeIndicator.value
|
|
4854
|
+
});
|
|
4855
|
+
autoplay();
|
|
4856
|
+
};
|
|
4857
|
+
const swipeTo = (index, options = {}) => {
|
|
4858
|
+
correctPosition();
|
|
4859
|
+
touch.reset();
|
|
4860
|
+
doubleRaf(() => {
|
|
4861
|
+
let targetIndex;
|
|
4862
|
+
if (props.loop && index === count.value) {
|
|
4863
|
+
targetIndex = state.active === 0 ? 0 : index;
|
|
4864
|
+
} else {
|
|
4865
|
+
targetIndex = index % count.value;
|
|
4866
|
+
}
|
|
4867
|
+
if (options.immediate) {
|
|
4868
|
+
doubleRaf(() => {
|
|
4869
|
+
state.swiping = false;
|
|
4870
|
+
});
|
|
4871
|
+
} else {
|
|
4872
|
+
state.swiping = false;
|
|
4873
|
+
}
|
|
4874
|
+
move({
|
|
4875
|
+
pace: targetIndex - state.active,
|
|
4876
|
+
emitChange: true
|
|
4877
|
+
});
|
|
4878
|
+
});
|
|
4879
|
+
};
|
|
4880
|
+
const renderDot = (_, index) => {
|
|
4881
|
+
const active = index === activeIndicator.value;
|
|
4882
|
+
const style = active ? {
|
|
4883
|
+
backgroundColor: props.indicatorColor
|
|
4884
|
+
} : void 0;
|
|
4885
|
+
return vue.createVNode("i", {
|
|
4886
|
+
"style": style,
|
|
4887
|
+
"class": bem$6("indicator", {
|
|
4888
|
+
active
|
|
4889
|
+
})
|
|
4890
|
+
}, null);
|
|
4891
|
+
};
|
|
4892
|
+
const renderIndicator = () => {
|
|
4893
|
+
if (slots.indicator) {
|
|
4894
|
+
return slots.indicator({
|
|
4895
|
+
active: activeIndicator.value,
|
|
4896
|
+
total: count.value
|
|
4897
|
+
});
|
|
4898
|
+
}
|
|
4899
|
+
if (props.showIndicators && count.value > 1) {
|
|
4900
|
+
return vue.createVNode("div", {
|
|
4901
|
+
"class": bem$6("indicators", {
|
|
4902
|
+
vertical: props.vertical
|
|
4903
|
+
})
|
|
4904
|
+
}, [Array(count.value).fill("").map(renderDot)]);
|
|
4905
|
+
}
|
|
4906
|
+
};
|
|
4907
|
+
useExpose({
|
|
4908
|
+
prev,
|
|
4909
|
+
next,
|
|
4910
|
+
state,
|
|
4911
|
+
resize,
|
|
4912
|
+
swipeTo
|
|
4913
|
+
});
|
|
4914
|
+
linkChildren({
|
|
4915
|
+
size,
|
|
4916
|
+
props,
|
|
4917
|
+
count,
|
|
4918
|
+
activeIndicator
|
|
4919
|
+
});
|
|
4920
|
+
vue.watch(() => props.initialSwipe, (value) => initialize(+value));
|
|
4921
|
+
vue.watch(count, () => initialize(state.active));
|
|
4922
|
+
vue.watch(() => props.autoplay, autoplay);
|
|
4923
|
+
vue.watch([windowWidth, windowHeight, () => props.width, () => props.height], resize);
|
|
4924
|
+
vue.watch(usePageVisibility(), (visible) => {
|
|
4925
|
+
if (visible === "visible") {
|
|
4926
|
+
autoplay();
|
|
4927
|
+
} else {
|
|
4928
|
+
stopAutoplay();
|
|
4929
|
+
}
|
|
4930
|
+
});
|
|
4931
|
+
vue.onMounted(initialize);
|
|
4932
|
+
vue.onActivated(() => initialize(state.active));
|
|
4933
|
+
onPopupReopen(() => initialize(state.active));
|
|
4934
|
+
vue.onDeactivated(stopAutoplay);
|
|
4935
|
+
vue.onBeforeUnmount(stopAutoplay);
|
|
4936
|
+
useEventListener("touchmove", onTouchMove, {
|
|
4937
|
+
target: track
|
|
4938
|
+
});
|
|
4939
|
+
return () => {
|
|
4940
|
+
var _a;
|
|
4941
|
+
return vue.createVNode("div", {
|
|
4942
|
+
"ref": root,
|
|
4943
|
+
"class": bem$6()
|
|
4944
|
+
}, [vue.createVNode("div", {
|
|
4945
|
+
"ref": track,
|
|
4946
|
+
"style": trackStyle.value,
|
|
4947
|
+
"class": bem$6("track", {
|
|
4948
|
+
vertical: props.vertical
|
|
4949
|
+
}),
|
|
4950
|
+
"onTouchstartPassive": onTouchStart,
|
|
4951
|
+
"onTouchend": onTouchEnd,
|
|
4952
|
+
"onTouchcancel": onTouchEnd
|
|
4953
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderIndicator()]);
|
|
4954
|
+
};
|
|
4955
|
+
}
|
|
4956
|
+
});
|
|
4957
|
+
const Swipe = withInstall(stdin_default$6);
|
|
4958
|
+
const [name$4, bem$5] = createNamespace("swipe-item");
|
|
4959
|
+
var stdin_default$5 = vue.defineComponent({
|
|
4960
|
+
name: name$4,
|
|
4961
|
+
setup(props, {
|
|
4962
|
+
slots
|
|
4963
|
+
}) {
|
|
4964
|
+
let rendered;
|
|
4965
|
+
const state = vue.reactive({
|
|
4966
|
+
offset: 0,
|
|
4967
|
+
inited: false,
|
|
4968
|
+
mounted: false
|
|
4969
|
+
});
|
|
4970
|
+
const {
|
|
4971
|
+
parent,
|
|
4972
|
+
index
|
|
4973
|
+
} = useParent(SWIPE_KEY);
|
|
4974
|
+
if (!parent) {
|
|
4975
|
+
return;
|
|
4976
|
+
}
|
|
4977
|
+
const style = vue.computed(() => {
|
|
4978
|
+
const style2 = {};
|
|
4979
|
+
const {
|
|
4980
|
+
vertical
|
|
4981
|
+
} = parent.props;
|
|
4982
|
+
if (parent.size.value) {
|
|
4983
|
+
style2[vertical ? "height" : "width"] = `${parent.size.value}px`;
|
|
4984
|
+
}
|
|
4985
|
+
if (state.offset) {
|
|
4986
|
+
style2.transform = `translate${vertical ? "Y" : "X"}(${state.offset}px)`;
|
|
4987
|
+
}
|
|
4988
|
+
return style2;
|
|
4989
|
+
});
|
|
4990
|
+
const shouldRender = vue.computed(() => {
|
|
4991
|
+
const {
|
|
4992
|
+
loop,
|
|
4993
|
+
lazyRender
|
|
4994
|
+
} = parent.props;
|
|
4995
|
+
if (!lazyRender || rendered) {
|
|
4996
|
+
return true;
|
|
4997
|
+
}
|
|
4998
|
+
if (!state.mounted) {
|
|
4999
|
+
return false;
|
|
5000
|
+
}
|
|
5001
|
+
const active = parent.activeIndicator.value;
|
|
5002
|
+
const maxActive = parent.count.value - 1;
|
|
5003
|
+
const prevActive = active === 0 && loop ? maxActive : active - 1;
|
|
5004
|
+
const nextActive = active === maxActive && loop ? 0 : active + 1;
|
|
5005
|
+
rendered = index.value === active || index.value === prevActive || index.value === nextActive;
|
|
5006
|
+
return rendered;
|
|
5007
|
+
});
|
|
5008
|
+
const setOffset = (offset2) => {
|
|
5009
|
+
state.offset = offset2;
|
|
5010
|
+
};
|
|
5011
|
+
vue.onMounted(() => {
|
|
5012
|
+
vue.nextTick(() => {
|
|
5013
|
+
state.mounted = true;
|
|
5014
|
+
});
|
|
5015
|
+
});
|
|
5016
|
+
useExpose({
|
|
5017
|
+
setOffset
|
|
5018
|
+
});
|
|
5019
|
+
return () => {
|
|
5020
|
+
var _a;
|
|
5021
|
+
return vue.createVNode("div", {
|
|
5022
|
+
"class": bem$5(),
|
|
5023
|
+
"style": style.value
|
|
5024
|
+
}, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
|
|
5025
|
+
};
|
|
5026
|
+
}
|
|
5027
|
+
});
|
|
5028
|
+
const SwipeItem = withInstall(stdin_default$5);
|
|
4431
5029
|
let lockCount = 0;
|
|
4432
5030
|
function lockClick(lock) {
|
|
4433
5031
|
if (lock) {
|
|
@@ -4442,7 +5040,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4442
5040
|
}
|
|
4443
5041
|
}
|
|
4444
5042
|
}
|
|
4445
|
-
const [name$
|
|
5043
|
+
const [name$3, bem$4] = createNamespace("toast");
|
|
4446
5044
|
const popupInheritProps$1 = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"];
|
|
4447
5045
|
const toastProps = {
|
|
4448
5046
|
icon: String,
|
|
@@ -4466,8 +5064,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4466
5064
|
closeOnClickOverlay: Boolean,
|
|
4467
5065
|
zIndex: numericProp
|
|
4468
5066
|
};
|
|
4469
|
-
var stdin_default$
|
|
4470
|
-
name: name$
|
|
5067
|
+
var stdin_default$4 = vue.defineComponent({
|
|
5068
|
+
name: name$3,
|
|
4471
5069
|
props: toastProps,
|
|
4472
5070
|
emits: ["update:show"],
|
|
4473
5071
|
setup(props, {
|
|
@@ -4503,13 +5101,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4503
5101
|
return vue.createVNode(Icon, {
|
|
4504
5102
|
"name": icon || type,
|
|
4505
5103
|
"size": iconSize,
|
|
4506
|
-
"class": bem$
|
|
5104
|
+
"class": bem$4("icon"),
|
|
4507
5105
|
"classPrefix": iconPrefix
|
|
4508
5106
|
}, null);
|
|
4509
5107
|
}
|
|
4510
5108
|
if (type === "loading") {
|
|
4511
5109
|
return vue.createVNode(Loading, {
|
|
4512
|
-
"class": bem$
|
|
5110
|
+
"class": bem$4("loading"),
|
|
4513
5111
|
"size": iconSize,
|
|
4514
5112
|
"type": loadingType
|
|
4515
5113
|
}, null);
|
|
@@ -4522,16 +5120,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4522
5120
|
} = props;
|
|
4523
5121
|
if (slots.message) {
|
|
4524
5122
|
return vue.createVNode("div", {
|
|
4525
|
-
"class": bem$
|
|
5123
|
+
"class": bem$4("text")
|
|
4526
5124
|
}, [slots.message()]);
|
|
4527
5125
|
}
|
|
4528
5126
|
if (isDef$1(message) && message !== "") {
|
|
4529
5127
|
return type === "html" ? vue.createVNode("div", {
|
|
4530
5128
|
"key": 0,
|
|
4531
|
-
"class": bem$
|
|
5129
|
+
"class": bem$4("text"),
|
|
4532
5130
|
"innerHTML": String(message)
|
|
4533
5131
|
}, null) : vue.createVNode("div", {
|
|
4534
|
-
"class": bem$
|
|
5132
|
+
"class": bem$4("text")
|
|
4535
5133
|
}, [message]);
|
|
4536
5134
|
}
|
|
4537
5135
|
};
|
|
@@ -4547,7 +5145,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4547
5145
|
vue.onMounted(toggleClickable);
|
|
4548
5146
|
vue.onUnmounted(toggleClickable);
|
|
4549
5147
|
return () => vue.createVNode(Popup, vue.mergeProps({
|
|
4550
|
-
"class": [bem$
|
|
5148
|
+
"class": [bem$4([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
|
4551
5149
|
[props.type]: !props.icon
|
|
4552
5150
|
}]), props.className],
|
|
4553
5151
|
"lockScroll": false,
|
|
@@ -4644,7 +5242,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4644
5242
|
onClosed,
|
|
4645
5243
|
"onUpdate:show": toggle
|
|
4646
5244
|
};
|
|
4647
|
-
return vue.createVNode(stdin_default$
|
|
5245
|
+
return vue.createVNode(stdin_default$4, vue.mergeProps(state, attrs), null);
|
|
4648
5246
|
};
|
|
4649
5247
|
vue.watch(message, (val) => {
|
|
4650
5248
|
state.message = val;
|
|
@@ -4700,6 +5298,751 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4700
5298
|
extend$1(currentOptions$1, type);
|
|
4701
5299
|
}
|
|
4702
5300
|
}
|
|
5301
|
+
withInstall(stdin_default$4);
|
|
5302
|
+
const [name$2, bem$3] = createNamespace("image");
|
|
5303
|
+
const imageProps = {
|
|
5304
|
+
src: String,
|
|
5305
|
+
alt: String,
|
|
5306
|
+
fit: String,
|
|
5307
|
+
position: String,
|
|
5308
|
+
round: Boolean,
|
|
5309
|
+
block: Boolean,
|
|
5310
|
+
width: numericProp,
|
|
5311
|
+
height: numericProp,
|
|
5312
|
+
radius: numericProp,
|
|
5313
|
+
lazyLoad: Boolean,
|
|
5314
|
+
iconSize: numericProp,
|
|
5315
|
+
showError: truthProp,
|
|
5316
|
+
errorIcon: makeStringProp("photo-fail"),
|
|
5317
|
+
iconPrefix: String,
|
|
5318
|
+
showLoading: truthProp,
|
|
5319
|
+
loadingIcon: makeStringProp("photo"),
|
|
5320
|
+
crossorigin: String,
|
|
5321
|
+
referrerpolicy: String,
|
|
5322
|
+
decoding: String
|
|
5323
|
+
};
|
|
5324
|
+
var stdin_default$3 = vue.defineComponent({
|
|
5325
|
+
name: name$2,
|
|
5326
|
+
props: imageProps,
|
|
5327
|
+
emits: ["load", "error"],
|
|
5328
|
+
setup(props, {
|
|
5329
|
+
emit,
|
|
5330
|
+
slots
|
|
5331
|
+
}) {
|
|
5332
|
+
const error = vue.ref(false);
|
|
5333
|
+
const loading = vue.ref(true);
|
|
5334
|
+
const imageRef = vue.ref();
|
|
5335
|
+
const {
|
|
5336
|
+
$Lazyload
|
|
5337
|
+
} = vue.getCurrentInstance().proxy;
|
|
5338
|
+
const style = vue.computed(() => {
|
|
5339
|
+
const style2 = {
|
|
5340
|
+
width: addUnit(props.width),
|
|
5341
|
+
height: addUnit(props.height)
|
|
5342
|
+
};
|
|
5343
|
+
if (isDef$1(props.radius)) {
|
|
5344
|
+
style2.overflow = "hidden";
|
|
5345
|
+
style2.borderRadius = addUnit(props.radius);
|
|
5346
|
+
}
|
|
5347
|
+
return style2;
|
|
5348
|
+
});
|
|
5349
|
+
vue.watch(() => props.src, () => {
|
|
5350
|
+
error.value = false;
|
|
5351
|
+
loading.value = true;
|
|
5352
|
+
});
|
|
5353
|
+
const onLoad = (event) => {
|
|
5354
|
+
if (loading.value) {
|
|
5355
|
+
loading.value = false;
|
|
5356
|
+
emit("load", event);
|
|
5357
|
+
}
|
|
5358
|
+
};
|
|
5359
|
+
const triggerLoad = () => {
|
|
5360
|
+
const loadEvent = new Event("load");
|
|
5361
|
+
Object.defineProperty(loadEvent, "target", {
|
|
5362
|
+
value: imageRef.value,
|
|
5363
|
+
enumerable: true
|
|
5364
|
+
});
|
|
5365
|
+
onLoad(loadEvent);
|
|
5366
|
+
};
|
|
5367
|
+
const onError = (event) => {
|
|
5368
|
+
error.value = true;
|
|
5369
|
+
loading.value = false;
|
|
5370
|
+
emit("error", event);
|
|
5371
|
+
};
|
|
5372
|
+
const renderIcon = (name2, className, slot) => {
|
|
5373
|
+
if (slot) {
|
|
5374
|
+
return slot();
|
|
5375
|
+
}
|
|
5376
|
+
return vue.createVNode(Icon, {
|
|
5377
|
+
"name": name2,
|
|
5378
|
+
"size": props.iconSize,
|
|
5379
|
+
"class": className,
|
|
5380
|
+
"classPrefix": props.iconPrefix
|
|
5381
|
+
}, null);
|
|
5382
|
+
};
|
|
5383
|
+
const renderPlaceholder = () => {
|
|
5384
|
+
if (loading.value && props.showLoading) {
|
|
5385
|
+
return vue.createVNode("div", {
|
|
5386
|
+
"class": bem$3("loading")
|
|
5387
|
+
}, [renderIcon(props.loadingIcon, bem$3("loading-icon"), slots.loading)]);
|
|
5388
|
+
}
|
|
5389
|
+
if (error.value && props.showError) {
|
|
5390
|
+
return vue.createVNode("div", {
|
|
5391
|
+
"class": bem$3("error")
|
|
5392
|
+
}, [renderIcon(props.errorIcon, bem$3("error-icon"), slots.error)]);
|
|
5393
|
+
}
|
|
5394
|
+
};
|
|
5395
|
+
const renderImage = () => {
|
|
5396
|
+
if (error.value || !props.src) {
|
|
5397
|
+
return;
|
|
5398
|
+
}
|
|
5399
|
+
const attrs = {
|
|
5400
|
+
alt: props.alt,
|
|
5401
|
+
class: bem$3("img"),
|
|
5402
|
+
decoding: props.decoding,
|
|
5403
|
+
style: {
|
|
5404
|
+
objectFit: props.fit,
|
|
5405
|
+
objectPosition: props.position
|
|
5406
|
+
},
|
|
5407
|
+
crossorigin: props.crossorigin,
|
|
5408
|
+
referrerpolicy: props.referrerpolicy
|
|
5409
|
+
};
|
|
5410
|
+
if (props.lazyLoad) {
|
|
5411
|
+
return vue.withDirectives(vue.createVNode("img", vue.mergeProps({
|
|
5412
|
+
"ref": imageRef
|
|
5413
|
+
}, attrs), null), [[vue.resolveDirective("lazy"), props.src]]);
|
|
5414
|
+
}
|
|
5415
|
+
return vue.createVNode("img", vue.mergeProps({
|
|
5416
|
+
"ref": imageRef,
|
|
5417
|
+
"src": props.src,
|
|
5418
|
+
"onLoad": onLoad,
|
|
5419
|
+
"onError": onError
|
|
5420
|
+
}, attrs), null);
|
|
5421
|
+
};
|
|
5422
|
+
const onLazyLoaded = ({
|
|
5423
|
+
el
|
|
5424
|
+
}) => {
|
|
5425
|
+
const check = () => {
|
|
5426
|
+
if (el === imageRef.value && loading.value) {
|
|
5427
|
+
triggerLoad();
|
|
5428
|
+
}
|
|
5429
|
+
};
|
|
5430
|
+
if (imageRef.value) {
|
|
5431
|
+
check();
|
|
5432
|
+
} else {
|
|
5433
|
+
vue.nextTick(check);
|
|
5434
|
+
}
|
|
5435
|
+
};
|
|
5436
|
+
const onLazyLoadError = ({
|
|
5437
|
+
el
|
|
5438
|
+
}) => {
|
|
5439
|
+
if (el === imageRef.value && !error.value) {
|
|
5440
|
+
onError();
|
|
5441
|
+
}
|
|
5442
|
+
};
|
|
5443
|
+
if ($Lazyload && inBrowser$1) {
|
|
5444
|
+
$Lazyload.$on("loaded", onLazyLoaded);
|
|
5445
|
+
$Lazyload.$on("error", onLazyLoadError);
|
|
5446
|
+
vue.onBeforeUnmount(() => {
|
|
5447
|
+
$Lazyload.$off("loaded", onLazyLoaded);
|
|
5448
|
+
$Lazyload.$off("error", onLazyLoadError);
|
|
5449
|
+
});
|
|
5450
|
+
}
|
|
5451
|
+
vue.onMounted(() => {
|
|
5452
|
+
vue.nextTick(() => {
|
|
5453
|
+
var _a;
|
|
5454
|
+
if (((_a = imageRef.value) == null ? void 0 : _a.complete) && !props.lazyLoad) {
|
|
5455
|
+
triggerLoad();
|
|
5456
|
+
}
|
|
5457
|
+
});
|
|
5458
|
+
});
|
|
5459
|
+
return () => {
|
|
5460
|
+
var _a;
|
|
5461
|
+
return vue.createVNode("div", {
|
|
5462
|
+
"class": bem$3({
|
|
5463
|
+
round: props.round,
|
|
5464
|
+
block: props.block
|
|
5465
|
+
}),
|
|
5466
|
+
"style": style.value
|
|
5467
|
+
}, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
5468
|
+
};
|
|
5469
|
+
}
|
|
5470
|
+
});
|
|
5471
|
+
const Image$1 = withInstall(stdin_default$3);
|
|
5472
|
+
const getDistance = (touches) => Math.sqrt(__pow(touches[0].clientX - touches[1].clientX, 2) + __pow(touches[0].clientY - touches[1].clientY, 2));
|
|
5473
|
+
const getCenter = (touches) => ({
|
|
5474
|
+
x: (touches[0].clientX + touches[1].clientX) / 2,
|
|
5475
|
+
y: (touches[0].clientY + touches[1].clientY) / 2
|
|
5476
|
+
});
|
|
5477
|
+
const bem$2 = createNamespace("image-preview")[1];
|
|
5478
|
+
const longImageRatio = 2.6;
|
|
5479
|
+
const imagePreviewItemProps = {
|
|
5480
|
+
src: String,
|
|
5481
|
+
show: Boolean,
|
|
5482
|
+
active: Number,
|
|
5483
|
+
minZoom: makeRequiredProp(numericProp),
|
|
5484
|
+
maxZoom: makeRequiredProp(numericProp),
|
|
5485
|
+
rootWidth: makeRequiredProp(Number),
|
|
5486
|
+
rootHeight: makeRequiredProp(Number),
|
|
5487
|
+
disableZoom: Boolean,
|
|
5488
|
+
doubleScale: Boolean,
|
|
5489
|
+
closeOnClickImage: Boolean,
|
|
5490
|
+
closeOnClickOverlay: Boolean,
|
|
5491
|
+
vertical: Boolean
|
|
5492
|
+
};
|
|
5493
|
+
var stdin_default$2 = vue.defineComponent({
|
|
5494
|
+
props: imagePreviewItemProps,
|
|
5495
|
+
emits: ["scale", "close", "longPress"],
|
|
5496
|
+
setup(props, {
|
|
5497
|
+
emit,
|
|
5498
|
+
slots
|
|
5499
|
+
}) {
|
|
5500
|
+
const state = vue.reactive({
|
|
5501
|
+
scale: 1,
|
|
5502
|
+
moveX: 0,
|
|
5503
|
+
moveY: 0,
|
|
5504
|
+
moving: false,
|
|
5505
|
+
zooming: false,
|
|
5506
|
+
initializing: false,
|
|
5507
|
+
imageRatio: 0
|
|
5508
|
+
});
|
|
5509
|
+
const touch = useTouch();
|
|
5510
|
+
const imageRef = vue.ref();
|
|
5511
|
+
const swipeItem = vue.ref();
|
|
5512
|
+
const vertical = vue.ref(false);
|
|
5513
|
+
const isLongImage = vue.ref(false);
|
|
5514
|
+
let initialMoveY = 0;
|
|
5515
|
+
const imageStyle = vue.computed(() => {
|
|
5516
|
+
const {
|
|
5517
|
+
scale,
|
|
5518
|
+
moveX,
|
|
5519
|
+
moveY,
|
|
5520
|
+
moving,
|
|
5521
|
+
zooming,
|
|
5522
|
+
initializing
|
|
5523
|
+
} = state;
|
|
5524
|
+
const style = {
|
|
5525
|
+
transitionDuration: zooming || moving || initializing ? "0s" : ".3s"
|
|
5526
|
+
};
|
|
5527
|
+
if (scale !== 1 || isLongImage.value) {
|
|
5528
|
+
style.transform = `matrix(${scale}, 0, 0, ${scale}, ${moveX}, ${moveY})`;
|
|
5529
|
+
}
|
|
5530
|
+
return style;
|
|
5531
|
+
});
|
|
5532
|
+
const maxMoveX = vue.computed(() => {
|
|
5533
|
+
if (state.imageRatio) {
|
|
5534
|
+
const {
|
|
5535
|
+
rootWidth,
|
|
5536
|
+
rootHeight
|
|
5537
|
+
} = props;
|
|
5538
|
+
const displayWidth = vertical.value ? rootHeight / state.imageRatio : rootWidth;
|
|
5539
|
+
return Math.max(0, (state.scale * displayWidth - rootWidth) / 2);
|
|
5540
|
+
}
|
|
5541
|
+
return 0;
|
|
5542
|
+
});
|
|
5543
|
+
const maxMoveY = vue.computed(() => {
|
|
5544
|
+
if (state.imageRatio) {
|
|
5545
|
+
const {
|
|
5546
|
+
rootWidth,
|
|
5547
|
+
rootHeight
|
|
5548
|
+
} = props;
|
|
5549
|
+
const displayHeight = vertical.value ? rootHeight : rootWidth * state.imageRatio;
|
|
5550
|
+
return Math.max(0, (state.scale * displayHeight - rootHeight) / 2);
|
|
5551
|
+
}
|
|
5552
|
+
return 0;
|
|
5553
|
+
});
|
|
5554
|
+
const setScale = (scale, center) => {
|
|
5555
|
+
var _a;
|
|
5556
|
+
scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
|
|
5557
|
+
if (scale !== state.scale) {
|
|
5558
|
+
const ratio = scale / state.scale;
|
|
5559
|
+
state.scale = scale;
|
|
5560
|
+
if (center) {
|
|
5561
|
+
const imageRect = useRect((_a = imageRef.value) == null ? void 0 : _a.$el);
|
|
5562
|
+
const origin = {
|
|
5563
|
+
x: imageRect.width * 0.5,
|
|
5564
|
+
y: imageRect.height * 0.5
|
|
5565
|
+
};
|
|
5566
|
+
const moveX = state.moveX - (center.x - imageRect.left - origin.x) * (ratio - 1);
|
|
5567
|
+
const moveY = state.moveY - (center.y - imageRect.top - origin.y) * (ratio - 1);
|
|
5568
|
+
state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
|
|
5569
|
+
state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
|
|
5570
|
+
} else {
|
|
5571
|
+
state.moveX = 0;
|
|
5572
|
+
state.moveY = isLongImage.value ? initialMoveY : 0;
|
|
5573
|
+
}
|
|
5574
|
+
emit("scale", {
|
|
5575
|
+
scale,
|
|
5576
|
+
index: props.active
|
|
5577
|
+
});
|
|
5578
|
+
}
|
|
5579
|
+
};
|
|
5580
|
+
const resetScale = () => {
|
|
5581
|
+
setScale(1);
|
|
5582
|
+
};
|
|
5583
|
+
const toggleScale = () => {
|
|
5584
|
+
const scale = state.scale > 1 ? 1 : 2;
|
|
5585
|
+
setScale(scale, scale === 2 || isLongImage.value ? {
|
|
5586
|
+
x: touch.startX.value,
|
|
5587
|
+
y: touch.startY.value
|
|
5588
|
+
} : void 0);
|
|
5589
|
+
};
|
|
5590
|
+
let fingerNum;
|
|
5591
|
+
let startMoveX;
|
|
5592
|
+
let startMoveY;
|
|
5593
|
+
let startScale;
|
|
5594
|
+
let startDistance;
|
|
5595
|
+
let lastCenter;
|
|
5596
|
+
let doubleTapTimer;
|
|
5597
|
+
let touchStartTime;
|
|
5598
|
+
let isImageMoved = false;
|
|
5599
|
+
const onTouchStart = (event) => {
|
|
5600
|
+
const {
|
|
5601
|
+
touches
|
|
5602
|
+
} = event;
|
|
5603
|
+
fingerNum = touches.length;
|
|
5604
|
+
if (fingerNum === 2 && props.disableZoom) {
|
|
5605
|
+
return;
|
|
5606
|
+
}
|
|
5607
|
+
const {
|
|
5608
|
+
offsetX
|
|
5609
|
+
} = touch;
|
|
5610
|
+
touch.start(event);
|
|
5611
|
+
startMoveX = state.moveX;
|
|
5612
|
+
startMoveY = state.moveY;
|
|
5613
|
+
touchStartTime = Date.now();
|
|
5614
|
+
isImageMoved = false;
|
|
5615
|
+
state.moving = fingerNum === 1 && (state.scale !== 1 || isLongImage.value);
|
|
5616
|
+
state.zooming = fingerNum === 2 && !offsetX.value;
|
|
5617
|
+
if (state.zooming) {
|
|
5618
|
+
startScale = state.scale;
|
|
5619
|
+
startDistance = getDistance(touches);
|
|
5620
|
+
}
|
|
5621
|
+
};
|
|
5622
|
+
const onTouchMove = (event) => {
|
|
5623
|
+
const {
|
|
5624
|
+
touches
|
|
5625
|
+
} = event;
|
|
5626
|
+
touch.move(event);
|
|
5627
|
+
if (state.moving) {
|
|
5628
|
+
const {
|
|
5629
|
+
deltaX,
|
|
5630
|
+
deltaY
|
|
5631
|
+
} = touch;
|
|
5632
|
+
const moveX = deltaX.value + startMoveX;
|
|
5633
|
+
const moveY = deltaY.value + startMoveY;
|
|
5634
|
+
if ((props.vertical ? touch.isVertical() && Math.abs(moveY) > maxMoveY.value : touch.isHorizontal() && Math.abs(moveX) > maxMoveX.value) && !isImageMoved) {
|
|
5635
|
+
state.moving = false;
|
|
5636
|
+
return;
|
|
5637
|
+
}
|
|
5638
|
+
isImageMoved = true;
|
|
5639
|
+
preventDefault(event, true);
|
|
5640
|
+
state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
|
|
5641
|
+
state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
|
|
5642
|
+
}
|
|
5643
|
+
if (state.zooming) {
|
|
5644
|
+
preventDefault(event, true);
|
|
5645
|
+
if (touches.length === 2) {
|
|
5646
|
+
const distance = getDistance(touches);
|
|
5647
|
+
const scale = startScale * distance / startDistance;
|
|
5648
|
+
lastCenter = getCenter(touches);
|
|
5649
|
+
setScale(scale, lastCenter);
|
|
5650
|
+
}
|
|
5651
|
+
}
|
|
5652
|
+
};
|
|
5653
|
+
const checkClose = (event) => {
|
|
5654
|
+
var _a;
|
|
5655
|
+
const swipeItemEl = (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
|
5656
|
+
if (!swipeItemEl)
|
|
5657
|
+
return;
|
|
5658
|
+
const imageEl = swipeItemEl.firstElementChild;
|
|
5659
|
+
const isClickOverlay = event.target === swipeItemEl;
|
|
5660
|
+
const isClickImage = imageEl == null ? void 0 : imageEl.contains(event.target);
|
|
5661
|
+
if (!props.closeOnClickImage && isClickImage)
|
|
5662
|
+
return;
|
|
5663
|
+
if (!props.closeOnClickOverlay && isClickOverlay)
|
|
5664
|
+
return;
|
|
5665
|
+
emit("close");
|
|
5666
|
+
};
|
|
5667
|
+
const checkTap = (event) => {
|
|
5668
|
+
if (fingerNum > 1) {
|
|
5669
|
+
return;
|
|
5670
|
+
}
|
|
5671
|
+
const deltaTime = Date.now() - touchStartTime;
|
|
5672
|
+
const TAP_TIME = 250;
|
|
5673
|
+
if (touch.isTap.value) {
|
|
5674
|
+
if (deltaTime < TAP_TIME) {
|
|
5675
|
+
if (props.doubleScale) {
|
|
5676
|
+
if (doubleTapTimer) {
|
|
5677
|
+
clearTimeout(doubleTapTimer);
|
|
5678
|
+
doubleTapTimer = null;
|
|
5679
|
+
toggleScale();
|
|
5680
|
+
} else {
|
|
5681
|
+
doubleTapTimer = setTimeout(() => {
|
|
5682
|
+
checkClose(event);
|
|
5683
|
+
doubleTapTimer = null;
|
|
5684
|
+
}, TAP_TIME);
|
|
5685
|
+
}
|
|
5686
|
+
} else {
|
|
5687
|
+
checkClose(event);
|
|
5688
|
+
}
|
|
5689
|
+
} else if (deltaTime > LONG_PRESS_START_TIME) {
|
|
5690
|
+
emit("longPress");
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
};
|
|
5694
|
+
const onTouchEnd = (event) => {
|
|
5695
|
+
let stopPropagation2 = false;
|
|
5696
|
+
if (state.moving || state.zooming) {
|
|
5697
|
+
stopPropagation2 = true;
|
|
5698
|
+
if (state.moving && startMoveX === state.moveX && startMoveY === state.moveY) {
|
|
5699
|
+
stopPropagation2 = false;
|
|
5700
|
+
}
|
|
5701
|
+
if (!event.touches.length) {
|
|
5702
|
+
if (state.zooming) {
|
|
5703
|
+
state.moveX = clamp(state.moveX, -maxMoveX.value, maxMoveX.value);
|
|
5704
|
+
state.moveY = clamp(state.moveY, -maxMoveY.value, maxMoveY.value);
|
|
5705
|
+
state.zooming = false;
|
|
5706
|
+
}
|
|
5707
|
+
state.moving = false;
|
|
5708
|
+
startMoveX = 0;
|
|
5709
|
+
startMoveY = 0;
|
|
5710
|
+
startScale = 1;
|
|
5711
|
+
if (state.scale < 1) {
|
|
5712
|
+
resetScale();
|
|
5713
|
+
}
|
|
5714
|
+
const maxZoom = +props.maxZoom;
|
|
5715
|
+
if (state.scale > maxZoom) {
|
|
5716
|
+
setScale(maxZoom, lastCenter);
|
|
5717
|
+
}
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
preventDefault(event, stopPropagation2);
|
|
5721
|
+
checkTap(event);
|
|
5722
|
+
touch.reset();
|
|
5723
|
+
};
|
|
5724
|
+
const resize = () => {
|
|
5725
|
+
const {
|
|
5726
|
+
rootWidth,
|
|
5727
|
+
rootHeight
|
|
5728
|
+
} = props;
|
|
5729
|
+
const rootRatio = rootHeight / rootWidth;
|
|
5730
|
+
const {
|
|
5731
|
+
imageRatio
|
|
5732
|
+
} = state;
|
|
5733
|
+
vertical.value = state.imageRatio > rootRatio && imageRatio < longImageRatio;
|
|
5734
|
+
isLongImage.value = state.imageRatio > rootRatio && imageRatio >= longImageRatio;
|
|
5735
|
+
if (isLongImage.value) {
|
|
5736
|
+
initialMoveY = (imageRatio * rootWidth - rootHeight) / 2;
|
|
5737
|
+
state.moveY = initialMoveY;
|
|
5738
|
+
state.initializing = true;
|
|
5739
|
+
raf(() => {
|
|
5740
|
+
state.initializing = false;
|
|
5741
|
+
});
|
|
5742
|
+
}
|
|
5743
|
+
resetScale();
|
|
5744
|
+
};
|
|
5745
|
+
const onLoad = (event) => {
|
|
5746
|
+
const {
|
|
5747
|
+
naturalWidth,
|
|
5748
|
+
naturalHeight
|
|
5749
|
+
} = event.target;
|
|
5750
|
+
state.imageRatio = naturalHeight / naturalWidth;
|
|
5751
|
+
resize();
|
|
5752
|
+
};
|
|
5753
|
+
vue.watch(() => props.active, resetScale);
|
|
5754
|
+
vue.watch(() => props.show, (value) => {
|
|
5755
|
+
if (!value) {
|
|
5756
|
+
resetScale();
|
|
5757
|
+
}
|
|
5758
|
+
});
|
|
5759
|
+
vue.watch(() => [props.rootWidth, props.rootHeight], resize);
|
|
5760
|
+
useEventListener("touchmove", onTouchMove, {
|
|
5761
|
+
target: vue.computed(() => {
|
|
5762
|
+
var _a;
|
|
5763
|
+
return (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
|
5764
|
+
})
|
|
5765
|
+
});
|
|
5766
|
+
useExpose({
|
|
5767
|
+
resetScale
|
|
5768
|
+
});
|
|
5769
|
+
return () => {
|
|
5770
|
+
const imageSlots = {
|
|
5771
|
+
loading: () => vue.createVNode(Loading, {
|
|
5772
|
+
"type": "spinner"
|
|
5773
|
+
}, null)
|
|
5774
|
+
};
|
|
5775
|
+
return vue.createVNode(SwipeItem, {
|
|
5776
|
+
"ref": swipeItem,
|
|
5777
|
+
"class": bem$2("swipe-item"),
|
|
5778
|
+
"onTouchstartPassive": onTouchStart,
|
|
5779
|
+
"onTouchend": onTouchEnd,
|
|
5780
|
+
"onTouchcancel": onTouchEnd
|
|
5781
|
+
}, {
|
|
5782
|
+
default: () => [slots.image ? vue.createVNode("div", {
|
|
5783
|
+
"class": bem$2("image-wrap")
|
|
5784
|
+
}, [slots.image({
|
|
5785
|
+
src: props.src,
|
|
5786
|
+
onLoad,
|
|
5787
|
+
style: imageStyle.value
|
|
5788
|
+
})]) : vue.createVNode(Image$1, {
|
|
5789
|
+
"ref": imageRef,
|
|
5790
|
+
"src": props.src,
|
|
5791
|
+
"fit": "contain",
|
|
5792
|
+
"class": bem$2("image", {
|
|
5793
|
+
vertical: vertical.value
|
|
5794
|
+
}),
|
|
5795
|
+
"style": imageStyle.value,
|
|
5796
|
+
"onLoad": onLoad
|
|
5797
|
+
}, imageSlots)]
|
|
5798
|
+
});
|
|
5799
|
+
};
|
|
5800
|
+
}
|
|
5801
|
+
});
|
|
5802
|
+
const [name$1, bem$1] = createNamespace("image-preview");
|
|
5803
|
+
const popupProps = ["show", "teleport", "transition", "overlayStyle", "closeOnPopstate"];
|
|
5804
|
+
const imagePreviewProps = {
|
|
5805
|
+
show: Boolean,
|
|
5806
|
+
loop: truthProp,
|
|
5807
|
+
images: makeArrayProp(),
|
|
5808
|
+
minZoom: makeNumericProp(1 / 3),
|
|
5809
|
+
maxZoom: makeNumericProp(3),
|
|
5810
|
+
overlay: truthProp,
|
|
5811
|
+
vertical: Boolean,
|
|
5812
|
+
closeable: Boolean,
|
|
5813
|
+
showIndex: truthProp,
|
|
5814
|
+
className: unknownProp,
|
|
5815
|
+
closeIcon: makeStringProp("clear"),
|
|
5816
|
+
transition: String,
|
|
5817
|
+
beforeClose: Function,
|
|
5818
|
+
doubleScale: truthProp,
|
|
5819
|
+
overlayClass: unknownProp,
|
|
5820
|
+
overlayStyle: Object,
|
|
5821
|
+
swipeDuration: makeNumericProp(300),
|
|
5822
|
+
startPosition: makeNumericProp(0),
|
|
5823
|
+
showIndicators: Boolean,
|
|
5824
|
+
closeOnPopstate: truthProp,
|
|
5825
|
+
closeOnClickImage: truthProp,
|
|
5826
|
+
closeOnClickOverlay: truthProp,
|
|
5827
|
+
closeIconPosition: makeStringProp("top-right"),
|
|
5828
|
+
teleport: [String, Object]
|
|
5829
|
+
};
|
|
5830
|
+
var stdin_default$1 = vue.defineComponent({
|
|
5831
|
+
name: name$1,
|
|
5832
|
+
props: imagePreviewProps,
|
|
5833
|
+
emits: ["scale", "close", "closed", "change", "longPress", "update:show"],
|
|
5834
|
+
setup(props, {
|
|
5835
|
+
emit,
|
|
5836
|
+
slots
|
|
5837
|
+
}) {
|
|
5838
|
+
const swipeRef = vue.ref();
|
|
5839
|
+
const activedPreviewItemRef = vue.ref();
|
|
5840
|
+
const state = vue.reactive({
|
|
5841
|
+
active: 0,
|
|
5842
|
+
rootWidth: 0,
|
|
5843
|
+
rootHeight: 0,
|
|
5844
|
+
disableZoom: false
|
|
5845
|
+
});
|
|
5846
|
+
const resize = () => {
|
|
5847
|
+
if (swipeRef.value) {
|
|
5848
|
+
const rect = useRect(swipeRef.value.$el);
|
|
5849
|
+
state.rootWidth = rect.width;
|
|
5850
|
+
state.rootHeight = rect.height;
|
|
5851
|
+
swipeRef.value.resize();
|
|
5852
|
+
}
|
|
5853
|
+
};
|
|
5854
|
+
const emitScale = (args) => emit("scale", args);
|
|
5855
|
+
const updateShow = (show) => emit("update:show", show);
|
|
5856
|
+
const emitClose = () => {
|
|
5857
|
+
callInterceptor(props.beforeClose, {
|
|
5858
|
+
args: [state.active],
|
|
5859
|
+
done: () => updateShow(false)
|
|
5860
|
+
});
|
|
5861
|
+
};
|
|
5862
|
+
const setActive = (active) => {
|
|
5863
|
+
if (active !== state.active) {
|
|
5864
|
+
state.active = active;
|
|
5865
|
+
emit("change", active);
|
|
5866
|
+
}
|
|
5867
|
+
};
|
|
5868
|
+
const renderIndex = () => {
|
|
5869
|
+
if (props.showIndex) {
|
|
5870
|
+
return vue.createVNode("div", {
|
|
5871
|
+
"class": bem$1("index")
|
|
5872
|
+
}, [slots.index ? slots.index({
|
|
5873
|
+
index: state.active
|
|
5874
|
+
}) : `${state.active + 1} / ${props.images.length}`]);
|
|
5875
|
+
}
|
|
5876
|
+
};
|
|
5877
|
+
const renderCover = () => {
|
|
5878
|
+
if (slots.cover) {
|
|
5879
|
+
return vue.createVNode("div", {
|
|
5880
|
+
"class": bem$1("cover")
|
|
5881
|
+
}, [slots.cover()]);
|
|
5882
|
+
}
|
|
5883
|
+
};
|
|
5884
|
+
const onDragStart = () => {
|
|
5885
|
+
state.disableZoom = true;
|
|
5886
|
+
};
|
|
5887
|
+
const onDragEnd = () => {
|
|
5888
|
+
state.disableZoom = false;
|
|
5889
|
+
};
|
|
5890
|
+
const renderImages = () => vue.createVNode(Swipe, {
|
|
5891
|
+
"ref": swipeRef,
|
|
5892
|
+
"lazyRender": true,
|
|
5893
|
+
"loop": props.loop,
|
|
5894
|
+
"class": bem$1("swipe"),
|
|
5895
|
+
"vertical": props.vertical,
|
|
5896
|
+
"duration": props.swipeDuration,
|
|
5897
|
+
"initialSwipe": props.startPosition,
|
|
5898
|
+
"showIndicators": props.showIndicators,
|
|
5899
|
+
"indicatorColor": "white",
|
|
5900
|
+
"onChange": setActive,
|
|
5901
|
+
"onDragEnd": onDragEnd,
|
|
5902
|
+
"onDragStart": onDragStart
|
|
5903
|
+
}, {
|
|
5904
|
+
default: () => [props.images.map((image, index) => vue.createVNode(stdin_default$2, {
|
|
5905
|
+
"ref": (item) => {
|
|
5906
|
+
if (index === state.active) {
|
|
5907
|
+
activedPreviewItemRef.value = item;
|
|
5908
|
+
}
|
|
5909
|
+
},
|
|
5910
|
+
"src": image,
|
|
5911
|
+
"show": props.show,
|
|
5912
|
+
"active": state.active,
|
|
5913
|
+
"maxZoom": props.maxZoom,
|
|
5914
|
+
"minZoom": props.minZoom,
|
|
5915
|
+
"rootWidth": state.rootWidth,
|
|
5916
|
+
"rootHeight": state.rootHeight,
|
|
5917
|
+
"disableZoom": state.disableZoom,
|
|
5918
|
+
"doubleScale": props.doubleScale,
|
|
5919
|
+
"closeOnClickImage": props.closeOnClickImage,
|
|
5920
|
+
"closeOnClickOverlay": props.closeOnClickOverlay,
|
|
5921
|
+
"vertical": props.vertical,
|
|
5922
|
+
"onScale": emitScale,
|
|
5923
|
+
"onClose": emitClose,
|
|
5924
|
+
"onLongPress": () => emit("longPress", {
|
|
5925
|
+
index
|
|
5926
|
+
})
|
|
5927
|
+
}, {
|
|
5928
|
+
image: slots.image
|
|
5929
|
+
}))]
|
|
5930
|
+
});
|
|
5931
|
+
const renderClose = () => {
|
|
5932
|
+
if (props.closeable) {
|
|
5933
|
+
return vue.createVNode(Icon, {
|
|
5934
|
+
"role": "button",
|
|
5935
|
+
"name": props.closeIcon,
|
|
5936
|
+
"class": [bem$1("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
|
|
5937
|
+
"onClick": emitClose
|
|
5938
|
+
}, null);
|
|
5939
|
+
}
|
|
5940
|
+
};
|
|
5941
|
+
const onClosed = () => emit("closed");
|
|
5942
|
+
const swipeTo = (index, options) => {
|
|
5943
|
+
var _a;
|
|
5944
|
+
return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
|
|
5945
|
+
};
|
|
5946
|
+
useExpose({
|
|
5947
|
+
resetScale: () => {
|
|
5948
|
+
var _a;
|
|
5949
|
+
(_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
|
|
5950
|
+
},
|
|
5951
|
+
swipeTo
|
|
5952
|
+
});
|
|
5953
|
+
vue.onMounted(resize);
|
|
5954
|
+
vue.watch([windowWidth, windowHeight], resize);
|
|
5955
|
+
vue.watch(() => props.startPosition, (value) => setActive(+value));
|
|
5956
|
+
vue.watch(() => props.show, (value) => {
|
|
5957
|
+
const {
|
|
5958
|
+
images,
|
|
5959
|
+
startPosition
|
|
5960
|
+
} = props;
|
|
5961
|
+
if (value) {
|
|
5962
|
+
setActive(+startPosition);
|
|
5963
|
+
vue.nextTick(() => {
|
|
5964
|
+
resize();
|
|
5965
|
+
swipeTo(+startPosition, {
|
|
5966
|
+
immediate: true
|
|
5967
|
+
});
|
|
5968
|
+
});
|
|
5969
|
+
} else {
|
|
5970
|
+
emit("close", {
|
|
5971
|
+
index: state.active,
|
|
5972
|
+
url: images[state.active]
|
|
5973
|
+
});
|
|
5974
|
+
}
|
|
5975
|
+
});
|
|
5976
|
+
return () => vue.createVNode(Popup, vue.mergeProps({
|
|
5977
|
+
"class": [bem$1(), props.className],
|
|
5978
|
+
"overlayClass": [bem$1("overlay"), props.overlayClass],
|
|
5979
|
+
"onClosed": onClosed,
|
|
5980
|
+
"onUpdate:show": updateShow
|
|
5981
|
+
}, pick(props, popupProps)), {
|
|
5982
|
+
default: () => [renderClose(), renderImages(), renderIndex(), renderCover()]
|
|
5983
|
+
});
|
|
5984
|
+
}
|
|
5985
|
+
});
|
|
5986
|
+
let instance$1;
|
|
5987
|
+
const defaultConfig = {
|
|
5988
|
+
loop: true,
|
|
5989
|
+
images: [],
|
|
5990
|
+
maxZoom: 3,
|
|
5991
|
+
minZoom: 1 / 3,
|
|
5992
|
+
onScale: void 0,
|
|
5993
|
+
onClose: void 0,
|
|
5994
|
+
onChange: void 0,
|
|
5995
|
+
vertical: false,
|
|
5996
|
+
teleport: "body",
|
|
5997
|
+
className: "",
|
|
5998
|
+
showIndex: true,
|
|
5999
|
+
closeable: false,
|
|
6000
|
+
closeIcon: "clear",
|
|
6001
|
+
transition: void 0,
|
|
6002
|
+
beforeClose: void 0,
|
|
6003
|
+
doubleScale: true,
|
|
6004
|
+
overlayStyle: void 0,
|
|
6005
|
+
overlayClass: void 0,
|
|
6006
|
+
startPosition: 0,
|
|
6007
|
+
swipeDuration: 300,
|
|
6008
|
+
showIndicators: false,
|
|
6009
|
+
closeOnPopstate: true,
|
|
6010
|
+
closeOnClickOverlay: true,
|
|
6011
|
+
closeIconPosition: "top-right"
|
|
6012
|
+
};
|
|
6013
|
+
function initInstance$1() {
|
|
6014
|
+
({
|
|
6015
|
+
instance: instance$1
|
|
6016
|
+
} = mountComponent({
|
|
6017
|
+
setup() {
|
|
6018
|
+
const {
|
|
6019
|
+
state,
|
|
6020
|
+
toggle
|
|
6021
|
+
} = usePopupState();
|
|
6022
|
+
const onClosed = () => {
|
|
6023
|
+
state.images = [];
|
|
6024
|
+
};
|
|
6025
|
+
return () => vue.createVNode(stdin_default$1, vue.mergeProps(state, {
|
|
6026
|
+
"onClosed": onClosed,
|
|
6027
|
+
"onUpdate:show": toggle
|
|
6028
|
+
}), null);
|
|
6029
|
+
}
|
|
6030
|
+
}));
|
|
6031
|
+
}
|
|
6032
|
+
const showImagePreview = (options, startPosition = 0) => {
|
|
6033
|
+
if (!inBrowser$1) {
|
|
6034
|
+
return;
|
|
6035
|
+
}
|
|
6036
|
+
if (!instance$1) {
|
|
6037
|
+
initInstance$1();
|
|
6038
|
+
}
|
|
6039
|
+
options = Array.isArray(options) ? {
|
|
6040
|
+
images: options,
|
|
6041
|
+
startPosition
|
|
6042
|
+
} : options;
|
|
6043
|
+
instance$1.open(extend$1({}, defaultConfig, options));
|
|
6044
|
+
return instance$1;
|
|
6045
|
+
};
|
|
4703
6046
|
withInstall(stdin_default$1);
|
|
4704
6047
|
const [name, bem] = createNamespace("notify");
|
|
4705
6048
|
const popupInheritProps = ["lockScroll", "position", "show", "teleport", "zIndex"];
|
|
@@ -14785,7 +16128,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
14785
16128
|
function valuesIn(object) {
|
|
14786
16129
|
return object == null ? [] : baseValues(object, keysIn(object));
|
|
14787
16130
|
}
|
|
14788
|
-
function
|
|
16131
|
+
function clamp2(number, lower, upper) {
|
|
14789
16132
|
if (upper === undefined$12) {
|
|
14790
16133
|
upper = lower;
|
|
14791
16134
|
lower = undefined$12;
|
|
@@ -15459,7 +16802,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15459
16802
|
lodash2.camelCase = camelCase;
|
|
15460
16803
|
lodash2.capitalize = capitalize;
|
|
15461
16804
|
lodash2.ceil = ceil;
|
|
15462
|
-
lodash2.clamp =
|
|
16805
|
+
lodash2.clamp = clamp2;
|
|
15463
16806
|
lodash2.clone = clone2;
|
|
15464
16807
|
lodash2.cloneDeep = cloneDeep;
|
|
15465
16808
|
lodash2.cloneDeepWith = cloneDeepWith;
|
|
@@ -15797,7 +17140,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15797
17140
|
const _hoisted_1$k = {
|
|
15798
17141
|
class: "widget"
|
|
15799
17142
|
};
|
|
15800
|
-
const _hoisted_2$
|
|
17143
|
+
const _hoisted_2$d = /* @__PURE__ */ vue.createTextVNode("\u9A73\u56DE");
|
|
15801
17144
|
const _hoisted_3$a = /* @__PURE__ */ vue.createTextVNode("\u63D0\u4EA4");
|
|
15802
17145
|
const _hoisted_4$9 = /* @__PURE__ */ vue.createTextVNode("\u7533\u8BF7");
|
|
15803
17146
|
const _hoisted_5$9 = {
|
|
@@ -16095,7 +17438,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
16095
17438
|
type: "danger",
|
|
16096
17439
|
onClick: onRefuse
|
|
16097
17440
|
}, {
|
|
16098
|
-
default: vue.withCtx(() => [_hoisted_2$
|
|
17441
|
+
default: vue.withCtx(() => [_hoisted_2$d]),
|
|
16099
17442
|
_: 1
|
|
16100
17443
|
})]),
|
|
16101
17444
|
_: 1
|
|
@@ -16429,7 +17772,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
16429
17772
|
const _hoisted_1$j = {
|
|
16430
17773
|
class: "select-all-container"
|
|
16431
17774
|
};
|
|
16432
|
-
const _hoisted_2$
|
|
17775
|
+
const _hoisted_2$c = /* @__PURE__ */ vue.createTextVNode("\u5168\u9009");
|
|
16433
17776
|
const _hoisted_3$9 = {
|
|
16434
17777
|
class: "checkbox-list"
|
|
16435
17778
|
};
|
|
@@ -16487,7 +17830,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
16487
17830
|
onClick: onToggleAll,
|
|
16488
17831
|
"label-position": "left"
|
|
16489
17832
|
}, {
|
|
16490
|
-
default: vue.withCtx(() => [_hoisted_2$
|
|
17833
|
+
default: vue.withCtx(() => [_hoisted_2$c]),
|
|
16491
17834
|
_: 1
|
|
16492
17835
|
}, 8, ["modelValue"])]), vue.createElementVNode("div", _hoisted_3$9, [vue.createVNode(_component_van_checkbox_group, {
|
|
16493
17836
|
modelValue: vue.unref(modelValue),
|
|
@@ -17188,7 +18531,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17188
18531
|
const _hoisted_1$h = {
|
|
17189
18532
|
class: "pad10 flex-between showMultipleButton"
|
|
17190
18533
|
};
|
|
17191
|
-
const _hoisted_2$
|
|
18534
|
+
const _hoisted_2$b = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
|
|
17192
18535
|
const _hoisted_3$8 = {
|
|
17193
18536
|
class: "bold"
|
|
17194
18537
|
};
|
|
@@ -17427,7 +18770,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17427
18770
|
size: "normal",
|
|
17428
18771
|
onClick: cancelSelection
|
|
17429
18772
|
}, {
|
|
17430
|
-
default: vue.withCtx(() => [_hoisted_2$
|
|
18773
|
+
default: vue.withCtx(() => [_hoisted_2$b]),
|
|
17431
18774
|
_: 1
|
|
17432
18775
|
}), vue.createElementVNode("div", _hoisted_3$8, vue.toDisplayString(__props.label), 1), vue.createVNode(_component_van_button, {
|
|
17433
18776
|
plain: "",
|
|
@@ -17516,7 +18859,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17516
18859
|
key: 0,
|
|
17517
18860
|
class: "confirmation-tips"
|
|
17518
18861
|
};
|
|
17519
|
-
const _hoisted_2$
|
|
18862
|
+
const _hoisted_2$a = {
|
|
17520
18863
|
class: "option-text"
|
|
17521
18864
|
};
|
|
17522
18865
|
const _sfc_main$m = {
|
|
@@ -17575,7 +18918,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17575
18918
|
"icon-size": "18px",
|
|
17576
18919
|
class: "custom-checkbox"
|
|
17577
18920
|
}, {
|
|
17578
|
-
default: vue.withCtx(() => [vue.createElementVNode("span", _hoisted_2$
|
|
18921
|
+
default: vue.withCtx(() => [vue.createElementVNode("span", _hoisted_2$a, vue.toDisplayString(item.label), 1)]),
|
|
17579
18922
|
_: 2
|
|
17580
18923
|
}, 1032, ["name"])]);
|
|
17581
18924
|
}), 128))]),
|
|
@@ -17589,7 +18932,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17589
18932
|
const _hoisted_1$f = {
|
|
17590
18933
|
class: "department-selector"
|
|
17591
18934
|
};
|
|
17592
|
-
const _hoisted_2$
|
|
18935
|
+
const _hoisted_2$9 = {
|
|
17593
18936
|
class: "popup-container"
|
|
17594
18937
|
};
|
|
17595
18938
|
const _hoisted_3$7 = {
|
|
@@ -17876,7 +19219,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17876
19219
|
position: "bottom",
|
|
17877
19220
|
class: "department-popup"
|
|
17878
19221
|
}, {
|
|
17879
|
-
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_2$
|
|
19222
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_2$9, [vue.createElementVNode("div", _hoisted_3$7, [vue.unref(currentLevel) > 0 ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
17880
19223
|
key: 0,
|
|
17881
19224
|
onClick: goBack,
|
|
17882
19225
|
icon: "arrow-left",
|
|
@@ -17949,7 +19292,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17949
19292
|
const _hoisted_1$e = {
|
|
17950
19293
|
class: "user-selector"
|
|
17951
19294
|
};
|
|
17952
|
-
const _hoisted_2$
|
|
19295
|
+
const _hoisted_2$8 = {
|
|
17953
19296
|
class: "popup-container"
|
|
17954
19297
|
};
|
|
17955
19298
|
const _hoisted_3$6 = {
|
|
@@ -18348,7 +19691,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18348
19691
|
position: "bottom",
|
|
18349
19692
|
class: "user-popup"
|
|
18350
19693
|
}, {
|
|
18351
|
-
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_2$
|
|
19694
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_2$8, [vue.createElementVNode("div", _hoisted_3$6, [vue.createElementVNode("div", _hoisted_4$6, [vue.unref(currentLevel) > 0 ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
18352
19695
|
key: 0,
|
|
18353
19696
|
onClick: goBack,
|
|
18354
19697
|
icon: "arrow-left",
|
|
@@ -18603,10 +19946,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18603
19946
|
}
|
|
18604
19947
|
};
|
|
18605
19948
|
var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-16be97a4"]]);
|
|
18606
|
-
var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".
|
|
19949
|
+
var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-box .cover[data-v-dc257922] {\n width: 80px;\n height: 80px;\n}")();
|
|
18607
19950
|
const _hoisted_1$c = {
|
|
18608
19951
|
class: "image-box"
|
|
18609
19952
|
};
|
|
19953
|
+
const _hoisted_2$7 = ["src", "onClick"];
|
|
18610
19954
|
const _sfc_main$i = {
|
|
18611
19955
|
__name: "images_picker",
|
|
18612
19956
|
props: {
|
|
@@ -18640,7 +19984,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18640
19984
|
},
|
|
18641
19985
|
max: {
|
|
18642
19986
|
type: Number,
|
|
18643
|
-
default:
|
|
19987
|
+
default: 1e4
|
|
18644
19988
|
},
|
|
18645
19989
|
rules: {
|
|
18646
19990
|
type: Array,
|
|
@@ -18649,6 +19993,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18649
19993
|
auth: {
|
|
18650
19994
|
type: String,
|
|
18651
19995
|
default: ""
|
|
19996
|
+
},
|
|
19997
|
+
maxPreview: {
|
|
19998
|
+
type: Number,
|
|
19999
|
+
default: 1
|
|
18652
20000
|
}
|
|
18653
20001
|
},
|
|
18654
20002
|
emits: ["update:modelValue"],
|
|
@@ -18656,7 +20004,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18656
20004
|
emit
|
|
18657
20005
|
}) {
|
|
18658
20006
|
const props = __props;
|
|
18659
|
-
useVModel(props, "modelValue", emit);
|
|
20007
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
18660
20008
|
const {
|
|
18661
20009
|
isRequired,
|
|
18662
20010
|
isReadonly,
|
|
@@ -18664,6 +20012,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18664
20012
|
isDisabled
|
|
18665
20013
|
} = util.props2auth(props);
|
|
18666
20014
|
const files = vue.ref([]);
|
|
20015
|
+
const isPreviewMore = vue.ref(false);
|
|
20016
|
+
const previews = vue.computed(() => {
|
|
20017
|
+
if (!modelValue.value || modelValue.value.length < 1)
|
|
20018
|
+
return [];
|
|
20019
|
+
if (props.maxPreview > modelValue.value.length || isPreviewMore.value)
|
|
20020
|
+
return modelValue.value;
|
|
20021
|
+
return modelValue.value.slice(0, props.maxPreview);
|
|
20022
|
+
});
|
|
18667
20023
|
vue.onMounted(() => {
|
|
18668
20024
|
});
|
|
18669
20025
|
const onAfterRead = (file) => __async(this, null, function* () {
|
|
@@ -18692,6 +20048,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18692
20048
|
emit("update:modelValue", newUrls);
|
|
18693
20049
|
return Promise.resolve(e);
|
|
18694
20050
|
};
|
|
20051
|
+
const onPreview = (i) => {
|
|
20052
|
+
showImagePreview({
|
|
20053
|
+
images: modelValue.value,
|
|
20054
|
+
startPosition: i
|
|
20055
|
+
});
|
|
20056
|
+
};
|
|
20057
|
+
const onToggleMore = () => {
|
|
20058
|
+
isPreviewMore.value = !isPreviewMore.value;
|
|
20059
|
+
};
|
|
18695
20060
|
vue.watch(() => props.modelValue, (newVal, oldVal) => {
|
|
18696
20061
|
if (!props.modelValue || props.modelValue.length < 1) {
|
|
18697
20062
|
files.value = [];
|
|
@@ -18708,6 +20073,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18708
20073
|
});
|
|
18709
20074
|
return (_ctx, _cache) => {
|
|
18710
20075
|
const _component_van_uploader = vue.resolveComponent("van-uploader");
|
|
20076
|
+
const _component_van_icon = vue.resolveComponent("van-icon");
|
|
18711
20077
|
const _component_van_field = vue.resolveComponent("van-field");
|
|
18712
20078
|
return vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
18713
20079
|
name: "image",
|
|
@@ -18717,7 +20083,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18717
20083
|
"label-class": "label",
|
|
18718
20084
|
placeholder: props.placeholder
|
|
18719
20085
|
}, {
|
|
18720
|
-
input: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$c, [props.capture ? (vue.openBlock(), vue.createBlock(_component_van_uploader, {
|
|
20086
|
+
input: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$c, [props.capture && !vue.unref(isReadonly) && !vue.unref(isDisabled) ? (vue.openBlock(), vue.createBlock(_component_van_uploader, {
|
|
18721
20087
|
key: 0,
|
|
18722
20088
|
modelValue: files.value,
|
|
18723
20089
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
|
|
@@ -18729,7 +20095,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18729
20095
|
afterRead: onAfterRead,
|
|
18730
20096
|
"before-delete": onBeforeDelete,
|
|
18731
20097
|
"show-upload": !vue.unref(isReadonly)
|
|
18732
|
-
}, null, 8, ["modelValue", "max-count", "capture", "disabled", "deletable", "show-upload"])) : (vue.openBlock(), vue.createBlock(_component_van_uploader, {
|
|
20098
|
+
}, null, 8, ["modelValue", "max-count", "capture", "disabled", "deletable", "show-upload"])) : vue.createCommentVNode("", true), !props.capture && !vue.unref(isReadonly) && !vue.unref(isDisabled) ? (vue.openBlock(), vue.createBlock(_component_van_uploader, {
|
|
18733
20099
|
key: 1,
|
|
18734
20100
|
modelValue: files.value,
|
|
18735
20101
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => files.value = $event),
|
|
@@ -18740,14 +20106,27 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18740
20106
|
afterRead: onAfterRead,
|
|
18741
20107
|
"before-delete": onBeforeDelete,
|
|
18742
20108
|
"show-upload": !vue.unref(isReadonly)
|
|
18743
|
-
}, null, 8, ["modelValue", "max-count", "disabled", "deletable", "show-upload"]))
|
|
20109
|
+
}, null, 8, ["modelValue", "max-count", "disabled", "deletable", "show-upload"])) : vue.createCommentVNode("", true), vue.unref(isReadonly) || vue.unref(isDisabled) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
20110
|
+
key: 2
|
|
20111
|
+
}, vue.renderList(vue.unref(previews), (cover, i) => {
|
|
20112
|
+
return vue.openBlock(), vue.createElementBlock("img", {
|
|
20113
|
+
class: "cover",
|
|
20114
|
+
key: i,
|
|
20115
|
+
src: cover,
|
|
20116
|
+
onClick: ($event) => onPreview(i)
|
|
20117
|
+
}, null, 8, _hoisted_2$7);
|
|
20118
|
+
}), 128)) : vue.createCommentVNode("", true), vue.unref(modelValue).length > props.maxPreview && (vue.unref(isReadonly) || vue.unref(isDisabled)) ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
20119
|
+
key: 3,
|
|
20120
|
+
name: "ellipsis",
|
|
20121
|
+
onClick: onToggleMore
|
|
20122
|
+
})) : vue.createCommentVNode("", true)])]),
|
|
18744
20123
|
_: 1
|
|
18745
20124
|
}, 8, ["label", "required", "rules", "placeholder"]);
|
|
18746
20125
|
};
|
|
18747
20126
|
}
|
|
18748
20127
|
};
|
|
18749
|
-
var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
18750
|
-
var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-
|
|
20128
|
+
var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-dc257922"]]);
|
|
20129
|
+
var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-df75f4fa] .label {\n color: #000 !important;\n}\n[data-v-df75f4fa] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
|
|
18751
20130
|
const _hoisted_1$b = {
|
|
18752
20131
|
class: "file-box"
|
|
18753
20132
|
};
|
|
@@ -18766,6 +20145,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18766
20145
|
type: Boolean,
|
|
18767
20146
|
default: false
|
|
18768
20147
|
},
|
|
20148
|
+
maxCount: {
|
|
20149
|
+
type: Number,
|
|
20150
|
+
default: 1e3
|
|
20151
|
+
},
|
|
18769
20152
|
required: {
|
|
18770
20153
|
type: Boolean,
|
|
18771
20154
|
default: false
|
|
@@ -18804,6 +20187,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18804
20187
|
isDisabled
|
|
18805
20188
|
} = util.props2auth(props);
|
|
18806
20189
|
const files = vue.ref([]);
|
|
20190
|
+
const maxCount = vue.computed(() => {
|
|
20191
|
+
if (props.multiple)
|
|
20192
|
+
return props.maxCount;
|
|
20193
|
+
else
|
|
20194
|
+
return 1;
|
|
20195
|
+
});
|
|
18807
20196
|
vue.onMounted(() => {
|
|
18808
20197
|
});
|
|
18809
20198
|
const onClickPreview = (e) => {
|
|
@@ -18812,20 +20201,34 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18812
20201
|
return;
|
|
18813
20202
|
window.location.href = e.url;
|
|
18814
20203
|
};
|
|
18815
|
-
const onAfterRead = (
|
|
18816
|
-
console.log(
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
|
|
20204
|
+
const onAfterRead = (e) => __async(this, null, function* () {
|
|
20205
|
+
console.log("onAfterRead", e);
|
|
20206
|
+
if (props.multiple) {
|
|
20207
|
+
if (e && e.length > 0) {
|
|
20208
|
+
for (var i = 0; i < e.length; i++) {
|
|
20209
|
+
let params = {
|
|
20210
|
+
file: e[i].file
|
|
20211
|
+
};
|
|
20212
|
+
let res = yield util.file_upload(params);
|
|
20213
|
+
if (res.code == 200) {
|
|
20214
|
+
modelValue.value = [...modelValue.value || [], res.data];
|
|
20215
|
+
}
|
|
20216
|
+
}
|
|
20217
|
+
return Promise.resolve(e);
|
|
20218
|
+
}
|
|
20219
|
+
} else {
|
|
20220
|
+
let params = {
|
|
20221
|
+
file: e.file
|
|
20222
|
+
};
|
|
20223
|
+
let res = yield util.file_upload(params);
|
|
20224
|
+
if (res.code == 200) {
|
|
18824
20225
|
modelValue.value = res.data;
|
|
18825
|
-
|
|
18826
|
-
|
|
20226
|
+
return Promise.resolve(e);
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
18827
20229
|
});
|
|
18828
20230
|
const onBeforeDelete = (e) => {
|
|
20231
|
+
console.log("onBeforeDelete", e);
|
|
18829
20232
|
if (props.multiple) {
|
|
18830
20233
|
let newUrls = props.modelValue.filter((item) => {
|
|
18831
20234
|
return item != e.url;
|
|
@@ -18874,7 +20277,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18874
20277
|
input: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$b, [vue.createVNode(_component_van_uploader, {
|
|
18875
20278
|
modelValue: files.value,
|
|
18876
20279
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
|
|
18877
|
-
|
|
20280
|
+
multiple: props.multiple,
|
|
20281
|
+
"max-count": vue.unref(maxCount),
|
|
18878
20282
|
afterRead: onAfterRead,
|
|
18879
20283
|
disabled: vue.unref(isDisabled),
|
|
18880
20284
|
accept: props.accept,
|
|
@@ -18882,13 +20286,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18882
20286
|
deletable: !vue.unref(isDisabled),
|
|
18883
20287
|
"before-delete": onBeforeDelete,
|
|
18884
20288
|
onClickPreview
|
|
18885
|
-
}, null, 8, ["modelValue", "max-count", "disabled", "accept", "deletable"])])]),
|
|
20289
|
+
}, null, 8, ["modelValue", "multiple", "max-count", "disabled", "accept", "deletable"])])]),
|
|
18886
20290
|
_: 1
|
|
18887
20291
|
}, 8, ["label", "required", "rules", "placeholder"])) : vue.createCommentVNode("", true);
|
|
18888
20292
|
};
|
|
18889
20293
|
}
|
|
18890
20294
|
};
|
|
18891
|
-
var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
20295
|
+
var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-df75f4fa"]]);
|
|
18892
20296
|
var SingleUserSelector_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.user-popup[data-v-a489ca4c] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.department-selector[data-v-a489ca4c] {\r\n padding: 10px;\n}\n.search-buttons[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-a489ca4c] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-a489ca4c] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-a489ca4c] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.picker-header[data-v-a489ca4c] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-a489ca4c] {\r\n flex: 1;\r\n font-size: 14px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-a489ca4c] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-a489ca4c] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\r\n")();
|
|
18893
20297
|
const _hoisted_1$a = {
|
|
18894
20298
|
class: "department-selector"
|