zartui 2.1.29 → 2.1.30
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/Download.js +17 -0
- package/es/image-preview/ImagePreview.js +97 -13
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.js +1 -0
- package/es/image-preview/index.less +37 -25
- package/es/image-preview/style/index.js +1 -0
- package/es/image-preview/style/less.js +1 -0
- package/es/index.js +1 -1
- package/es/media-picker/index.js +11 -1
- package/es/uploader/style/index.js +1 -0
- package/es/uploader/style/less.js +1 -0
- package/lib/1.js +6668 -0
- package/lib/1.min.js +1 -0
- package/lib/image-preview/Download.js +21 -0
- package/lib/image-preview/ImagePreview.js +101 -14
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.js +1 -0
- package/lib/image-preview/index.less +37 -25
- package/lib/image-preview/style/index.js +1 -0
- package/lib/image-preview/style/less.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +11 -1
- package/lib/uploader/style/index.js +1 -0
- package/lib/uploader/style/less.js +1 -0
- package/lib/zart.js +297 -69
- package/lib/zart.min.js +3 -3
- package/package.json +8 -1
package/lib/index.js
CHANGED
|
@@ -161,7 +161,7 @@ var _toast = _interopRequireDefault(require("./toast"));
|
|
|
161
161
|
exports.Toast = _toast.default;
|
|
162
162
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
163
163
|
exports.Uploader = _uploader.default;
|
|
164
|
-
var version = exports.version = '2.1.
|
|
164
|
+
var version = exports.version = '2.1.30';
|
|
165
165
|
function install(Vue) {
|
|
166
166
|
var components = [_actionSheet.default, _area.default, _avatar.default, _backTop.default, _badge.default, _button.default, _calendar.default, _cascader.default, _cell.default, _cellGroup.default, _checkbox.default, _checkboxGroup.default, _col.default, _collapse.default, _collapseItem.default, _countDown.default, _datetimePicker.default, _dialog.default, _divider.default, _dropdownItem.default, _dropdownMenu.default, _empty.default, _field.default, _foldDialog.default, _form.default, _grid.default, _gridItem.default, _hierarchySelect.default, _icon.default, _image.default, _imagePreview.default, _indexAnchor.default, _indexBar.default, _info.default, _lazyload.default, _list.default, _loading.default, _locale.default, _mediaPicker.default, _mediaPlayer.default, _multiplePicker.default, _navBar.default, _noticeBar.default, _numberKeyboard.default, _overlay.default, _passwordInput.default, _picker.default, _popover.default, _popup.default, _pullRefresh.default, _radio.default, _radioGroup.default, _rate.default, _row.default, _search.default, _signature.default, _skeleton.default, _slider.default, _speechRecognizer.default, _step.default, _stepper.default, _steps.default, _sticky.default, _swipe.default, _swipeCell.default, _swipeItem.default, _switch.default, _switchCell.default, _tab.default, _tabbar.default, _tabbarItem.default, _table.default, _tabs.default, _tag.default, _textEllipsis.default, _timeline.default, _toast.default, _uploader.default];
|
|
167
167
|
components.forEach(function (item) {
|
|
@@ -193,6 +193,14 @@ var _default2 = exports.default = createComponent({
|
|
|
193
193
|
sortable: {
|
|
194
194
|
type: Boolean,
|
|
195
195
|
default: false
|
|
196
|
+
},
|
|
197
|
+
showDownload: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
default: false
|
|
200
|
+
},
|
|
201
|
+
downloadAction: {
|
|
202
|
+
type: Function,
|
|
203
|
+
default: function _default() {}
|
|
196
204
|
}
|
|
197
205
|
},
|
|
198
206
|
model: {
|
|
@@ -732,7 +740,9 @@ var _default2 = exports.default = createComponent({
|
|
|
732
740
|
};
|
|
733
741
|
}),
|
|
734
742
|
startPosition: imageIndex,
|
|
735
|
-
closeable: true
|
|
743
|
+
closeable: true,
|
|
744
|
+
showDownload: _this7.showDownload,
|
|
745
|
+
downloadAction: _this7.downloadAction
|
|
736
746
|
});
|
|
737
747
|
} else if (media.type === _type.MediaType.AUDIO || media.type === _type.MediaType.VIDEO) {
|
|
738
748
|
if (!media.file && !media.url) {
|
|
@@ -5,6 +5,7 @@ require('../../icon/index.css');
|
|
|
5
5
|
require('../../image/index.css');
|
|
6
6
|
require('../../popup/index.css');
|
|
7
7
|
require('../../loading/index.css');
|
|
8
|
+
require('../../toast/index.css');
|
|
8
9
|
require('../../swipe/index.css');
|
|
9
10
|
require('../../swipe-item/index.css');
|
|
10
11
|
require('../../image-preview/index.css');
|
|
@@ -5,6 +5,7 @@ require('../../icon/index.less');
|
|
|
5
5
|
require('../../image/index.less');
|
|
6
6
|
require('../../popup/index.less');
|
|
7
7
|
require('../../loading/index.less');
|
|
8
|
+
require('../../toast/index.less');
|
|
8
9
|
require('../../swipe/index.less');
|
|
9
10
|
require('../../swipe-item/index.less');
|
|
10
11
|
require('../../image-preview/index.less');
|
package/lib/zart.js
CHANGED
|
@@ -9,9 +9,53 @@
|
|
|
9
9
|
root["zart"] = factory(root["Vue"]);
|
|
10
10
|
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__2__) {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
+
/******/ // install a JSONP callback for chunk loading
|
|
13
|
+
/******/ function webpackJsonpCallback(data) {
|
|
14
|
+
/******/ var chunkIds = data[0];
|
|
15
|
+
/******/ var moreModules = data[1];
|
|
16
|
+
/******/
|
|
17
|
+
/******/
|
|
18
|
+
/******/ // add "moreModules" to the modules object,
|
|
19
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
20
|
+
/******/ var moduleId, chunkId, i = 0, resolves = [];
|
|
21
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
22
|
+
/******/ chunkId = chunkIds[i];
|
|
23
|
+
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
24
|
+
/******/ resolves.push(installedChunks[chunkId][0]);
|
|
25
|
+
/******/ }
|
|
26
|
+
/******/ installedChunks[chunkId] = 0;
|
|
27
|
+
/******/ }
|
|
28
|
+
/******/ for(moduleId in moreModules) {
|
|
29
|
+
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
|
30
|
+
/******/ modules[moduleId] = moreModules[moduleId];
|
|
31
|
+
/******/ }
|
|
32
|
+
/******/ }
|
|
33
|
+
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
|
|
34
|
+
/******/
|
|
35
|
+
/******/ while(resolves.length) {
|
|
36
|
+
/******/ resolves.shift()();
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/
|
|
39
|
+
/******/ };
|
|
40
|
+
/******/
|
|
41
|
+
/******/
|
|
12
42
|
/******/ // The module cache
|
|
13
43
|
/******/ var installedModules = {};
|
|
14
44
|
/******/
|
|
45
|
+
/******/ // object to store loaded and loading chunks
|
|
46
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
47
|
+
/******/ // Promise = chunk loading, 0 = chunk loaded
|
|
48
|
+
/******/ var installedChunks = {
|
|
49
|
+
/******/ 0: 0
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/
|
|
53
|
+
/******/
|
|
54
|
+
/******/ // script path function
|
|
55
|
+
/******/ function jsonpScriptSrc(chunkId) {
|
|
56
|
+
/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + ".js"
|
|
57
|
+
/******/ }
|
|
58
|
+
/******/
|
|
15
59
|
/******/ // The require function
|
|
16
60
|
/******/ function __webpack_require__(moduleId) {
|
|
17
61
|
/******/
|
|
@@ -36,6 +80,67 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
36
80
|
/******/ return module.exports;
|
|
37
81
|
/******/ }
|
|
38
82
|
/******/
|
|
83
|
+
/******/ // This file contains only the entry chunk.
|
|
84
|
+
/******/ // The chunk loading function for additional chunks
|
|
85
|
+
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
|
|
86
|
+
/******/ var promises = [];
|
|
87
|
+
/******/
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // JSONP chunk loading for javascript
|
|
90
|
+
/******/
|
|
91
|
+
/******/ var installedChunkData = installedChunks[chunkId];
|
|
92
|
+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
93
|
+
/******/
|
|
94
|
+
/******/ // a Promise means "currently loading".
|
|
95
|
+
/******/ if(installedChunkData) {
|
|
96
|
+
/******/ promises.push(installedChunkData[2]);
|
|
97
|
+
/******/ } else {
|
|
98
|
+
/******/ // setup Promise in chunk cache
|
|
99
|
+
/******/ var promise = new Promise(function(resolve, reject) {
|
|
100
|
+
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
|
|
101
|
+
/******/ });
|
|
102
|
+
/******/ promises.push(installedChunkData[2] = promise);
|
|
103
|
+
/******/
|
|
104
|
+
/******/ // start chunk loading
|
|
105
|
+
/******/ var script = document.createElement('script');
|
|
106
|
+
/******/ var onScriptComplete;
|
|
107
|
+
/******/
|
|
108
|
+
/******/ script.charset = 'utf-8';
|
|
109
|
+
/******/ script.timeout = 120;
|
|
110
|
+
/******/ if (__webpack_require__.nc) {
|
|
111
|
+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
112
|
+
/******/ }
|
|
113
|
+
/******/ script.src = jsonpScriptSrc(chunkId);
|
|
114
|
+
/******/
|
|
115
|
+
/******/ // create error before stack unwound to get useful stacktrace later
|
|
116
|
+
/******/ var error = new Error();
|
|
117
|
+
/******/ onScriptComplete = function (event) {
|
|
118
|
+
/******/ // avoid mem leaks in IE.
|
|
119
|
+
/******/ script.onerror = script.onload = null;
|
|
120
|
+
/******/ clearTimeout(timeout);
|
|
121
|
+
/******/ var chunk = installedChunks[chunkId];
|
|
122
|
+
/******/ if(chunk !== 0) {
|
|
123
|
+
/******/ if(chunk) {
|
|
124
|
+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
125
|
+
/******/ var realSrc = event && event.target && event.target.src;
|
|
126
|
+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
127
|
+
/******/ error.name = 'ChunkLoadError';
|
|
128
|
+
/******/ error.type = errorType;
|
|
129
|
+
/******/ error.request = realSrc;
|
|
130
|
+
/******/ chunk[1](error);
|
|
131
|
+
/******/ }
|
|
132
|
+
/******/ installedChunks[chunkId] = undefined;
|
|
133
|
+
/******/ }
|
|
134
|
+
/******/ };
|
|
135
|
+
/******/ var timeout = setTimeout(function(){
|
|
136
|
+
/******/ onScriptComplete({ type: 'timeout', target: script });
|
|
137
|
+
/******/ }, 120000);
|
|
138
|
+
/******/ script.onerror = script.onload = onScriptComplete;
|
|
139
|
+
/******/ document.head.appendChild(script);
|
|
140
|
+
/******/ }
|
|
141
|
+
/******/ }
|
|
142
|
+
/******/ return Promise.all(promises);
|
|
143
|
+
/******/ };
|
|
39
144
|
/******/
|
|
40
145
|
/******/ // expose the modules object (__webpack_modules__)
|
|
41
146
|
/******/ __webpack_require__.m = modules;
|
|
@@ -89,6 +194,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
89
194
|
/******/ // __webpack_public_path__
|
|
90
195
|
/******/ __webpack_require__.p = "";
|
|
91
196
|
/******/
|
|
197
|
+
/******/ // on error function for async loading
|
|
198
|
+
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
|
199
|
+
/******/
|
|
200
|
+
/******/ var jsonpArray = typeof self !== 'undefined' ? self : this["webpackJsonpzart"] = typeof self !== 'undefined' ? self : this["webpackJsonpzart"] || [];
|
|
201
|
+
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
|
202
|
+
/******/ jsonpArray.push = webpackJsonpCallback;
|
|
203
|
+
/******/ jsonpArray = jsonpArray.slice();
|
|
204
|
+
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
|
|
205
|
+
/******/ var parentJsonpFunction = oldJsonpFunction;
|
|
206
|
+
/******/
|
|
92
207
|
/******/
|
|
93
208
|
/******/ // Load entry module and return exports
|
|
94
209
|
/******/ return __webpack_require__(__webpack_require__.s = 13);
|
|
@@ -260,7 +375,7 @@ function createNamespace(name) {
|
|
|
260
375
|
return [createComponent(name), createBEM(className), createI18N(name)];
|
|
261
376
|
}
|
|
262
377
|
// EXTERNAL MODULE: ./es/utils/format/unit.js
|
|
263
|
-
var unit = __webpack_require__(
|
|
378
|
+
var unit = __webpack_require__(6);
|
|
264
379
|
|
|
265
380
|
// CONCATENATED MODULE: ./es/utils/index.js
|
|
266
381
|
|
|
@@ -428,6 +543,27 @@ function padZero(num, targetLength) {
|
|
|
428
543
|
|
|
429
544
|
/***/ }),
|
|
430
545
|
/* 5 */
|
|
546
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
547
|
+
|
|
548
|
+
// TODO(Babel 8): Remove this file.
|
|
549
|
+
|
|
550
|
+
var runtime = __webpack_require__(11)();
|
|
551
|
+
module.exports = runtime;
|
|
552
|
+
|
|
553
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
554
|
+
try {
|
|
555
|
+
regeneratorRuntime = runtime;
|
|
556
|
+
} catch (accidentalStrictMode) {
|
|
557
|
+
if (typeof globalThis === "object") {
|
|
558
|
+
globalThis.regeneratorRuntime = runtime;
|
|
559
|
+
} else {
|
|
560
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
/***/ }),
|
|
566
|
+
/* 6 */
|
|
431
567
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
432
568
|
|
|
433
569
|
"use strict";
|
|
@@ -485,27 +621,6 @@ function unitToPx(value) {
|
|
|
485
621
|
return parseFloat(value);
|
|
486
622
|
}
|
|
487
623
|
|
|
488
|
-
/***/ }),
|
|
489
|
-
/* 6 */
|
|
490
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
491
|
-
|
|
492
|
-
// TODO(Babel 8): Remove this file.
|
|
493
|
-
|
|
494
|
-
var runtime = __webpack_require__(11)();
|
|
495
|
-
module.exports = runtime;
|
|
496
|
-
|
|
497
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
498
|
-
try {
|
|
499
|
-
regeneratorRuntime = runtime;
|
|
500
|
-
} catch (accidentalStrictMode) {
|
|
501
|
-
if (typeof globalThis === "object") {
|
|
502
|
-
globalThis.regeneratorRuntime = runtime;
|
|
503
|
-
} else {
|
|
504
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
624
|
/***/ }),
|
|
510
625
|
/* 7 */
|
|
511
626
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -1968,7 +2083,7 @@ Icon.props = {
|
|
|
1968
2083
|
};
|
|
1969
2084
|
/* harmony default export */ var es_icon = (icon_createComponent(Icon));
|
|
1970
2085
|
// EXTERNAL MODULE: ./es/utils/format/unit.js
|
|
1971
|
-
var unit = __webpack_require__(
|
|
2086
|
+
var unit = __webpack_require__(6);
|
|
1972
2087
|
|
|
1973
2088
|
// CONCATENATED MODULE: ./es/popup/index.js
|
|
1974
2089
|
|
|
@@ -14879,6 +14994,37 @@ var image_createNamespace = Object(utils["b" /* createNamespace */])('image'),
|
|
|
14879
14994
|
}, [this.genImage(), this.genPlaceholder(), this.slots()]);
|
|
14880
14995
|
}
|
|
14881
14996
|
}));
|
|
14997
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
14998
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
14999
|
+
try {
|
|
15000
|
+
var i = n[a](c),
|
|
15001
|
+
u = i.value;
|
|
15002
|
+
} catch (n) {
|
|
15003
|
+
return void e(n);
|
|
15004
|
+
}
|
|
15005
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
15006
|
+
}
|
|
15007
|
+
function _asyncToGenerator(n) {
|
|
15008
|
+
return function () {
|
|
15009
|
+
var t = this,
|
|
15010
|
+
e = arguments;
|
|
15011
|
+
return new Promise(function (r, o) {
|
|
15012
|
+
var a = n.apply(t, e);
|
|
15013
|
+
function _next(n) {
|
|
15014
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
15015
|
+
}
|
|
15016
|
+
function _throw(n) {
|
|
15017
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
15018
|
+
}
|
|
15019
|
+
_next(void 0);
|
|
15020
|
+
});
|
|
15021
|
+
};
|
|
15022
|
+
}
|
|
15023
|
+
|
|
15024
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
|
15025
|
+
var regenerator = __webpack_require__(5);
|
|
15026
|
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
15027
|
+
|
|
14882
15028
|
// CONCATENATED MODULE: ./es/image-preview/shared.js
|
|
14883
15029
|
|
|
14884
15030
|
var shared_createNamespace = Object(utils["b" /* createNamespace */])('image-preview'),
|
|
@@ -15603,7 +15749,27 @@ function getDistance(touches) {
|
|
|
15603
15749
|
})]);
|
|
15604
15750
|
}
|
|
15605
15751
|
});
|
|
15752
|
+
// CONCATENATED MODULE: ./es/image-preview/Download.js
|
|
15753
|
+
/* harmony default export */ var Download = ({
|
|
15754
|
+
render: function render() {
|
|
15755
|
+
var h = arguments[0];
|
|
15756
|
+
return h("svg", {
|
|
15757
|
+
"attrs": {
|
|
15758
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
15759
|
+
"viewBox": "0 0 20 20"
|
|
15760
|
+
}
|
|
15761
|
+
}, [h("path", {
|
|
15762
|
+
"attrs": {
|
|
15763
|
+
"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",
|
|
15764
|
+
"fill": "#FFF",
|
|
15765
|
+
"fill-rule": "nonzero"
|
|
15766
|
+
}
|
|
15767
|
+
})]);
|
|
15768
|
+
}
|
|
15769
|
+
});
|
|
15606
15770
|
// CONCATENATED MODULE: ./es/image-preview/ImagePreview.js
|
|
15771
|
+
|
|
15772
|
+
|
|
15607
15773
|
// Utils
|
|
15608
15774
|
|
|
15609
15775
|
|
|
@@ -15616,6 +15782,8 @@ function getDistance(touches) {
|
|
|
15616
15782
|
|
|
15617
15783
|
|
|
15618
15784
|
|
|
15785
|
+
|
|
15786
|
+
|
|
15619
15787
|
/* harmony default export */ var image_preview_ImagePreview = (shared_createComponent({
|
|
15620
15788
|
mixins: [TouchMixin, PopupMixin({
|
|
15621
15789
|
skipToggleEvent: true
|
|
@@ -15681,6 +15849,14 @@ function getDistance(touches) {
|
|
|
15681
15849
|
closeIconPosition: {
|
|
15682
15850
|
type: String,
|
|
15683
15851
|
default: 'top-right'
|
|
15852
|
+
},
|
|
15853
|
+
showDownload: {
|
|
15854
|
+
type: Boolean,
|
|
15855
|
+
default: false
|
|
15856
|
+
},
|
|
15857
|
+
downloadAction: {
|
|
15858
|
+
type: Function,
|
|
15859
|
+
default: function _default() {}
|
|
15684
15860
|
}
|
|
15685
15861
|
},
|
|
15686
15862
|
data: function data() {
|
|
@@ -15733,15 +15909,31 @@ function getDistance(touches) {
|
|
|
15733
15909
|
this.$emit('change', active);
|
|
15734
15910
|
}
|
|
15735
15911
|
},
|
|
15736
|
-
|
|
15912
|
+
genFooter: function genFooter() {
|
|
15913
|
+
var _this$images$this$act, _this$images$this$act2;
|
|
15737
15914
|
var h = this.$createElement;
|
|
15738
|
-
|
|
15915
|
+
var indexSlot = this.slots('index', {
|
|
15916
|
+
index: this.active
|
|
15917
|
+
});
|
|
15918
|
+
if (indexSlot) {
|
|
15739
15919
|
return h("div", {
|
|
15740
|
-
"class": shared_bem('
|
|
15741
|
-
}, [
|
|
15742
|
-
index: this.active
|
|
15743
|
-
}) || this.active + 1 + "/" + this.images.length]);
|
|
15920
|
+
"class": shared_bem('footer')
|
|
15921
|
+
}, [indexSlot]);
|
|
15744
15922
|
}
|
|
15923
|
+
return h("div", {
|
|
15924
|
+
"class": shared_bem('footer')
|
|
15925
|
+
}, [h("div", {
|
|
15926
|
+
"class": shared_bem('footer-left')
|
|
15927
|
+
}, [this.showIndex && h("span", {
|
|
15928
|
+
"class": shared_bem('index')
|
|
15929
|
+
}, [this.active + 1, "/", this.images.length]), h("span", {
|
|
15930
|
+
"class": shared_bem('title')
|
|
15931
|
+
}, [((_this$images$this$act = this.images[this.active]) == null ? void 0 : _this$images$this$act.title) || ''])]), this.showDownload && !((_this$images$this$act2 = this.images[this.active]) != null && _this$images$this$act2.url.startsWith('data:')) && h("span", {
|
|
15932
|
+
"class": shared_bem('download'),
|
|
15933
|
+
"on": {
|
|
15934
|
+
"click": this.onDownload
|
|
15935
|
+
}
|
|
15936
|
+
}, [h(Download)])]);
|
|
15745
15937
|
},
|
|
15746
15938
|
genCover: function genCover() {
|
|
15747
15939
|
var h = this.$createElement;
|
|
@@ -15811,12 +16003,68 @@ function getDistance(touches) {
|
|
|
15811
16003
|
this.$refs.swipe.swipeTo(index, options);
|
|
15812
16004
|
}
|
|
15813
16005
|
},
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
16006
|
+
onDownload: function onDownload() {
|
|
16007
|
+
var _this3 = this;
|
|
16008
|
+
return _asyncToGenerator(/*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
16009
|
+
var _this3$images$_this3$, _this3$images$_this3$2;
|
|
16010
|
+
var downloadParams, result, universalJsSdk, _universalJsSdk$getJS, fileJsi;
|
|
16011
|
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
16012
|
+
while (1) switch (_context.prev = _context.next) {
|
|
16013
|
+
case 0:
|
|
16014
|
+
downloadParams = {
|
|
16015
|
+
index: _this3.active,
|
|
16016
|
+
url: (_this3$images$_this3$ = _this3.images[_this3.active]) == null ? void 0 : _this3$images$_this3$.url,
|
|
16017
|
+
title: (_this3$images$_this3$2 = _this3.images[_this3.active]) == null ? void 0 : _this3$images$_this3$2.title
|
|
16018
|
+
}; // 如果提供了 downloadAction 并且返回 true,则阻止默认逻辑
|
|
16019
|
+
if (!_this3.downloadAction) {
|
|
16020
|
+
_context.next = 5;
|
|
16021
|
+
break;
|
|
16022
|
+
}
|
|
16023
|
+
result = _this3.downloadAction(downloadParams);
|
|
16024
|
+
if (!result) {
|
|
16025
|
+
_context.next = 5;
|
|
16026
|
+
break;
|
|
16027
|
+
}
|
|
16028
|
+
return _context.abrupt("return");
|
|
16029
|
+
case 5:
|
|
16030
|
+
_context.prev = 5;
|
|
16031
|
+
_context.next = 8;
|
|
16032
|
+
return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, 24));
|
|
16033
|
+
case 8:
|
|
16034
|
+
universalJsSdk = _context.sent;
|
|
16035
|
+
if (universalJsSdk && universalJsSdk.getJSI && downloadParams.url) {
|
|
16036
|
+
fileJsi = (_universalJsSdk$getJS = universalJsSdk.getJSI()) == null ? void 0 : _universalJsSdk$getJS.file;
|
|
16037
|
+
if (fileJsi && fileJsi.download) {
|
|
16038
|
+
es_toast.loading({
|
|
16039
|
+
message: '加载中...',
|
|
16040
|
+
forbidClick: true,
|
|
16041
|
+
duration: 0
|
|
16042
|
+
});
|
|
16043
|
+
fileJsi.download({
|
|
16044
|
+
url: downloadParams.url
|
|
16045
|
+
}).then(function () {
|
|
16046
|
+
es_toast.clear();
|
|
16047
|
+
es_toast.success('下载成功');
|
|
16048
|
+
}).catch(function () {
|
|
16049
|
+
es_toast.clear();
|
|
16050
|
+
es_toast.fail("下载失败");
|
|
16051
|
+
});
|
|
16052
|
+
} else {
|
|
16053
|
+
es_toast.fail("当前环境暂不支持下载");
|
|
16054
|
+
}
|
|
16055
|
+
}
|
|
16056
|
+
_context.next = 15;
|
|
16057
|
+
break;
|
|
16058
|
+
case 12:
|
|
16059
|
+
_context.prev = 12;
|
|
16060
|
+
_context.t0 = _context["catch"](5);
|
|
16061
|
+
console.log(_context.t0.message);
|
|
16062
|
+
case 15:
|
|
16063
|
+
case "end":
|
|
16064
|
+
return _context.stop();
|
|
16065
|
+
}
|
|
16066
|
+
}, _callee, null, [[5, 12]]);
|
|
16067
|
+
}))();
|
|
15820
16068
|
}
|
|
15821
16069
|
},
|
|
15822
16070
|
render: function render() {
|
|
@@ -15834,7 +16082,7 @@ function getDistance(touches) {
|
|
|
15834
16082
|
value: this.value
|
|
15835
16083
|
}],
|
|
15836
16084
|
"class": [shared_bem(), this.className]
|
|
15837
|
-
}, [this.genClose(), this.genImages(), this.
|
|
16085
|
+
}, [this.genClose(), this.genImages(), this.genFooter(), this.genCover()]) : null]);
|
|
15838
16086
|
}
|
|
15839
16087
|
}));
|
|
15840
16088
|
// CONCATENATED MODULE: ./es/image-preview/index.js
|
|
@@ -15853,6 +16101,7 @@ var image_preview_defaultConfig = {
|
|
|
15853
16101
|
onChange: null,
|
|
15854
16102
|
className: '',
|
|
15855
16103
|
showIndex: true,
|
|
16104
|
+
showDownload: false,
|
|
15856
16105
|
closeable: false,
|
|
15857
16106
|
closeIcon: 'clear',
|
|
15858
16107
|
asyncClose: false,
|
|
@@ -18230,37 +18479,6 @@ var list_createNamespace = Object(utils["b" /* createNamespace */])('list'),
|
|
|
18230
18479
|
// EXTERNAL MODULE: ./es/locale/index.js + 2 modules
|
|
18231
18480
|
var locale = __webpack_require__(8);
|
|
18232
18481
|
|
|
18233
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
18234
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
18235
|
-
try {
|
|
18236
|
-
var i = n[a](c),
|
|
18237
|
-
u = i.value;
|
|
18238
|
-
} catch (n) {
|
|
18239
|
-
return void e(n);
|
|
18240
|
-
}
|
|
18241
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
18242
|
-
}
|
|
18243
|
-
function _asyncToGenerator(n) {
|
|
18244
|
-
return function () {
|
|
18245
|
-
var t = this,
|
|
18246
|
-
e = arguments;
|
|
18247
|
-
return new Promise(function (r, o) {
|
|
18248
|
-
var a = n.apply(t, e);
|
|
18249
|
-
function _next(n) {
|
|
18250
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
18251
|
-
}
|
|
18252
|
-
function _throw(n) {
|
|
18253
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
18254
|
-
}
|
|
18255
|
-
_next(void 0);
|
|
18256
|
-
});
|
|
18257
|
-
};
|
|
18258
|
-
}
|
|
18259
|
-
|
|
18260
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
|
18261
|
-
var regenerator = __webpack_require__(6);
|
|
18262
|
-
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
18263
|
-
|
|
18264
18482
|
// CONCATENATED MODULE: ./es/media-picker/type.js
|
|
18265
18483
|
var MediaUploadStatus = /*#__PURE__*/function (MediaUploadStatus) {
|
|
18266
18484
|
MediaUploadStatus["UPLOADING"] = "uploading";
|
|
@@ -24748,6 +24966,14 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
24748
24966
|
sortable: {
|
|
24749
24967
|
type: Boolean,
|
|
24750
24968
|
default: false
|
|
24969
|
+
},
|
|
24970
|
+
showDownload: {
|
|
24971
|
+
type: Boolean,
|
|
24972
|
+
default: false
|
|
24973
|
+
},
|
|
24974
|
+
downloadAction: {
|
|
24975
|
+
type: Function,
|
|
24976
|
+
default: function _default() {}
|
|
24751
24977
|
}
|
|
24752
24978
|
},
|
|
24753
24979
|
model: {
|
|
@@ -25287,7 +25513,9 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
25287
25513
|
};
|
|
25288
25514
|
}),
|
|
25289
25515
|
startPosition: imageIndex,
|
|
25290
|
-
closeable: true
|
|
25516
|
+
closeable: true,
|
|
25517
|
+
showDownload: _this7.showDownload,
|
|
25518
|
+
downloadAction: _this7.downloadAction
|
|
25291
25519
|
});
|
|
25292
25520
|
} else if (media.type === MediaType.AUDIO || media.type === MediaType.VIDEO) {
|
|
25293
25521
|
if (!media.file && !media.url) {
|
|
@@ -35397,7 +35625,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
|
|
|
35397
35625
|
|
|
35398
35626
|
|
|
35399
35627
|
|
|
35400
|
-
var es_version = '2.1.
|
|
35628
|
+
var es_version = '2.1.30';
|
|
35401
35629
|
function install(Vue) {
|
|
35402
35630
|
var components = [action_sheet, es_area, avatar, back_top, badge, es_button, calendar, cascader, cell, cell_group, es_checkbox, checkbox_group, col, collapse, collapse_item, count_down, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, fold_dialog, es_form, grid, grid_item, hierarchy_select, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, lazyload, es_list, es_loading, locale["a" /* default */], media_picker, media_player, multiple_picker, nav_bar, notice_bar, number_keyboard, es_overlay, password_input, es_picker, popover, popup, pull_refresh, es_radio, radio_group, rate, row, search, signature, skeleton, slider, speech_recognizer, es_step, stepper, steps, es_sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, tabs, es_tag, text_ellipsis, timeline, es_toast, uploader];
|
|
35403
35631
|
components.forEach(function (item) {
|