zartui 3.1.72 → 3.1.74
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/image-preview/ImagePreview.d.ts +14 -1
- package/es/image-preview/ImagePreview.mjs +82 -5
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +7 -1
- package/es/image-preview/style/index.mjs +1 -0
- package/es/image-preview/svg/Download.d.ts +2 -0
- package/es/image-preview/svg/Download.mjs +13 -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 +4 -0
- package/es/media-picker/MediaPicker.mjs +2 -0
- package/es/media-picker/index.d.ts +3 -0
- package/es/uploader/style/index.mjs +1 -0
- package/lib/image-preview/ImagePreview.d.ts +14 -1
- package/lib/image-preview/ImagePreview.js +82 -5
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +7 -1
- package/lib/image-preview/style/index.js +1 -0
- package/lib/image-preview/svg/Download.d.ts +2 -0
- package/lib/image-preview/svg/Download.js +32 -0
- package/lib/image-preview/types.d.ts +3 -1
- package/lib/{index-8bc782d2.mjs → index-096e2873.mjs} +4220 -2916
- package/lib/{index-d66aaef4.js → index-bb5638a0.js} +4219 -2916
- 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 +4 -0
- package/lib/media-picker/MediaPicker.js +2 -0
- package/lib/media-picker/index.d.ts +3 -0
- package/lib/uploader/style/index.js +1 -0
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +93 -7
- package/lib/zartui.es.js +93 -7
- package/lib/zartui.js +4287 -2895
- package/lib/zartui.min.js +2 -2
- package/package.json +8 -8
package/lib/zartui.cjs.js
CHANGED
|
@@ -12247,6 +12247,35 @@ var stdin_default$S = vue.defineComponent({
|
|
|
12247
12247
|
};
|
|
12248
12248
|
}
|
|
12249
12249
|
});
|
|
12250
|
+
const Download = (bem2) => vue.createVNode("svg", {
|
|
12251
|
+
"class": bem2("svg-download-icon"),
|
|
12252
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
12253
|
+
"viewBox": "0 0 20 20"
|
|
12254
|
+
}, [vue.createVNode("path", {
|
|
12255
|
+
"d": "M3.75,17.5 C3.28976271,17.5 2.91666667,17.126904 2.91666667,16.6666667 L2.91666667,12.5 C2.91666667,12.0397627 3.28976271,11.6666667 3.75,11.6666667 C4.21023729,11.6666667 4.58333333,12.0397627 4.58333333,12.5 L4.58266667,15.833 L15.4166667,15.833 L15.4166667,12.5 C15.4166667,12.0397627 15.7897627,11.6666667 16.25,11.6666667 C16.7102373,11.6666667 17.0833333,12.0397627 17.0833333,12.5 L17.0833333,16.6666667 C17.0833333,17.0915011 16.765429,17.442085 16.3545316,17.4935072 L16.25,17.5 L3.75,17.5 Z M10,2.5 C10.4602373,2.5 10.8333333,2.87309604 10.8333333,3.33333333 L10.834,10.904 L12.327411,9.41074435 L12.3804172,9.36206404 C12.7078286,9.08620893 13.1976137,9.1024357 13.5059223,9.41074435 C13.8313592,9.73618126 13.8313592,10.2638187 13.5059223,10.5892557 L10.5892557,13.5059223 L10.5659501,13.5283458 C10.5602582,13.5336148 10.5544926,13.5388053 10.548655,13.5439156 L10.5362495,13.5546026 L10.5121742,13.5740743 C10.4949132,13.5875412 10.4771081,13.6003432 10.4586783,13.6126074 C10.4455853,13.6212563 10.4323019,13.6294968 10.4192578,13.6370097 C10.4029078,13.6465464 10.3862038,13.6555423 10.3690405,13.664083 C10.3522054,13.6723976 10.3351478,13.6801087 10.3177097,13.6872958 C10.3045293,13.6927357 10.2911788,13.6978473 10.2777746,13.7025471 C10.2584813,13.7093513 10.2389875,13.7154237 10.2194971,13.7207897 C10.2011918,13.7257748 10.1826357,13.7301514 10.1634324,13.7339067 L10.1207556,13.7413147 C10.0813306,13.7470375 10.0410112,13.75 10,13.75 L10.0566667,13.747 L10.0399512,13.7490477 L9.96132783,13.7491078 C9.94161389,13.7481976 9.92192612,13.746591 9.89546844,13.7435072 C9.79274407,13.7306516 9.69583178,13.6990985 9.6082458,13.6523619 L9.59484365,13.6451239 C9.58442452,13.639322 9.57410342,13.6332795 9.56375825,13.6268308 C9.54437371,13.6148978 9.52551484,13.6021934 9.50686916,13.5885746 L9.48480346,13.5717051 L9.41074435,13.5059223 L6.49407768,10.5892557 L6.44539737,10.5362495 C6.16954226,10.2088381 6.18576903,9.719053 6.49407768,9.41074435 L6.54708384,9.36206404 C6.87449527,9.08620893 7.36428033,9.1024357 7.67258898,9.41074435 L9.167,10.905 L9.16666667,3.33333333 C9.16666667,2.87309604 9.53976271,2.5 10,2.5 Z",
|
|
12256
|
+
"fill": "#FFF",
|
|
12257
|
+
"fill-rule": "nonzero"
|
|
12258
|
+
}, null)]);
|
|
12259
|
+
var __async$3 = (__this, __arguments, generator) => {
|
|
12260
|
+
return new Promise((resolve, reject) => {
|
|
12261
|
+
var fulfilled = (value) => {
|
|
12262
|
+
try {
|
|
12263
|
+
step(generator.next(value));
|
|
12264
|
+
} catch (e) {
|
|
12265
|
+
reject(e);
|
|
12266
|
+
}
|
|
12267
|
+
};
|
|
12268
|
+
var rejected = (value) => {
|
|
12269
|
+
try {
|
|
12270
|
+
step(generator.throw(value));
|
|
12271
|
+
} catch (e) {
|
|
12272
|
+
reject(e);
|
|
12273
|
+
}
|
|
12274
|
+
};
|
|
12275
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
12276
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
12277
|
+
});
|
|
12278
|
+
};
|
|
12250
12279
|
const [name$A, bem$z] = createNamespace("image-preview");
|
|
12251
12280
|
const popupProps$1 = ["show", "transition", "overlayStyle", "closeOnPopstate", "teleport"];
|
|
12252
12281
|
const imagePreviewProps = {
|
|
@@ -12258,6 +12287,8 @@ const imagePreviewProps = {
|
|
|
12258
12287
|
overlay: truthProp,
|
|
12259
12288
|
closeable: Boolean,
|
|
12260
12289
|
showIndex: truthProp,
|
|
12290
|
+
showDownload: Boolean,
|
|
12291
|
+
downloadAction: Function,
|
|
12261
12292
|
className: unknownProp,
|
|
12262
12293
|
closeIcon: makeStringProp("clear"),
|
|
12263
12294
|
transition: String,
|
|
@@ -12275,7 +12306,7 @@ const imagePreviewProps = {
|
|
|
12275
12306
|
var stdin_default$R = vue.defineComponent({
|
|
12276
12307
|
name: name$A,
|
|
12277
12308
|
props: imagePreviewProps,
|
|
12278
|
-
emits: ["scale", "close", "closed", "change", "longPress", "update:show"],
|
|
12309
|
+
emits: ["scale", "close", "closed", "change", "longPress", "update:show", "download"],
|
|
12279
12310
|
setup(props, {
|
|
12280
12311
|
emit,
|
|
12281
12312
|
slots
|
|
@@ -12320,9 +12351,54 @@ var stdin_default$R = vue.defineComponent({
|
|
|
12320
12351
|
}, [props.images[state.active].title]);
|
|
12321
12352
|
}
|
|
12322
12353
|
};
|
|
12354
|
+
const onDownload = () => __async$3(this, null, function* () {
|
|
12355
|
+
var _a, _b, _c;
|
|
12356
|
+
const downloadParams = {
|
|
12357
|
+
index: state.active,
|
|
12358
|
+
url: (_a = props.images[state.active]) == null ? void 0 : _a.url,
|
|
12359
|
+
title: (_b = props.images[state.active]) == null ? void 0 : _b.title
|
|
12360
|
+
};
|
|
12361
|
+
if (props.downloadAction) {
|
|
12362
|
+
const result = props.downloadAction(downloadParams);
|
|
12363
|
+
if (result) {
|
|
12364
|
+
return;
|
|
12365
|
+
}
|
|
12366
|
+
}
|
|
12367
|
+
try {
|
|
12368
|
+
let universalJsSdk = yield Promise.resolve().then(() => require("./index-bb5638a0.js"));
|
|
12369
|
+
if (universalJsSdk && universalJsSdk.getJSI && downloadParams.url) {
|
|
12370
|
+
let fileJsi = (_c = universalJsSdk.getJSI()) == null ? void 0 : _c.file;
|
|
12371
|
+
if (fileJsi && fileJsi.download) {
|
|
12372
|
+
showLoadingToast({
|
|
12373
|
+
message: "下载中...",
|
|
12374
|
+
forbidClick: true,
|
|
12375
|
+
duration: 0
|
|
12376
|
+
});
|
|
12377
|
+
fileJsi.download({
|
|
12378
|
+
url: downloadParams.url
|
|
12379
|
+
}).then(({
|
|
12380
|
+
tempFilePath
|
|
12381
|
+
}) => {
|
|
12382
|
+
closeToast();
|
|
12383
|
+
showSuccessToast("下载成功");
|
|
12384
|
+
}).catch(() => {
|
|
12385
|
+
closeToast();
|
|
12386
|
+
showFailToast("下载失败");
|
|
12387
|
+
});
|
|
12388
|
+
return;
|
|
12389
|
+
} else {
|
|
12390
|
+
showFailToast("当前环境暂不支持下载");
|
|
12391
|
+
}
|
|
12392
|
+
}
|
|
12393
|
+
} catch (e) {
|
|
12394
|
+
console.log(e.message);
|
|
12395
|
+
}
|
|
12396
|
+
});
|
|
12323
12397
|
const renderIndex = () => {
|
|
12324
|
-
|
|
12325
|
-
|
|
12398
|
+
const image = props.images[state.active];
|
|
12399
|
+
const showDownload = props.showDownload && !image.url.startsWith("data:");
|
|
12400
|
+
if (props.showIndex || showDownload) {
|
|
12401
|
+
if (props.showIndex && slots.index) {
|
|
12326
12402
|
return vue.createVNode("div", {
|
|
12327
12403
|
"class": bem$z("index")
|
|
12328
12404
|
}, [slots.index({
|
|
@@ -12331,9 +12407,15 @@ var stdin_default$R = vue.defineComponent({
|
|
|
12331
12407
|
}
|
|
12332
12408
|
return vue.createVNode("div", {
|
|
12333
12409
|
"class": bem$z("index")
|
|
12334
|
-
}, [renderIndexText(), renderImageTitle()]);
|
|
12410
|
+
}, [props.showIndex && renderIndexText(), props.showIndex && renderImageTitle(), showDownload && renderDownloadIcon()]);
|
|
12335
12411
|
}
|
|
12336
12412
|
};
|
|
12413
|
+
const renderDownloadIcon = () => {
|
|
12414
|
+
return vue.createVNode("div", {
|
|
12415
|
+
"class": bem$z("download-icon"),
|
|
12416
|
+
"onClick": onDownload
|
|
12417
|
+
}, [Download(bem$z)]);
|
|
12418
|
+
};
|
|
12337
12419
|
const renderCover = () => {
|
|
12338
12420
|
if (slots.cover) {
|
|
12339
12421
|
return vue.createVNode("div", {
|
|
@@ -12397,7 +12479,9 @@ var stdin_default$R = vue.defineComponent({
|
|
|
12397
12479
|
useExpose({
|
|
12398
12480
|
swipeTo
|
|
12399
12481
|
});
|
|
12400
|
-
vue.onMounted(
|
|
12482
|
+
vue.onMounted(() => {
|
|
12483
|
+
resize();
|
|
12484
|
+
});
|
|
12401
12485
|
vue.watch([windowWidth, windowHeight], resize);
|
|
12402
12486
|
vue.watch(() => props.startPosition, (value) => setActive(+value));
|
|
12403
12487
|
vue.watch(() => props.show, (value) => {
|
|
@@ -15996,6 +16080,7 @@ const mediaPickerProps = {
|
|
|
15996
16080
|
},
|
|
15997
16081
|
disabled: Boolean,
|
|
15998
16082
|
showTitle: Boolean,
|
|
16083
|
+
showDownload: Boolean,
|
|
15999
16084
|
useFileNameAsLabel: Boolean,
|
|
16000
16085
|
title: makeStringProp("添加附件"),
|
|
16001
16086
|
mediaList: makeArrayProp(),
|
|
@@ -16686,6 +16771,7 @@ var stdin_default$C = vue.defineComponent({
|
|
|
16686
16771
|
images: imageList.value.map((image) => ({
|
|
16687
16772
|
url: image.url || image.showSrc || ""
|
|
16688
16773
|
})),
|
|
16774
|
+
showDownload: props.showDownload,
|
|
16689
16775
|
startPosition: imageIndex,
|
|
16690
16776
|
closeable: true
|
|
16691
16777
|
});
|
|
@@ -16699,7 +16785,7 @@ var stdin_default$C = vue.defineComponent({
|
|
|
16699
16785
|
}
|
|
16700
16786
|
} else if (media.type === "file") {
|
|
16701
16787
|
try {
|
|
16702
|
-
let universalJsSdk = yield Promise.resolve().then(() => require("./index-
|
|
16788
|
+
let universalJsSdk = yield Promise.resolve().then(() => require("./index-bb5638a0.js"));
|
|
16703
16789
|
if (universalJsSdk && universalJsSdk.getJSI && media.url) {
|
|
16704
16790
|
let fileJsi = (_a = universalJsSdk.getJSI()) == null ? void 0 : _a.file;
|
|
16705
16791
|
if (fileJsi && fileJsi.download && fileJsi.openDocument) {
|
|
@@ -23411,7 +23497,7 @@ const Lazyload = {
|
|
|
23411
23497
|
});
|
|
23412
23498
|
}
|
|
23413
23499
|
};
|
|
23414
|
-
const version = "3.1.
|
|
23500
|
+
const version = "3.1.74";
|
|
23415
23501
|
function install(app) {
|
|
23416
23502
|
const components = [
|
|
23417
23503
|
ActionSheet,
|
package/lib/zartui.es.js
CHANGED
|
@@ -12245,6 +12245,35 @@ var stdin_default$S = defineComponent({
|
|
|
12245
12245
|
};
|
|
12246
12246
|
}
|
|
12247
12247
|
});
|
|
12248
|
+
const Download = (bem2) => createVNode("svg", {
|
|
12249
|
+
"class": bem2("svg-download-icon"),
|
|
12250
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
12251
|
+
"viewBox": "0 0 20 20"
|
|
12252
|
+
}, [createVNode("path", {
|
|
12253
|
+
"d": "M3.75,17.5 C3.28976271,17.5 2.91666667,17.126904 2.91666667,16.6666667 L2.91666667,12.5 C2.91666667,12.0397627 3.28976271,11.6666667 3.75,11.6666667 C4.21023729,11.6666667 4.58333333,12.0397627 4.58333333,12.5 L4.58266667,15.833 L15.4166667,15.833 L15.4166667,12.5 C15.4166667,12.0397627 15.7897627,11.6666667 16.25,11.6666667 C16.7102373,11.6666667 17.0833333,12.0397627 17.0833333,12.5 L17.0833333,16.6666667 C17.0833333,17.0915011 16.765429,17.442085 16.3545316,17.4935072 L16.25,17.5 L3.75,17.5 Z M10,2.5 C10.4602373,2.5 10.8333333,2.87309604 10.8333333,3.33333333 L10.834,10.904 L12.327411,9.41074435 L12.3804172,9.36206404 C12.7078286,9.08620893 13.1976137,9.1024357 13.5059223,9.41074435 C13.8313592,9.73618126 13.8313592,10.2638187 13.5059223,10.5892557 L10.5892557,13.5059223 L10.5659501,13.5283458 C10.5602582,13.5336148 10.5544926,13.5388053 10.548655,13.5439156 L10.5362495,13.5546026 L10.5121742,13.5740743 C10.4949132,13.5875412 10.4771081,13.6003432 10.4586783,13.6126074 C10.4455853,13.6212563 10.4323019,13.6294968 10.4192578,13.6370097 C10.4029078,13.6465464 10.3862038,13.6555423 10.3690405,13.664083 C10.3522054,13.6723976 10.3351478,13.6801087 10.3177097,13.6872958 C10.3045293,13.6927357 10.2911788,13.6978473 10.2777746,13.7025471 C10.2584813,13.7093513 10.2389875,13.7154237 10.2194971,13.7207897 C10.2011918,13.7257748 10.1826357,13.7301514 10.1634324,13.7339067 L10.1207556,13.7413147 C10.0813306,13.7470375 10.0410112,13.75 10,13.75 L10.0566667,13.747 L10.0399512,13.7490477 L9.96132783,13.7491078 C9.94161389,13.7481976 9.92192612,13.746591 9.89546844,13.7435072 C9.79274407,13.7306516 9.69583178,13.6990985 9.6082458,13.6523619 L9.59484365,13.6451239 C9.58442452,13.639322 9.57410342,13.6332795 9.56375825,13.6268308 C9.54437371,13.6148978 9.52551484,13.6021934 9.50686916,13.5885746 L9.48480346,13.5717051 L9.41074435,13.5059223 L6.49407768,10.5892557 L6.44539737,10.5362495 C6.16954226,10.2088381 6.18576903,9.719053 6.49407768,9.41074435 L6.54708384,9.36206404 C6.87449527,9.08620893 7.36428033,9.1024357 7.67258898,9.41074435 L9.167,10.905 L9.16666667,3.33333333 C9.16666667,2.87309604 9.53976271,2.5 10,2.5 Z",
|
|
12254
|
+
"fill": "#FFF",
|
|
12255
|
+
"fill-rule": "nonzero"
|
|
12256
|
+
}, null)]);
|
|
12257
|
+
var __async$3 = (__this, __arguments, generator) => {
|
|
12258
|
+
return new Promise((resolve, reject) => {
|
|
12259
|
+
var fulfilled = (value) => {
|
|
12260
|
+
try {
|
|
12261
|
+
step(generator.next(value));
|
|
12262
|
+
} catch (e) {
|
|
12263
|
+
reject(e);
|
|
12264
|
+
}
|
|
12265
|
+
};
|
|
12266
|
+
var rejected = (value) => {
|
|
12267
|
+
try {
|
|
12268
|
+
step(generator.throw(value));
|
|
12269
|
+
} catch (e) {
|
|
12270
|
+
reject(e);
|
|
12271
|
+
}
|
|
12272
|
+
};
|
|
12273
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
12274
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
12275
|
+
});
|
|
12276
|
+
};
|
|
12248
12277
|
const [name$A, bem$z] = createNamespace("image-preview");
|
|
12249
12278
|
const popupProps$1 = ["show", "transition", "overlayStyle", "closeOnPopstate", "teleport"];
|
|
12250
12279
|
const imagePreviewProps = {
|
|
@@ -12256,6 +12285,8 @@ const imagePreviewProps = {
|
|
|
12256
12285
|
overlay: truthProp,
|
|
12257
12286
|
closeable: Boolean,
|
|
12258
12287
|
showIndex: truthProp,
|
|
12288
|
+
showDownload: Boolean,
|
|
12289
|
+
downloadAction: Function,
|
|
12259
12290
|
className: unknownProp,
|
|
12260
12291
|
closeIcon: makeStringProp("clear"),
|
|
12261
12292
|
transition: String,
|
|
@@ -12273,7 +12304,7 @@ const imagePreviewProps = {
|
|
|
12273
12304
|
var stdin_default$R = defineComponent({
|
|
12274
12305
|
name: name$A,
|
|
12275
12306
|
props: imagePreviewProps,
|
|
12276
|
-
emits: ["scale", "close", "closed", "change", "longPress", "update:show"],
|
|
12307
|
+
emits: ["scale", "close", "closed", "change", "longPress", "update:show", "download"],
|
|
12277
12308
|
setup(props, {
|
|
12278
12309
|
emit,
|
|
12279
12310
|
slots
|
|
@@ -12318,9 +12349,54 @@ var stdin_default$R = defineComponent({
|
|
|
12318
12349
|
}, [props.images[state.active].title]);
|
|
12319
12350
|
}
|
|
12320
12351
|
};
|
|
12352
|
+
const onDownload = () => __async$3(this, null, function* () {
|
|
12353
|
+
var _a, _b, _c;
|
|
12354
|
+
const downloadParams = {
|
|
12355
|
+
index: state.active,
|
|
12356
|
+
url: (_a = props.images[state.active]) == null ? void 0 : _a.url,
|
|
12357
|
+
title: (_b = props.images[state.active]) == null ? void 0 : _b.title
|
|
12358
|
+
};
|
|
12359
|
+
if (props.downloadAction) {
|
|
12360
|
+
const result = props.downloadAction(downloadParams);
|
|
12361
|
+
if (result) {
|
|
12362
|
+
return;
|
|
12363
|
+
}
|
|
12364
|
+
}
|
|
12365
|
+
try {
|
|
12366
|
+
let universalJsSdk = yield import("./index-096e2873.mjs");
|
|
12367
|
+
if (universalJsSdk && universalJsSdk.getJSI && downloadParams.url) {
|
|
12368
|
+
let fileJsi = (_c = universalJsSdk.getJSI()) == null ? void 0 : _c.file;
|
|
12369
|
+
if (fileJsi && fileJsi.download) {
|
|
12370
|
+
showLoadingToast({
|
|
12371
|
+
message: "下载中...",
|
|
12372
|
+
forbidClick: true,
|
|
12373
|
+
duration: 0
|
|
12374
|
+
});
|
|
12375
|
+
fileJsi.download({
|
|
12376
|
+
url: downloadParams.url
|
|
12377
|
+
}).then(({
|
|
12378
|
+
tempFilePath
|
|
12379
|
+
}) => {
|
|
12380
|
+
closeToast();
|
|
12381
|
+
showSuccessToast("下载成功");
|
|
12382
|
+
}).catch(() => {
|
|
12383
|
+
closeToast();
|
|
12384
|
+
showFailToast("下载失败");
|
|
12385
|
+
});
|
|
12386
|
+
return;
|
|
12387
|
+
} else {
|
|
12388
|
+
showFailToast("当前环境暂不支持下载");
|
|
12389
|
+
}
|
|
12390
|
+
}
|
|
12391
|
+
} catch (e) {
|
|
12392
|
+
console.log(e.message);
|
|
12393
|
+
}
|
|
12394
|
+
});
|
|
12321
12395
|
const renderIndex = () => {
|
|
12322
|
-
|
|
12323
|
-
|
|
12396
|
+
const image = props.images[state.active];
|
|
12397
|
+
const showDownload = props.showDownload && !image.url.startsWith("data:");
|
|
12398
|
+
if (props.showIndex || showDownload) {
|
|
12399
|
+
if (props.showIndex && slots.index) {
|
|
12324
12400
|
return createVNode("div", {
|
|
12325
12401
|
"class": bem$z("index")
|
|
12326
12402
|
}, [slots.index({
|
|
@@ -12329,9 +12405,15 @@ var stdin_default$R = defineComponent({
|
|
|
12329
12405
|
}
|
|
12330
12406
|
return createVNode("div", {
|
|
12331
12407
|
"class": bem$z("index")
|
|
12332
|
-
}, [renderIndexText(), renderImageTitle()]);
|
|
12408
|
+
}, [props.showIndex && renderIndexText(), props.showIndex && renderImageTitle(), showDownload && renderDownloadIcon()]);
|
|
12333
12409
|
}
|
|
12334
12410
|
};
|
|
12411
|
+
const renderDownloadIcon = () => {
|
|
12412
|
+
return createVNode("div", {
|
|
12413
|
+
"class": bem$z("download-icon"),
|
|
12414
|
+
"onClick": onDownload
|
|
12415
|
+
}, [Download(bem$z)]);
|
|
12416
|
+
};
|
|
12335
12417
|
const renderCover = () => {
|
|
12336
12418
|
if (slots.cover) {
|
|
12337
12419
|
return createVNode("div", {
|
|
@@ -12395,7 +12477,9 @@ var stdin_default$R = defineComponent({
|
|
|
12395
12477
|
useExpose({
|
|
12396
12478
|
swipeTo
|
|
12397
12479
|
});
|
|
12398
|
-
onMounted(
|
|
12480
|
+
onMounted(() => {
|
|
12481
|
+
resize();
|
|
12482
|
+
});
|
|
12399
12483
|
watch([windowWidth, windowHeight], resize);
|
|
12400
12484
|
watch(() => props.startPosition, (value) => setActive(+value));
|
|
12401
12485
|
watch(() => props.show, (value) => {
|
|
@@ -15994,6 +16078,7 @@ const mediaPickerProps = {
|
|
|
15994
16078
|
},
|
|
15995
16079
|
disabled: Boolean,
|
|
15996
16080
|
showTitle: Boolean,
|
|
16081
|
+
showDownload: Boolean,
|
|
15997
16082
|
useFileNameAsLabel: Boolean,
|
|
15998
16083
|
title: makeStringProp("添加附件"),
|
|
15999
16084
|
mediaList: makeArrayProp(),
|
|
@@ -16684,6 +16769,7 @@ var stdin_default$C = defineComponent({
|
|
|
16684
16769
|
images: imageList.value.map((image) => ({
|
|
16685
16770
|
url: image.url || image.showSrc || ""
|
|
16686
16771
|
})),
|
|
16772
|
+
showDownload: props.showDownload,
|
|
16687
16773
|
startPosition: imageIndex,
|
|
16688
16774
|
closeable: true
|
|
16689
16775
|
});
|
|
@@ -16697,7 +16783,7 @@ var stdin_default$C = defineComponent({
|
|
|
16697
16783
|
}
|
|
16698
16784
|
} else if (media.type === "file") {
|
|
16699
16785
|
try {
|
|
16700
|
-
let universalJsSdk = yield import("./index-
|
|
16786
|
+
let universalJsSdk = yield import("./index-096e2873.mjs");
|
|
16701
16787
|
if (universalJsSdk && universalJsSdk.getJSI && media.url) {
|
|
16702
16788
|
let fileJsi = (_a = universalJsSdk.getJSI()) == null ? void 0 : _a.file;
|
|
16703
16789
|
if (fileJsi && fileJsi.download && fileJsi.openDocument) {
|
|
@@ -23409,7 +23495,7 @@ const Lazyload = {
|
|
|
23409
23495
|
});
|
|
23410
23496
|
}
|
|
23411
23497
|
};
|
|
23412
|
-
const version = "3.1.
|
|
23498
|
+
const version = "3.1.74";
|
|
23413
23499
|
function install(app) {
|
|
23414
23500
|
const components = [
|
|
23415
23501
|
ActionSheet,
|