zartui 3.1.92 → 3.1.94
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/es/composables/use-media-download.d.ts +20 -0
- package/es/composables/use-media-download.mjs +111 -0
- package/es/drawer-select/DrawerSelect.mjs +13 -30
- package/es/drawer-select/index.css +1 -1
- package/es/image-preview/ImagePreview.d.ts +2 -5
- package/es/image-preview/ImagePreview.mjs +32 -79
- package/es/image-preview/function-call.mjs +4 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +1 -2
- package/es/image-preview/style/index.mjs +2 -0
- package/es/image-preview/types.d.ts +3 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/media-picker/MediaPicker.d.ts +1 -1
- package/es/media-picker/MediaPicker.mjs +54 -36
- package/es/media-picker/index.d.ts +2 -2
- package/es/media-picker/style/index.mjs +3 -1
- package/es/media-player/MediaPlayer.d.ts +21 -0
- package/es/media-player/MediaPlayer.mjs +25 -2
- package/es/media-player/index.css +1 -1
- package/es/media-player/index.d.ts +14 -0
- package/es/media-player/style/index.mjs +4 -0
- package/es/photo-picker/index.d.ts +2 -2
- package/es/photo-picker/style/index.mjs +2 -0
- package/es/uploader/style/index.mjs +2 -0
- package/lib/composables/use-media-download.d.ts +20 -0
- package/lib/composables/use-media-download.js +138 -0
- package/lib/drawer-select/DrawerSelect.js +12 -29
- package/lib/drawer-select/index.css +1 -1
- package/lib/image-preview/ImagePreview.d.ts +2 -5
- package/lib/image-preview/ImagePreview.js +32 -79
- package/lib/image-preview/function-call.js +4 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +1 -2
- package/lib/image-preview/style/index.js +2 -0
- package/lib/image-preview/types.d.ts +3 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/MediaPicker.d.ts +1 -1
- package/lib/media-picker/MediaPicker.js +51 -35
- package/lib/media-picker/index.d.ts +2 -2
- package/lib/media-picker/style/index.js +3 -1
- package/lib/media-player/MediaPlayer.d.ts +21 -0
- package/lib/media-player/MediaPlayer.js +25 -2
- package/lib/media-player/index.css +1 -1
- package/lib/media-player/index.d.ts +14 -0
- package/lib/media-player/style/index.js +4 -0
- package/lib/photo-picker/index.d.ts +2 -2
- package/lib/photo-picker/style/index.js +2 -0
- package/lib/uploader/style/index.js +2 -0
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +208 -134
- package/lib/zartui.es.js +208 -134
- package/lib/zartui.js +216 -142
- package/lib/zartui.min.js +2 -2
- package/package.json +5 -5
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
var __async = (__this, __arguments, generator) => {
|
|
2
21
|
return new Promise((resolve, reject) => {
|
|
3
22
|
var fulfilled = (value) => {
|
|
@@ -21,7 +40,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21
40
|
import { createVNode as _createVNode, mergeProps as _mergeProps, vShow as _vShow, withDirectives as _withDirectives } from "vue";
|
|
22
41
|
import { createNamespace, isDef, isWeixin, makeArrayProp, makeNumberProp, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
23
42
|
import { computed, defineComponent, nextTick, onBeforeUnmount, ref, watch } from "vue";
|
|
24
|
-
import { showFailToast
|
|
43
|
+
import { showFailToast } from "../toast/index.mjs";
|
|
25
44
|
import DeleteIcon from "./image/DeleteIcon.mjs";
|
|
26
45
|
import { fileTypeFromBuffer } from "file-type";
|
|
27
46
|
import ZtGrid from "../grid/index.mjs";
|
|
@@ -46,6 +65,7 @@ import { isEmptyValue } from "../field/utils.mjs";
|
|
|
46
65
|
import { wxUploadImage } from "./util/wx-util.mjs";
|
|
47
66
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
48
67
|
import Sortable from "sortablejs";
|
|
68
|
+
import { useMediaDownload } from "../composables/use-media-download.mjs";
|
|
49
69
|
const [name, bem] = createNamespace("media-picker");
|
|
50
70
|
const FILE_SIZE_LIMIT = 100;
|
|
51
71
|
const COMPATIBLE_TYPE_MAPPINGS = {
|
|
@@ -131,6 +151,9 @@ var stdin_default = defineComponent({
|
|
|
131
151
|
emit,
|
|
132
152
|
slots
|
|
133
153
|
}) {
|
|
154
|
+
const {
|
|
155
|
+
downloadFile
|
|
156
|
+
} = useMediaDownload(props);
|
|
134
157
|
const videoOptionsVisible = ref(false);
|
|
135
158
|
const audioOptionsVisible = ref(false);
|
|
136
159
|
const photoOptionsVisible = ref(false);
|
|
@@ -138,6 +161,8 @@ var stdin_default = defineComponent({
|
|
|
138
161
|
const mediaPlayerVisible = ref(false);
|
|
139
162
|
const mediaTypeToPlay = ref("file");
|
|
140
163
|
const mediaUrlToPlay = ref("");
|
|
164
|
+
const mediaFileNameToPlay = ref("");
|
|
165
|
+
const mediaIndexToPlay = ref(0);
|
|
141
166
|
const cameraInputRef = ref();
|
|
142
167
|
const imageInputRef = ref();
|
|
143
168
|
const camcorderInputRef = ref();
|
|
@@ -823,7 +848,6 @@ var stdin_default = defineComponent({
|
|
|
823
848
|
deleteMedia(media, index);
|
|
824
849
|
});
|
|
825
850
|
const previewMedia = (index) => __async(this, null, function* () {
|
|
826
|
-
var _a;
|
|
827
851
|
if (props.preview && (yield props.preview(props.mediaList, index))) {
|
|
828
852
|
return;
|
|
829
853
|
}
|
|
@@ -832,7 +856,9 @@ var stdin_default = defineComponent({
|
|
|
832
856
|
const imageIndex = imageList.value.indexOf(media);
|
|
833
857
|
showImagePreview({
|
|
834
858
|
images: imageList.value.map((image) => ({
|
|
835
|
-
url: image.url || image.showSrc || ""
|
|
859
|
+
url: image.url || image.showSrc || "",
|
|
860
|
+
title: image.label,
|
|
861
|
+
fileName: image.originalName || image.fileName
|
|
836
862
|
})),
|
|
837
863
|
showDownload: props.showDownload,
|
|
838
864
|
downloadAction: props.downloadAction,
|
|
@@ -844,45 +870,28 @@ var stdin_default = defineComponent({
|
|
|
844
870
|
showFailToast("\u6587\u4EF6\u53C2\u6570\u7F3A\u5931");
|
|
845
871
|
} else {
|
|
846
872
|
mediaTypeToPlay.value = media.type;
|
|
873
|
+
mediaFileNameToPlay.value = media.originalName || media.fileName;
|
|
874
|
+
mediaIndexToPlay.value = index;
|
|
847
875
|
mediaUrlToPlay.value = media.url || (URL || webkitURL).createObjectURL(media.file);
|
|
848
876
|
mediaPlayerVisible.value = true;
|
|
849
877
|
}
|
|
850
878
|
} else if (media.type === "file") {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
url: media.url
|
|
863
|
-
}).then(({
|
|
864
|
-
tempFilePath
|
|
865
|
-
}) => {
|
|
866
|
-
if (fileJsi && fileJsi.openDocument) {
|
|
867
|
-
fileJsi.openDocument({
|
|
868
|
-
localFilePath: tempFilePath
|
|
869
|
-
}).finally(() => {
|
|
870
|
-
closeToast();
|
|
871
|
-
});
|
|
872
|
-
} else {
|
|
873
|
-
closeToast();
|
|
874
|
-
}
|
|
875
|
-
}).catch(() => {
|
|
876
|
-
closeToast();
|
|
877
|
-
showFailToast("\u4E0B\u8F7D\u5931\u8D25");
|
|
878
|
-
});
|
|
879
|
-
return;
|
|
879
|
+
if (props.showDownload) {
|
|
880
|
+
const url = media.url || (media.file ? URL.createObjectURL(media.file) : "");
|
|
881
|
+
try {
|
|
882
|
+
yield downloadFile({
|
|
883
|
+
url,
|
|
884
|
+
fileName: media.originalName || media.fileName,
|
|
885
|
+
index
|
|
886
|
+
});
|
|
887
|
+
} finally {
|
|
888
|
+
if (!media.url && url) {
|
|
889
|
+
URL.revokeObjectURL(url);
|
|
880
890
|
}
|
|
881
891
|
}
|
|
882
|
-
}
|
|
883
|
-
|
|
892
|
+
} else {
|
|
893
|
+
showFailToast("\u6682\u4E0D\u652F\u6301\u6B64\u7C7B\u6587\u4EF6\u7684\u9884\u89C8");
|
|
884
894
|
}
|
|
885
|
-
showFailToast("\u6682\u4E0D\u652F\u6301\u6B64\u7C7B\u6587\u4EF6\u7684\u9884\u89C8");
|
|
886
895
|
}
|
|
887
896
|
});
|
|
888
897
|
const renderMediaListPlaceholder = () => {
|
|
@@ -949,7 +958,16 @@ var stdin_default = defineComponent({
|
|
|
949
958
|
"mediaType": mediaTypeToPlay.value,
|
|
950
959
|
"mediaUrl": mediaUrlToPlay.value,
|
|
951
960
|
"teleport": "body"
|
|
952
|
-
}, props.mediaPlayerProps
|
|
961
|
+
}, props.mediaPlayerProps, {
|
|
962
|
+
"showDownload": props.showDownload,
|
|
963
|
+
"fileName": mediaFileNameToPlay.value,
|
|
964
|
+
"downloadAction": (params) => {
|
|
965
|
+
var _a, _b, _c;
|
|
966
|
+
return (_c = (_b = props.downloadAction || ((_a = props.mediaPlayerProps) == null ? void 0 : _a.downloadAction)) == null ? void 0 : _b(__spreadProps(__spreadValues({}, params), {
|
|
967
|
+
index: mediaIndexToPlay.value
|
|
968
|
+
}))) != null ? _c : false;
|
|
969
|
+
}
|
|
970
|
+
}), null), _createVNode(ZtActionSheet, {
|
|
953
971
|
"show": actionVisible.value,
|
|
954
972
|
"onUpdate:show": ($event) => actionVisible.value = $event,
|
|
955
973
|
"actions": actionOptions.value,
|
|
@@ -6,7 +6,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
6
6
|
disabled: BooleanConstructor;
|
|
7
7
|
showTitle: BooleanConstructor;
|
|
8
8
|
showDownload: BooleanConstructor;
|
|
9
|
-
downloadAction: import("vue").PropType<(params: import("
|
|
9
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
10
10
|
useFileNameAsLabel: BooleanConstructor;
|
|
11
11
|
title: {
|
|
12
12
|
type: import("vue").PropType<string>;
|
|
@@ -84,7 +84,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
84
84
|
disabled: BooleanConstructor;
|
|
85
85
|
showTitle: BooleanConstructor;
|
|
86
86
|
showDownload: BooleanConstructor;
|
|
87
|
-
downloadAction: import("vue").PropType<(params: import("
|
|
87
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
88
88
|
useFileNameAsLabel: BooleanConstructor;
|
|
89
89
|
title: {
|
|
90
90
|
type: import("vue").PropType<string>;
|
|
@@ -4,9 +4,11 @@ import "../../icon/index.css";
|
|
|
4
4
|
import "../../image/index.css";
|
|
5
5
|
import "../../overlay/index.css";
|
|
6
6
|
import "../../popup/index.css";
|
|
7
|
-
import "../../media-player/index.css";
|
|
8
7
|
import "../../loading/index.css";
|
|
9
8
|
import "../../toast/index.css";
|
|
9
|
+
import "../../button/index.css";
|
|
10
|
+
import "../../dialog/index.css";
|
|
11
|
+
import "../../media-player/index.css";
|
|
10
12
|
import "../../action-sheet/index.css";
|
|
11
13
|
import "../../swipe/index.css";
|
|
12
14
|
import "../../swipe-item/index.css";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MediaType } from '../media-picker/type';
|
|
2
2
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import type { DownloadActionParams } from '../composables/use-media-download';
|
|
3
4
|
declare const mediaPlayerProps: {
|
|
4
5
|
show: BooleanConstructor;
|
|
5
6
|
mediaType: {
|
|
@@ -10,6 +11,12 @@ declare const mediaPlayerProps: {
|
|
|
10
11
|
type: PropType<string>;
|
|
11
12
|
default: string;
|
|
12
13
|
};
|
|
14
|
+
fileName: {
|
|
15
|
+
type: PropType<string>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
showDownload: BooleanConstructor;
|
|
19
|
+
downloadAction: PropType<(params: DownloadActionParams) => boolean>;
|
|
13
20
|
/** 视频播放时的控件展示列表,参考:https://wicg.github.io/controls-list/explainer.html */
|
|
14
21
|
controlsList: {
|
|
15
22
|
type: PropType<string[]>;
|
|
@@ -28,6 +35,12 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
28
35
|
type: PropType<string>;
|
|
29
36
|
default: string;
|
|
30
37
|
};
|
|
38
|
+
fileName: {
|
|
39
|
+
type: PropType<string>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
showDownload: BooleanConstructor;
|
|
43
|
+
downloadAction: PropType<(params: DownloadActionParams) => boolean>;
|
|
31
44
|
/** 视频播放时的控件展示列表,参考:https://wicg.github.io/controls-list/explainer.html */
|
|
32
45
|
controlsList: {
|
|
33
46
|
type: PropType<string[]>;
|
|
@@ -44,6 +57,12 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
44
57
|
type: PropType<string>;
|
|
45
58
|
default: string;
|
|
46
59
|
};
|
|
60
|
+
fileName: {
|
|
61
|
+
type: PropType<string>;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
showDownload: BooleanConstructor;
|
|
65
|
+
downloadAction: PropType<(params: DownloadActionParams) => boolean>;
|
|
47
66
|
/** 视频播放时的控件展示列表,参考:https://wicg.github.io/controls-list/explainer.html */
|
|
48
67
|
controlsList: {
|
|
49
68
|
type: PropType<string[]>;
|
|
@@ -55,7 +74,9 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
55
74
|
}>, {
|
|
56
75
|
show: boolean;
|
|
57
76
|
controlsList: string[];
|
|
77
|
+
showDownload: boolean;
|
|
58
78
|
mediaType: MediaType;
|
|
59
79
|
mediaUrl: string;
|
|
80
|
+
fileName: string;
|
|
60
81
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
82
|
export default _default;
|
|
@@ -2,10 +2,15 @@ import { createTextVNode as _createTextVNode, createVNode as _createVNode } from
|
|
|
2
2
|
import { createNamespace, isIOS, isWeixin, makeArrayProp, makeStringProp } from "../utils/index.mjs";
|
|
3
3
|
import { defineComponent, nextTick, ref } from "vue";
|
|
4
4
|
import ZtPopup from "../popup/index.mjs";
|
|
5
|
+
import ZtIcon from "../icon/index.mjs";
|
|
6
|
+
import { useMediaDownload } from "../composables/use-media-download.mjs";
|
|
5
7
|
const mediaPlayerProps = {
|
|
6
8
|
show: Boolean,
|
|
7
9
|
mediaType: makeStringProp("file"),
|
|
8
10
|
mediaUrl: makeStringProp(""),
|
|
11
|
+
fileName: makeStringProp(""),
|
|
12
|
+
showDownload: Boolean,
|
|
13
|
+
downloadAction: Function,
|
|
9
14
|
/** 视频播放时的控件展示列表,参考:https://wicg.github.io/controls-list/explainer.html */
|
|
10
15
|
controlsList: makeArrayProp([]),
|
|
11
16
|
teleport: [String, Object]
|
|
@@ -20,6 +25,15 @@ var stdin_default = defineComponent({
|
|
|
20
25
|
}) {
|
|
21
26
|
const audioRef = ref();
|
|
22
27
|
const videoRef = ref();
|
|
28
|
+
const {
|
|
29
|
+
downloading,
|
|
30
|
+
download
|
|
31
|
+
} = useMediaDownload(props);
|
|
32
|
+
const onDownload = () => download({
|
|
33
|
+
index: 0,
|
|
34
|
+
url: props.mediaUrl,
|
|
35
|
+
fileName: props.fileName
|
|
36
|
+
});
|
|
23
37
|
const getMediaElement = () => {
|
|
24
38
|
let player;
|
|
25
39
|
if (props.mediaType === "audio") {
|
|
@@ -66,7 +80,7 @@ var stdin_default = defineComponent({
|
|
|
66
80
|
"src": props.mediaUrl,
|
|
67
81
|
"ref": videoRef,
|
|
68
82
|
"controls": true,
|
|
69
|
-
"controlslist": props.controlsList.join(" "),
|
|
83
|
+
"controlslist": [.../* @__PURE__ */ new Set([...props.controlsList, "nodownload"])].join(" "),
|
|
70
84
|
"autoplay": true,
|
|
71
85
|
"id": "video",
|
|
72
86
|
"webkit-playsinline": true,
|
|
@@ -102,7 +116,16 @@ var stdin_default = defineComponent({
|
|
|
102
116
|
"type": "button",
|
|
103
117
|
"class": bem("cancel-btn"),
|
|
104
118
|
"onClick": onClose
|
|
105
|
-
}, [_createTextVNode("\u5173\u95ED")])
|
|
119
|
+
}, [_createTextVNode("\u5173\u95ED")]), props.showDownload && props.mediaType === "video" && props.mediaUrl && !props.mediaUrl.startsWith("data:") && _createVNode("button", {
|
|
120
|
+
"type": "button",
|
|
121
|
+
"class": bem("download-btn"),
|
|
122
|
+
"aria-label": "\u4E0B\u8F7D\u89C6\u9891",
|
|
123
|
+
"disabled": downloading.value,
|
|
124
|
+
"onClick": onDownload
|
|
125
|
+
}, [_createVNode(ZtIcon, {
|
|
126
|
+
"name": "download",
|
|
127
|
+
"size": "24"
|
|
128
|
+
}, null)])])]
|
|
106
129
|
});
|
|
107
130
|
}
|
|
108
131
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-media-player{background-color:var(--zt-background);font-size:0}.zt-media-player__video{width:100%;height:400px;max-height:70%;background-color:rgba(0,0,0,.8)}.zt-media-player__audio{width:100%}.zt-media-player__cancel{padding:8px 16px;color:var(--zt-text-color)}.zt-media-player__cancel-btn{width:100%;border:none;cursor:pointer;background-color:var(--zt-gray-a04);border-radius:20px;height:44px;font-size:var(--zt-font-size-lg);color:var(--zt-text-color);line-height:var(--zt-line-height-lg)}.zt-media-player__cancel-btn:active{opacity:var(--zt-active-opacity)}
|
|
1
|
+
.zt-media-player{background-color:var(--zt-background);font-size:0}.zt-media-player__video{width:100%;height:400px;max-height:70%;background-color:rgba(0,0,0,.8)}.zt-media-player__audio{width:100%}.zt-media-player__cancel{display:flex;align-items:center;gap:12px;padding:8px 16px;color:var(--zt-text-color)}.zt-media-player__download-btn{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:0;border:none;border-radius:20px;background-color:var(--zt-gray-a04);color:var(--zt-text-color);cursor:pointer}.zt-media-player__download-btn:active{opacity:var(--zt-active-opacity)}.zt-media-player__cancel-btn{flex:1;min-width:0;width:100%;border:none;cursor:pointer;background-color:var(--zt-gray-a04);border-radius:20px;height:44px;font-size:var(--zt-font-size-lg);color:var(--zt-text-color);line-height:var(--zt-line-height-lg)}.zt-media-player__cancel-btn:active{opacity:var(--zt-active-opacity)}
|
|
@@ -8,6 +8,12 @@ export declare const MediaPlayer: import("../utils").WithInstall<import("vue").D
|
|
|
8
8
|
type: import("vue").PropType<string>;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
+
fileName: {
|
|
12
|
+
type: import("vue").PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
showDownload: BooleanConstructor;
|
|
16
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
11
17
|
controlsList: {
|
|
12
18
|
type: import("vue").PropType<string[]>;
|
|
13
19
|
default: () => string[];
|
|
@@ -23,6 +29,12 @@ export declare const MediaPlayer: import("../utils").WithInstall<import("vue").D
|
|
|
23
29
|
type: import("vue").PropType<string>;
|
|
24
30
|
default: string;
|
|
25
31
|
};
|
|
32
|
+
fileName: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
showDownload: BooleanConstructor;
|
|
37
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
26
38
|
controlsList: {
|
|
27
39
|
type: import("vue").PropType<string[]>;
|
|
28
40
|
default: () => string[];
|
|
@@ -33,8 +45,10 @@ export declare const MediaPlayer: import("../utils").WithInstall<import("vue").D
|
|
|
33
45
|
}>, {
|
|
34
46
|
show: boolean;
|
|
35
47
|
controlsList: string[];
|
|
48
|
+
showDownload: boolean;
|
|
36
49
|
mediaType: import("..").MediaType;
|
|
37
50
|
mediaUrl: string;
|
|
51
|
+
fileName: string;
|
|
38
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
39
53
|
export default MediaPlayer;
|
|
40
54
|
export type { MediaPlayerProps } from './MediaPlayer';
|
|
@@ -3,4 +3,8 @@ import "../../badge/index.css";
|
|
|
3
3
|
import "../../icon/index.css";
|
|
4
4
|
import "../../overlay/index.css";
|
|
5
5
|
import "../../popup/index.css";
|
|
6
|
+
import "../../loading/index.css";
|
|
7
|
+
import "../../toast/index.css";
|
|
8
|
+
import "../../button/index.css";
|
|
9
|
+
import "../../dialog/index.css";
|
|
6
10
|
import "../index.css";
|
|
@@ -2,7 +2,7 @@ export declare const PhotoPicker: import("../utils").WithInstall<import("vue").D
|
|
|
2
2
|
disabled: BooleanConstructor;
|
|
3
3
|
showTitle: BooleanConstructor;
|
|
4
4
|
showDownload: BooleanConstructor;
|
|
5
|
-
downloadAction: import("vue").PropType<(params: import("
|
|
5
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
6
6
|
useFileNameAsLabel: BooleanConstructor;
|
|
7
7
|
title: {
|
|
8
8
|
type: import("vue").PropType<string>;
|
|
@@ -59,7 +59,7 @@ export declare const PhotoPicker: import("../utils").WithInstall<import("vue").D
|
|
|
59
59
|
disabled: BooleanConstructor;
|
|
60
60
|
showTitle: BooleanConstructor;
|
|
61
61
|
showDownload: BooleanConstructor;
|
|
62
|
-
downloadAction: import("vue").PropType<(params: import("
|
|
62
|
+
downloadAction: import("vue").PropType<(params: import("..").DownloadActionParams) => boolean>;
|
|
63
63
|
useFileNameAsLabel: BooleanConstructor;
|
|
64
64
|
title: {
|
|
65
65
|
type: import("vue").PropType<string>;
|
|
@@ -6,6 +6,8 @@ import "../../overlay/index.css";
|
|
|
6
6
|
import "../../popup/index.css";
|
|
7
7
|
import "../../loading/index.css";
|
|
8
8
|
import "../../toast/index.css";
|
|
9
|
+
import "../../button/index.css";
|
|
10
|
+
import "../../dialog/index.css";
|
|
9
11
|
import "../../action-sheet/index.css";
|
|
10
12
|
import "../../swipe/index.css";
|
|
11
13
|
import "../../swipe-item/index.css";
|
|
@@ -6,6 +6,8 @@ import "../../overlay/index.css";
|
|
|
6
6
|
import "../../popup/index.css";
|
|
7
7
|
import "../../loading/index.css";
|
|
8
8
|
import "../../toast/index.css";
|
|
9
|
+
import "../../button/index.css";
|
|
10
|
+
import "../../dialog/index.css";
|
|
9
11
|
import "../../swipe/index.css";
|
|
10
12
|
import "../../swipe-item/index.css";
|
|
11
13
|
import "../../image-preview/index.css";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type DownloadActionParams = {
|
|
2
|
+
index: number;
|
|
3
|
+
url?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
fileName?: string;
|
|
6
|
+
};
|
|
7
|
+
export type FileDownloadOptions = {
|
|
8
|
+
url: string;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
index?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function useMediaDownload(props: {
|
|
14
|
+
showDownload: boolean;
|
|
15
|
+
downloadAction?: (params: DownloadActionParams) => boolean;
|
|
16
|
+
}): {
|
|
17
|
+
downloading: import("vue").Ref<boolean, boolean>;
|
|
18
|
+
download: (params: DownloadActionParams, confirm?: boolean) => Promise<void>;
|
|
19
|
+
downloadFile: (options: FileDownloadOptions) => Promise<void>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
38
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
39
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
+
mod
|
|
43
|
+
));
|
|
44
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
|
+
var __async = (__this, __arguments, generator) => {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
var fulfilled = (value) => {
|
|
48
|
+
try {
|
|
49
|
+
step(generator.next(value));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
reject(e);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var rejected = (value) => {
|
|
55
|
+
try {
|
|
56
|
+
step(generator.throw(value));
|
|
57
|
+
} catch (e) {
|
|
58
|
+
reject(e);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
62
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var stdin_exports = {};
|
|
66
|
+
__export(stdin_exports, {
|
|
67
|
+
useMediaDownload: () => useMediaDownload
|
|
68
|
+
});
|
|
69
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
70
|
+
var import_vue = require("vue");
|
|
71
|
+
var import_dialog = require("../dialog");
|
|
72
|
+
var import_toast = require("../toast");
|
|
73
|
+
function useMediaDownload(props) {
|
|
74
|
+
const downloading = (0, import_vue.ref)(false);
|
|
75
|
+
const downloadInBrowser = (params) => {
|
|
76
|
+
const link = document.createElement("a");
|
|
77
|
+
link.href = params.url;
|
|
78
|
+
link.download = params.fileName || "";
|
|
79
|
+
document.body.appendChild(link);
|
|
80
|
+
link.click();
|
|
81
|
+
link.remove();
|
|
82
|
+
};
|
|
83
|
+
const download = (params, confirm = false) => __async(this, null, function* () {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
if (!props.showDownload || downloading.value || !params.url || params.url.startsWith("data:")) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
downloading.value = true;
|
|
89
|
+
try {
|
|
90
|
+
if (confirm) {
|
|
91
|
+
try {
|
|
92
|
+
yield (0, import_dialog.showConfirmDialog)({ message: "\u9644\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u662F\u5426\u4E0B\u8F7D\u539F\u6587\u4EF6" });
|
|
93
|
+
} catch (action) {
|
|
94
|
+
if (action !== "cancel") {
|
|
95
|
+
throw action;
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (!props.showDownload || ((_a = props.downloadAction) == null ? void 0 : _a.call(props, params))) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let file;
|
|
104
|
+
try {
|
|
105
|
+
const sdk = yield import("@egova/universal-js-sdk");
|
|
106
|
+
file = (_b = sdk.getJSI()) == null ? void 0 : _b.file;
|
|
107
|
+
} catch (e) {
|
|
108
|
+
downloadInBrowser(params);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (!(file == null ? void 0 : file.download)) {
|
|
112
|
+
downloadInBrowser(params);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
(0, import_toast.showLoadingToast)({ message: "\u4E0B\u8F7D\u4E2D...", forbidClick: true, duration: 0 });
|
|
116
|
+
try {
|
|
117
|
+
const result = yield file.download({ url: params.url });
|
|
118
|
+
const displayPath = (_c = result == null ? void 0 : result.tempFilePath) == null ? void 0 : _c.replace(/^\/storage\/emulated\/0\//, "");
|
|
119
|
+
(0, import_toast.closeToast)();
|
|
120
|
+
(0, import_toast.showSuccessToast)({
|
|
121
|
+
message: displayPath ? `\u4E0B\u8F7D\u6210\u529F
|
|
122
|
+
\u4FDD\u5B58\u8DEF\u5F84\uFF1A${displayPath}` : "\u4E0B\u8F7D\u6210\u529F",
|
|
123
|
+
duration: 5e3
|
|
124
|
+
});
|
|
125
|
+
} catch (e) {
|
|
126
|
+
(0, import_toast.closeToast)();
|
|
127
|
+
(0, import_toast.showFailToast)("\u4E0B\u8F7D\u5931\u8D25");
|
|
128
|
+
}
|
|
129
|
+
} finally {
|
|
130
|
+
downloading.value = false;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
const downloadFile = (options) => {
|
|
134
|
+
var _a;
|
|
135
|
+
return download(__spreadProps(__spreadValues({}, options), { index: (_a = options.index) != null ? _a : -1 }), true);
|
|
136
|
+
};
|
|
137
|
+
return { downloading, download, downloadFile };
|
|
138
|
+
}
|
|
@@ -81,7 +81,6 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
81
81
|
const commonTypesListRef = (0, import_vue.ref)();
|
|
82
82
|
const showLeftCommonTypesMask = (0, import_vue.ref)(false);
|
|
83
83
|
const showRightCommonTypesMask = (0, import_vue.ref)(false);
|
|
84
|
-
let commonTypesResizeObserver;
|
|
85
84
|
const defaultTreeNode = (0, import_vue.ref)(props.treeData);
|
|
86
85
|
const fields = (0, import_vue.computed)(() => (0, import_utils2.assignDefaultFields)(props.treeFieldName));
|
|
87
86
|
const visibleCommonTypeList = (0, import_vue.computed)(() => {
|
|
@@ -96,35 +95,25 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
96
95
|
children,
|
|
97
96
|
text: key
|
|
98
97
|
} = fields.value;
|
|
98
|
+
const syncSelectCommonId = (node) => {
|
|
99
|
+
const selectedId = node == null ? void 0 : node[value];
|
|
100
|
+
selectCommonId.value = typeof selectedId === "string" || typeof selectedId === "number" ? selectedId : -1;
|
|
101
|
+
};
|
|
102
|
+
syncSelectCommonId(props.defaultSelectNode);
|
|
103
|
+
(0, import_vue.watch)(() => props.defaultSelectNode, (node) => {
|
|
104
|
+
selectNode.value = node;
|
|
105
|
+
syncSelectCommonId(node);
|
|
106
|
+
});
|
|
99
107
|
const updateCommonTypesMask = () => {
|
|
100
108
|
const list = commonTypesListRef.value;
|
|
101
|
-
if (!list)
|
|
102
|
-
showLeftCommonTypesMask.value = false;
|
|
103
|
-
showRightCommonTypesMask.value = false;
|
|
109
|
+
if (!list)
|
|
104
110
|
return;
|
|
105
|
-
}
|
|
106
|
-
const remainingScrollWidth = list.scrollWidth - list.clientWidth - list.scrollLeft;
|
|
107
111
|
showLeftCommonTypesMask.value = list.scrollLeft > 0;
|
|
108
|
-
showRightCommonTypesMask.value =
|
|
112
|
+
showRightCommonTypesMask.value = list.scrollLeft + list.clientWidth < list.scrollWidth;
|
|
109
113
|
};
|
|
110
114
|
const onCommonTypesScroll = () => {
|
|
111
115
|
updateCommonTypesMask();
|
|
112
116
|
};
|
|
113
|
-
const observeCommonTypesList = () => {
|
|
114
|
-
commonTypesResizeObserver == null ? void 0 : commonTypesResizeObserver.disconnect();
|
|
115
|
-
const list = commonTypesListRef.value;
|
|
116
|
-
if (!list || typeof ResizeObserver === "undefined") {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
commonTypesResizeObserver = new ResizeObserver(updateCommonTypesMask);
|
|
120
|
-
commonTypesResizeObserver.observe(list);
|
|
121
|
-
};
|
|
122
|
-
const updateCommonTypesLayout = () => {
|
|
123
|
-
(0, import_vue.nextTick)(() => {
|
|
124
|
-
observeCommonTypesList();
|
|
125
|
-
updateCommonTypesMask();
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
117
|
const allData = {
|
|
129
118
|
[value]: -1,
|
|
130
119
|
[key]: "\u5168\u90E8",
|
|
@@ -201,13 +190,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
201
190
|
};
|
|
202
191
|
flatData(props.treeData);
|
|
203
192
|
updateOffset();
|
|
204
|
-
|
|
205
|
-
});
|
|
206
|
-
(0, import_vue.watch)(visibleCommonTypeList, updateCommonTypesLayout, {
|
|
207
|
-
flush: "post"
|
|
208
|
-
});
|
|
209
|
-
(0, import_vue.onBeforeUnmount)(() => {
|
|
210
|
-
commonTypesResizeObserver == null ? void 0 : commonTypesResizeObserver.disconnect();
|
|
193
|
+
(0, import_vue.nextTick)(updateCommonTypesMask);
|
|
211
194
|
});
|
|
212
195
|
const isEmpty = (item) => !item[children] || item[children].length === 0;
|
|
213
196
|
const syncExpandNodeByParent = (item) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-drawer-select-background: #ebf2f5}.zt-drawer-select{height:100%;width:100%;display:flex;flex-direction:column;background:var(--zt-background)}.zt-drawer-select__search{padding:var(--zt-padding-xs) 0}.zt-drawer-select__search--item{padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md)}.zt-drawer-select__search--item:after{left:calc(-50% + 22px)}.zt-drawer-select__search--header{font-size:var(--zt-font-size-lg);font-weight:700;color:var(--zt-text-color);margin-bottom:4px}.zt-drawer-select__search--name{font-size:var(--zt-font-size-md);color:var(--zt-text-color-2)}.zt-drawer-select__wrap{position:fixed;right:0;left:0;bottom:0;z-index:999;overflow:hidden}.zt-drawer-select__popup{position:absolute;max-height:350px;border-radius:0 0 16px 16px}.zt-drawer-select__empty{font-size:var(--zt-font-size-md);color:var(--zt-gray-a4);text-align:center;padding:var(--zt-padding-lg) 0}.zt-drawer-select__history--title{height:44px;line-height:44px;font-weight:700;padding-left:var(--zt-padding-sm);color:var(--zt-text-color)}.zt-drawer-select__history--content{padding:var(--zt-padding-sm) var(--zt-padding-md) var(--zt-padding-xs)}.zt-drawer-select__history--content .zt-tag{line-height:28px;border-radius:14px;font-size:var(--zt-font-size-md);margin-right:4px;margin-bottom:8px}.zt-drawer-select__history--clear{display:flex;align-items:center;justify-content:center;height:44px;color:var(--zt-gray-a6);text-align:center;font-size:var(--zt-font-size-md)}.zt-drawer-select__name{position:relative;height:44px;line-height:44px;font-size:var(--zt-font-size-lg);color:var(--zt-text-color);font-weight:700;padding-left:var(--zt-padding-md)}.zt-drawer-select__name:before{content:"";position:absolute;width:4px;height:16px;top:14px;left:0;background:var(--zt-primary-color)}.zt-drawer-select__common-types{width:100%;background:var(--zt-white)}.zt-drawer-select__common-types--head{display:flex;align-items:center;min-height:44px;padding-left:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-text-color)}.zt-drawer-select__common-types--label{flex-shrink:0;font-weight:700;padding-right:4px}.zt-drawer-select__common-types--mask{position:relative;flex:1;min-width:0;background:var(--zt-white)}.zt-drawer-select__common-types--mask:before,.zt-drawer-select__common-types--mask:after{content:"";position:absolute;top:0;bottom:0;width:32px;pointer-events:none;z-index:3;
|
|
1
|
+
:root{--zt-drawer-select-background: #ebf2f5}.zt-drawer-select{height:100%;width:100%;display:flex;flex-direction:column;background:var(--zt-background)}.zt-drawer-select__search{padding:var(--zt-padding-xs) 0}.zt-drawer-select__search--item{padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md)}.zt-drawer-select__search--item:after{left:calc(-50% + 22px)}.zt-drawer-select__search--header{font-size:var(--zt-font-size-lg);font-weight:700;color:var(--zt-text-color);margin-bottom:4px}.zt-drawer-select__search--name{font-size:var(--zt-font-size-md);color:var(--zt-text-color-2)}.zt-drawer-select__wrap{position:fixed;right:0;left:0;bottom:0;z-index:999;overflow:hidden}.zt-drawer-select__popup{position:absolute;max-height:350px;border-radius:0 0 16px 16px}.zt-drawer-select__empty{font-size:var(--zt-font-size-md);color:var(--zt-gray-a4);text-align:center;padding:var(--zt-padding-lg) 0}.zt-drawer-select__history--title{height:44px;line-height:44px;font-weight:700;padding-left:var(--zt-padding-sm);color:var(--zt-text-color)}.zt-drawer-select__history--content{padding:var(--zt-padding-sm) var(--zt-padding-md) var(--zt-padding-xs)}.zt-drawer-select__history--content .zt-tag{line-height:28px;border-radius:14px;font-size:var(--zt-font-size-md);margin-right:4px;margin-bottom:8px}.zt-drawer-select__history--clear{display:flex;align-items:center;justify-content:center;height:44px;color:var(--zt-gray-a6);text-align:center;font-size:var(--zt-font-size-md)}.zt-drawer-select__name{position:relative;height:44px;line-height:44px;font-size:var(--zt-font-size-lg);color:var(--zt-text-color);font-weight:700;padding-left:var(--zt-padding-md)}.zt-drawer-select__name:before{content:"";position:absolute;width:4px;height:16px;top:14px;left:0;background:var(--zt-primary-color)}.zt-drawer-select__common-types{width:100%;background:var(--zt-white)}.zt-drawer-select__common-types--head{display:flex;align-items:center;min-height:44px;padding-left:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-text-color)}.zt-drawer-select__common-types--label{flex-shrink:0;font-weight:700;padding-right:4px}.zt-drawer-select__common-types--mask{position:relative;flex:1;min-width:0;background:var(--zt-white)}.zt-drawer-select__common-types--mask:before,.zt-drawer-select__common-types--mask:after{content:"";position:absolute;top:0;bottom:0;width:32px;pointer-events:none;z-index:3;transition:opacity .2s}.zt-drawer-select__common-types--mask:before{left:-1px;opacity:0;background-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,var(--zt-white) 100%)}.zt-drawer-select__common-types--mask:after{right:-1px;opacity:0;background-image:linear-gradient(90deg,rgba(255,255,255,0) 2.78%,var(--zt-white) 100%)}.zt-drawer-select__common-types--mask--left-mask:before,.zt-drawer-select__common-types--mask--right-mask:after{opacity:1}.zt-drawer-select__common-types--viewport{min-width:0;overflow:hidden}.zt-drawer-select__common-types--list{display:flex;align-items:center;gap:4px;padding:8px 16px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none}.zt-drawer-select__common-types--list::-webkit-scrollbar{display:none}.zt-drawer-select__common-types--icon{display:flex;align-items:center;justify-content:center;width:56px;height:44px;flex-shrink:0}.zt-drawer-select__common-types--empty{flex:1;min-width:0;padding-left:8px;color:var(--zt-text-color-2);opacity:.2}.zt-drawer-select__common-types--btn{flex-shrink:0;min-width:-moz-fit-content;min-width:fit-content;border-radius:15px;opacity:1;padding-top:15px;padding-bottom:15px}.zt-drawer-select__common-types--panel{padding:0 var(--zt-padding-md) 8px;background:var(--zt-white)}.zt-drawer-select__common-types--panel-list{display:flex;flex-wrap:wrap;gap:8px 4px;padding-bottom:8px}.zt-drawer-select__common-types--clear{display:flex;align-items:center;justify-content:center;height:44px;color:var(--zt-text-color-2);opacity:.6;font-size:var(--zt-font-size-md)}.zt-drawer-select__common-types--clear-text{margin-left:4px}.zt-drawer-select__hot-types{width:100%;padding:0 16px 4px;margin-top:8px;box-sizing:border-box;background:var(--zt-white)}.zt-drawer-select__hot-types--label{height:44px;line-height:44px;font-size:var(--zt-font-size-md);font-weight:700;color:var(--zt-text-color)}.zt-drawer-select__hot-types--list{display:flex;flex-wrap:wrap;gap:8px 4px;width:100%;max-height:108px;overflow-x:hidden;overflow-y:auto;padding-bottom:8px}.zt-drawer-select__tree{display:flex;flex:1;min-height:0}.zt-drawer-select__tree-left{width:120px}.zt-drawer-select__tree-right{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--zt-white)}.zt-drawer-select__label{display:flex;align-items:center;line-height:28px;color:var(--zt-text-color);padding:var(--zt-padding-xs) 0 var(--zt-padding-xs) var(--zt-padding-base);font-size:var(--zt-font-size-md)}.zt-drawer-select__label--second{background:var(--zt-drawer-select-background);padding-left:var(--zt-padding-sm)}.zt-drawer-select__label--placeholder{display:flex;align-items:center;width:24px}.zt-drawer-select__label--text{display:flex;align-items:center;min-height:28px}.zt-drawer-select__label--icon--active{transform:rotate(90deg);color:var(--zt-primary-color)}.zt-drawer-select__label--active{color:var(--zt-primary-color);background:var(--zt-white)}.zt-drawer-select__title{display:flex;align-items:center;line-height:28px;font-size:var(--zt-font-size-md);color:var(--zt-text-color);font-weight:700;padding:var(--zt-padding-xs) var(--zt-padding-md)}.zt-drawer-select__content{flex:1;min-height:0;overflow-y:scroll}.zt-drawer-select__item--placeholder{width:30px}.zt-drawer-select__item--header{display:flex;min-height:44px;font-size:var(--zt-font-size-md);color:var(--zt-text-color);padding-left:4px}.zt-drawer-select__item--icon{display:flex;align-items:center;width:24px;margin-right:6px;height:100%}.zt-drawer-select__item--icon--active{transform:rotate(90deg);color:var(--zt-primary-color)}.zt-drawer-select__item--label{flex:1;display:flex;align-items:center;line-height:28px;padding:var(--zt-padding-xs) var(--zt-padding-md) var(--zt-padding-xs) 0}.zt-drawer-select__item--label--active{color:var(--zt-primary-color)}.zt-drawer-select__item--child{padding-left:var(--zt-padding-md)}.zt-drawer-select .zt-dialog__confirm{background:var(--zt-dialog-cancel-button-background-color);border:var(--zt-button-border-width) solid #ff5023;color:#ff5023}
|