xt-element-ui 2.1.61 → 2.2.0

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.
Files changed (202) hide show
  1. package/docs/components/base/xt-bar.md +5 -5
  2. package/docs/components/base/xt-chart.md +5 -5
  3. package/docs/components/base/xt-line.md +4 -4
  4. package/docs/components/base/xt-multi.md +5 -5
  5. package/docs/components/base/xt-pie.md +5 -5
  6. package/lib/index.common.js +503 -165
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +506 -168
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/xt-badge/demo.html +10 -0
  11. package/lib/xt-badge/index.js +1 -0
  12. package/lib/xt-badge/xt-badge.common.js +335 -0
  13. package/lib/xt-badge/xt-badge.css +1 -0
  14. package/lib/xt-badge/xt-badge.umd.js +345 -0
  15. package/lib/xt-badge/xt-badge.umd.min.js +1 -0
  16. package/lib/xt-button/demo.html +10 -0
  17. package/lib/xt-button/index.js +1 -0
  18. package/lib/xt-button/xt-button.common.js +331 -0
  19. package/lib/xt-button/xt-button.css +1 -0
  20. package/lib/xt-button/xt-button.umd.js +341 -0
  21. package/lib/xt-button/xt-button.umd.min.js +1 -0
  22. package/lib/xt-card/demo.html +10 -0
  23. package/lib/xt-card/index.js +1 -0
  24. package/lib/xt-card/xt-card.common.js +325 -0
  25. package/lib/xt-card/xt-card.css +1 -0
  26. package/lib/xt-card/xt-card.umd.js +335 -0
  27. package/lib/xt-card/xt-card.umd.min.js +1 -0
  28. package/lib/xt-card-item/demo.html +10 -0
  29. package/lib/xt-card-item/index.js +1 -0
  30. package/lib/xt-card-item/xt-card-item.common.js +291 -0
  31. package/lib/xt-card-item/xt-card-item.css +1 -0
  32. package/lib/xt-card-item/xt-card-item.umd.js +301 -0
  33. package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
  34. package/lib/xt-chart/demo.html +10 -0
  35. package/lib/xt-chart/index.js +1 -0
  36. package/lib/xt-chart/xt-chart.common.js +109203 -0
  37. package/lib/xt-chart/xt-chart.css +1 -0
  38. package/lib/xt-chart/xt-chart.umd.js +109213 -0
  39. package/lib/xt-chart/xt-chart.umd.min.js +1 -0
  40. package/lib/xt-config-provider/demo.html +10 -0
  41. package/lib/xt-config-provider/index.js +1 -0
  42. package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
  43. package/lib/xt-config-provider/xt-config-provider.css +1 -0
  44. package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
  45. package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
  46. package/lib/xt-date-picker/demo.html +10 -0
  47. package/lib/xt-date-picker/index.js +1 -0
  48. package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
  49. package/lib/xt-date-picker/xt-date-picker.css +1 -0
  50. package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
  51. package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
  52. package/lib/xt-flex-box/demo.html +10 -0
  53. package/lib/xt-flex-box/index.js +1 -0
  54. package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
  55. package/lib/xt-flex-box/xt-flex-box.css +1 -0
  56. package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
  57. package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
  58. package/lib/xt-form-schema/demo.html +10 -0
  59. package/lib/xt-form-schema/index.js +1 -0
  60. package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
  61. package/lib/xt-form-schema/xt-form-schema.css +1 -0
  62. package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
  63. package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
  64. package/lib/xt-grid-box/demo.html +10 -0
  65. package/lib/xt-grid-box/index.js +1 -0
  66. package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
  67. package/lib/xt-grid-box/xt-grid-box.css +1 -0
  68. package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
  69. package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
  70. package/lib/xt-grid-item/demo.html +10 -0
  71. package/lib/xt-grid-item/index.js +1 -0
  72. package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
  73. package/lib/xt-grid-item/xt-grid-item.css +1 -0
  74. package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
  75. package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
  76. package/lib/xt-icon/demo.html +10 -0
  77. package/lib/xt-icon/index.js +1 -0
  78. package/lib/xt-icon/xt-icon.common.js +430 -0
  79. package/lib/xt-icon/xt-icon.css +1 -0
  80. package/lib/xt-icon/xt-icon.umd.js +440 -0
  81. package/lib/xt-icon/xt-icon.umd.min.js +1 -0
  82. package/lib/xt-input/demo.html +10 -0
  83. package/lib/xt-input/index.js +1 -0
  84. package/lib/xt-input/xt-input.common.js +584 -0
  85. package/lib/xt-input/xt-input.css +1 -0
  86. package/lib/xt-input/xt-input.umd.js +594 -0
  87. package/lib/xt-input/xt-input.umd.min.js +1 -0
  88. package/lib/xt-list/demo.html +10 -0
  89. package/lib/xt-list/index.js +1 -0
  90. package/lib/xt-list/xt-list.common.js +714 -0
  91. package/lib/xt-list/xt-list.css +1 -0
  92. package/lib/xt-list/xt-list.umd.js +724 -0
  93. package/lib/xt-list/xt-list.umd.min.js +1 -0
  94. package/lib/xt-map/demo.html +10 -0
  95. package/lib/xt-map/index.js +1 -0
  96. package/lib/xt-map/xt-map.common.js +1951 -0
  97. package/lib/xt-map/xt-map.css +1 -0
  98. package/lib/xt-map/xt-map.umd.js +1961 -0
  99. package/lib/xt-map/xt-map.umd.min.js +1 -0
  100. package/lib/xt-map-provider/demo.html +10 -0
  101. package/lib/xt-map-provider/index.js +1 -0
  102. package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
  103. package/lib/xt-map-provider/xt-map-provider.css +1 -0
  104. package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
  105. package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
  106. package/lib/xt-page/demo.html +10 -0
  107. package/lib/xt-page/index.js +1 -0
  108. package/lib/xt-page/xt-page.common.js +353 -0
  109. package/lib/xt-page/xt-page.css +1 -0
  110. package/lib/xt-page/xt-page.umd.js +363 -0
  111. package/lib/xt-page/xt-page.umd.min.js +1 -0
  112. package/lib/xt-progress/demo.html +10 -0
  113. package/lib/xt-progress/index.js +1 -0
  114. package/lib/xt-progress/xt-progress.common.js +327 -0
  115. package/lib/xt-progress/xt-progress.css +1 -0
  116. package/lib/xt-progress/xt-progress.umd.js +337 -0
  117. package/lib/xt-progress/xt-progress.umd.min.js +1 -0
  118. package/lib/xt-scroll-arrow/demo.html +10 -0
  119. package/lib/xt-scroll-arrow/index.js +1 -0
  120. package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
  121. package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
  122. package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
  123. package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
  124. package/lib/xt-select-tree/demo.html +10 -0
  125. package/lib/xt-select-tree/index.js +1 -0
  126. package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
  127. package/lib/xt-select-tree/xt-select-tree.css +1 -0
  128. package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
  129. package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
  130. package/lib/xt-step-price/demo.html +10 -0
  131. package/lib/xt-step-price/index.js +1 -0
  132. package/lib/xt-step-price/xt-step-price.common.js +800 -0
  133. package/lib/xt-step-price/xt-step-price.css +1 -0
  134. package/lib/xt-step-price/xt-step-price.umd.js +810 -0
  135. package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
  136. package/lib/xt-step-price-item/demo.html +10 -0
  137. package/lib/xt-step-price-item/index.js +1 -0
  138. package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
  139. package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
  140. package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
  141. package/lib/xt-tab-pane/demo.html +10 -0
  142. package/lib/xt-tab-pane/index.js +1 -0
  143. package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
  144. package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
  145. package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
  146. package/lib/xt-table/demo.html +10 -0
  147. package/lib/xt-table/index.js +1 -0
  148. package/lib/xt-table/xt-table.common.js +1027 -0
  149. package/lib/xt-table/xt-table.css +1 -0
  150. package/lib/xt-table/xt-table.umd.js +1037 -0
  151. package/lib/xt-table/xt-table.umd.min.js +1 -0
  152. package/lib/xt-tabs/demo.html +10 -0
  153. package/lib/xt-tabs/index.js +1 -0
  154. package/lib/xt-tabs/xt-tabs.common.js +463 -0
  155. package/lib/xt-tabs/xt-tabs.css +1 -0
  156. package/lib/xt-tabs/xt-tabs.umd.js +473 -0
  157. package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
  158. package/lib/xt-text/demo.html +10 -0
  159. package/lib/xt-text/index.js +1 -0
  160. package/lib/xt-text/xt-text.common.js +536 -0
  161. package/lib/xt-text/xt-text.css +1 -0
  162. package/lib/xt-text/xt-text.umd.js +546 -0
  163. package/lib/xt-text/xt-text.umd.min.js +1 -0
  164. package/lib/xt-time/demo.html +10 -0
  165. package/lib/xt-time/index.js +1 -0
  166. package/lib/xt-time/xt-time.common.js +555 -0
  167. package/lib/xt-time/xt-time.css +1 -0
  168. package/lib/xt-time/xt-time.umd.js +565 -0
  169. package/lib/xt-time/xt-time.umd.min.js +1 -0
  170. package/lib/xt-transfer-tree/demo.html +10 -0
  171. package/lib/xt-transfer-tree/index.js +1 -0
  172. package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
  173. package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
  174. package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
  175. package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
  176. package/lib/xt-upload/demo.html +10 -0
  177. package/lib/xt-upload/index.js +1 -0
  178. package/lib/xt-upload/xt-upload.common.js +1292 -0
  179. package/lib/xt-upload/xt-upload.css +1 -0
  180. package/lib/xt-upload/xt-upload.umd.js +1302 -0
  181. package/lib/xt-upload/xt-upload.umd.min.js +1 -0
  182. package/package.json +10 -7
  183. package/src/components/xt-badge/index.js +8 -7
  184. package/src/components/xt-button/index.js +1 -0
  185. package/src/components/xt-card/index.js +1 -0
  186. package/src/components/xt-card-item/index.js +1 -0
  187. package/src/components/xt-config-provider/index.js +1 -0
  188. package/src/components/xt-flex-box/index.js +1 -0
  189. package/src/components/xt-grid-box/index.js +1 -0
  190. package/src/components/xt-icon/index.js +1 -0
  191. package/src/components/xt-input/index.js +1 -0
  192. package/src/components/xt-map/index.js +1 -0
  193. package/src/components/xt-progress/index.js +8 -7
  194. package/src/components/xt-scroll-arrow/index.js +8 -7
  195. package/src/components/xt-step-price/index.js +1 -0
  196. package/src/components/xt-tab-pane/index.js +10 -0
  197. package/src/components/{xt-tabs/TabPane.vue → xt-tab-pane/index.vue} +14 -1
  198. package/src/components/xt-tabs/index.js +9 -10
  199. package/src/components/xt-tabs/index.vue +303 -44
  200. package/src/components/xt-text/index.js +1 -0
  201. package/src/components/xt-time/index.js +1 -0
  202. package/src/index.js +34 -2
@@ -0,0 +1,1302 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("vue"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["xt-upload"] = factory(require("vue"));
8
+ else
9
+ root["xt-upload"] = factory(root["Vue"]);
10
+ })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = "fb15");
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ "2c86":
100
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
101
+
102
+ "use strict";
103
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_preview_vue_vue_type_style_index_0_id_236adf7f_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6d33");
104
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_preview_vue_vue_type_style_index_0_id_236adf7f_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_preview_vue_vue_type_style_index_0_id_236adf7f_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
105
+ /* unused harmony reexport * */
106
+
107
+
108
+ /***/ }),
109
+
110
+ /***/ "6d33":
111
+ /***/ (function(module, exports, __webpack_require__) {
112
+
113
+ // extracted by mini-css-extract-plugin
114
+
115
+ /***/ }),
116
+
117
+ /***/ "8bbf":
118
+ /***/ (function(module, exports) {
119
+
120
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
121
+
122
+ /***/ }),
123
+
124
+ /***/ "fb15":
125
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
126
+
127
+ "use strict";
128
+ // ESM COMPAT FLAG
129
+ __webpack_require__.r(__webpack_exports__);
130
+
131
+ // EXPORTS
132
+ __webpack_require__.d(__webpack_exports__, "XtUpload", function() { return /* reexport */ xt_upload; });
133
+
134
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
135
+ // This file is imported into lib/wc client bundles.
136
+
137
+ if (typeof window !== 'undefined') {
138
+ var currentScript = window.document.currentScript
139
+ if (false) { var getCurrentScript; }
140
+
141
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
142
+ if (src) {
143
+ __webpack_require__.p = src[1] // eslint-disable-line
144
+ }
145
+ }
146
+
147
+ // Indicate to webpack that this file can be concatenated
148
+ /* harmony default export */ var setPublicPath = (null);
149
+
150
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/index.vue?vue&type=template&id=03e2de58
151
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('XtFlexBox',{attrs:{"type":"inline-flex","gap":"5px"}},[(_vm.action)?_c('el-upload',{ref:"uploadFile",attrs:{"disabled":_vm.disabled || _vm.uploading,"action":_vm.YSSQP + _vm.action,"file-list":_vm.fileList,"data":{accessToken: _vm.accessToken,..._vm.data},"multiple":_vm.multiple,"limit":_vm.limit,"on-success":_vm.uploadSuccess,"show-file-list":false,"auto-upload":_vm.autoUpload,"before-upload":_vm.uploadBefore,"accept":_vm.accept}},[_c('span',{staticStyle:{"font-size":"20px","padding":"20px","background":"#f0f0f1","color":"#409EFF"},style:({padding: _vm.plusPx / 2 + 'px',cursor:_vm.disabled ? 'not-allowed':'pointer'})},[_vm._t("default",function(){return [_c('i',{class:_vm.icon})]})],2)]):_vm._e(),(_vm.fileList!==null&&_vm.fileList.length>0)?_c('XtFlexBox',{staticClass:"el-upload-list el-upload-list--picture-card",staticStyle:{"flex":"1"},attrs:{"gap":"5px","wrap":"wrap"}},_vm._l((_vm.fileList),function(ite,index){return _c('li',{key:index,staticClass:"el-upload-list__item is-ready",staticStyle:{"margin":"0","width":"62px","height":"62px"},style:({ width: (_vm.plusPx + 22)+ 'px',height: (_vm.plusPx + 22)+ 'px'})},[_c('el-image',{staticClass:"el-upload-list__item-thumbnail",attrs:{"src":_vm.YSSQP+'/'+ite,"alt":""},on:{"click":_vm.clickHandler}}),_c('span',{staticClass:"el-upload-list__item-actions",on:{"click":function($event){return _vm.preShowPicture(ite, index)}}},[_c('span',{staticClass:"el-upload-list__item-preview",on:{"click":function($event){$event.stopPropagation();return _vm.preShowPicture(ite, index)}}},[_c('i',{staticClass:"el-icon-zoom-in"})]),(!_vm.uploading&&!_vm.disabled)?_c('span',{staticClass:"el-upload-list__item-delete",staticStyle:{"margin-left":"0"},on:{"click":function($event){$event.stopPropagation();return _vm.handleRemove(index)}}},[_c('i',{staticClass:"el-icon-delete"})]):_vm._e()])],1)}),0):_vm._e(),(_vm.preview)?[(_vm.previewVisible)?_c('ImageViewer',{attrs:{"z-index":3000,"base-url":_vm.baseUrl + '/',"infiniteLoop":false,"initial-index":_vm.imageIndex,"url-list":_vm.allFileList || _vm.fileList,"on-close":_vm.closeViewer}}):_vm._e()]:_vm._e()],2)
152
+ }
153
+ var staticRenderFns = []
154
+
155
+
156
+ // CONCATENATED MODULE: ./src/components/xt-upload/index.vue?vue&type=template&id=03e2de58
157
+
158
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/preview.vue?vue&type=template&id=236adf7f&scoped=true
159
+ var previewvue_type_template_id_236adf7f_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('transition',{attrs:{"name":"viewer-fade"}},[_c('div',{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:({ 'z-index': _vm.zIndex }),attrs:{"tabindex":"-1"}},[_c('div',{staticClass:"el-image-viewer__mask",on:{"click":_vm.hide}}),_c('span',{staticClass:"el-image-viewer__btn fix_close",on:{"click":_vm.hide}},[_c('i',{staticClass:"el-icon-close"})]),(!_vm.isSingle)?[_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{ 'is-disabled': !_vm.infinite && _vm.isFirst },on:{"click":_vm.prev}},[_c('i',{staticClass:"el-icon-arrow-left"})]),_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{ 'is-disabled': !_vm.infinite && _vm.isLast },on:{"click":_vm.next}},[_c('i',{staticClass:"el-icon-arrow-right"})])]:_vm._e(),_c('div',{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[_c('div',{staticClass:"el-image-viewer__actions__inner"},[_c('i',{staticClass:"el-icon-zoom-out",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('zoomOut')}}}),_c('i',{staticClass:"el-icon-zoom-in",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('zoomIn')}}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{class:_vm.mode.icon,on:{"click":function($event){$event.stopPropagation();return _vm.toggleMode.apply(null, arguments)}}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{staticClass:"el-icon-refresh-left",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('anticlocelise')}}}),_c('i',{staticClass:"el-icon-refresh-right",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('clocelise')}}})])]),_c('div',{staticClass:"el-image-viewer__canvas"},_vm._l((_vm.urlList),function(url,i){return (i === _vm.index)?_c('img',{key:url,ref:"img",refInFor:true,staticClass:"el-image-viewer__img",style:(_vm.imgStyle),attrs:{"src":_vm.currentImg},on:{"load":_vm.handleImgLoad,"error":_vm.handleImgError,"mousedown":_vm.handleMouseDown}}):_vm._e()}),0)],2)])
160
+ }
161
+ var previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns = []
162
+
163
+
164
+ // CONCATENATED MODULE: ./src/components/xt-upload/preview.vue?vue&type=template&id=236adf7f&scoped=true
165
+
166
+ // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
167
+ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
168
+ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
169
+
170
+ // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/dom.js
171
+ /* istanbul ignore next */
172
+
173
+
174
+
175
+ const isServer = external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer;
176
+ const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
177
+ const MOZ_HACK_REGEXP = /^moz([A-Z])/;
178
+ const ieVersion = isServer ? 0 : Number(document.documentMode);
179
+
180
+ /* istanbul ignore next */
181
+ const trim = function(string) {
182
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
183
+ };
184
+ /* istanbul ignore next */
185
+ const camelCase = function(name) {
186
+ return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
187
+ return offset ? letter.toUpperCase() : letter;
188
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
189
+ };
190
+
191
+ /* istanbul ignore next */
192
+ const on = (function() {
193
+ if (!isServer && document.addEventListener) {
194
+ return function(element, event, handler) {
195
+ if (element && event && handler) {
196
+ element.addEventListener(event, handler, false);
197
+ }
198
+ };
199
+ } else {
200
+ return function(element, event, handler) {
201
+ if (element && event && handler) {
202
+ element.attachEvent('on' + event, handler);
203
+ }
204
+ };
205
+ }
206
+ })();
207
+
208
+ /* istanbul ignore next */
209
+ const off = (function() {
210
+ if (!isServer && document.removeEventListener) {
211
+ return function(element, event, handler) {
212
+ if (element && event) {
213
+ element.removeEventListener(event, handler, false);
214
+ }
215
+ };
216
+ } else {
217
+ return function(element, event, handler) {
218
+ if (element && event) {
219
+ element.detachEvent('on' + event, handler);
220
+ }
221
+ };
222
+ }
223
+ })();
224
+
225
+ /* istanbul ignore next */
226
+ const once = function(el, event, fn) {
227
+ var listener = function() {
228
+ if (fn) {
229
+ fn.apply(this, arguments);
230
+ }
231
+ off(el, event, listener);
232
+ };
233
+ on(el, event, listener);
234
+ };
235
+
236
+ /* istanbul ignore next */
237
+ function hasClass(el, cls) {
238
+ if (!el || !cls) return false;
239
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
240
+ if (el.classList) {
241
+ return el.classList.contains(cls);
242
+ } else {
243
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
244
+ }
245
+ };
246
+
247
+ /* istanbul ignore next */
248
+ function addClass(el, cls) {
249
+ if (!el) return;
250
+ var curClass = el.className;
251
+ var classes = (cls || '').split(' ');
252
+
253
+ for (var i = 0, j = classes.length; i < j; i++) {
254
+ var clsName = classes[i];
255
+ if (!clsName) continue;
256
+
257
+ if (el.classList) {
258
+ el.classList.add(clsName);
259
+ } else if (!hasClass(el, clsName)) {
260
+ curClass += ' ' + clsName;
261
+ }
262
+ }
263
+ if (!el.classList) {
264
+ el.setAttribute('class', curClass);
265
+ }
266
+ };
267
+
268
+ /* istanbul ignore next */
269
+ function removeClass(el, cls) {
270
+ if (!el || !cls) return;
271
+ var classes = cls.split(' ');
272
+ var curClass = ' ' + el.className + ' ';
273
+
274
+ for (var i = 0, j = classes.length; i < j; i++) {
275
+ var clsName = classes[i];
276
+ if (!clsName) continue;
277
+
278
+ if (el.classList) {
279
+ el.classList.remove(clsName);
280
+ } else if (hasClass(el, clsName)) {
281
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
282
+ }
283
+ }
284
+ if (!el.classList) {
285
+ el.setAttribute('class', trim(curClass));
286
+ }
287
+ };
288
+
289
+ /* istanbul ignore next */
290
+ const getStyle = ieVersion < 9 ? function(element, styleName) {
291
+ if (isServer) return;
292
+ if (!element || !styleName) return null;
293
+ styleName = camelCase(styleName);
294
+ if (styleName === 'float') {
295
+ styleName = 'styleFloat';
296
+ }
297
+ try {
298
+ switch (styleName) {
299
+ case 'opacity':
300
+ try {
301
+ return element.filters.item('alpha').opacity / 100;
302
+ } catch (e) {
303
+ return 1.0;
304
+ }
305
+ default:
306
+ return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
307
+ }
308
+ } catch (e) {
309
+ return element.style[styleName];
310
+ }
311
+ } : function(element, styleName) {
312
+ if (isServer) return;
313
+ if (!element || !styleName) return null;
314
+ styleName = camelCase(styleName);
315
+ if (styleName === 'float') {
316
+ styleName = 'cssFloat';
317
+ }
318
+ try {
319
+ var computed = document.defaultView.getComputedStyle(element, '');
320
+ return element.style[styleName] || computed ? computed[styleName] : null;
321
+ } catch (e) {
322
+ return element.style[styleName];
323
+ }
324
+ };
325
+
326
+ /* istanbul ignore next */
327
+ function setStyle(element, styleName, value) {
328
+ if (!element || !styleName) return;
329
+
330
+ if (typeof styleName === 'object') {
331
+ for (var prop in styleName) {
332
+ if (styleName.hasOwnProperty(prop)) {
333
+ setStyle(element, prop, styleName[prop]);
334
+ }
335
+ }
336
+ } else {
337
+ styleName = camelCase(styleName);
338
+ if (styleName === 'opacity' && ieVersion < 9) {
339
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
340
+ } else {
341
+ element.style[styleName] = value;
342
+ }
343
+ }
344
+ };
345
+
346
+ const isScroll = (el, vertical) => {
347
+ if (isServer) return;
348
+
349
+ const determinedDirection = vertical !== null && vertical !== undefined;
350
+ const overflow = determinedDirection
351
+ ? vertical
352
+ ? getStyle(el, 'overflow-y')
353
+ : getStyle(el, 'overflow-x')
354
+ : getStyle(el, 'overflow');
355
+
356
+ return overflow.match(/(scroll|auto|overlay)/);
357
+ };
358
+
359
+ const getScrollContainer = (el, vertical) => {
360
+ if (isServer) return;
361
+
362
+ let parent = el;
363
+ while (parent) {
364
+ if ([window, document, document.documentElement].includes(parent)) {
365
+ return window;
366
+ }
367
+ if (isScroll(parent, vertical)) {
368
+ return parent;
369
+ }
370
+ parent = parent.parentNode;
371
+ }
372
+
373
+ return parent;
374
+ };
375
+
376
+ const isInContainer = (el, container) => {
377
+ if (isServer || !el || !container) return false;
378
+
379
+ const elRect = el.getBoundingClientRect();
380
+ let containerRect;
381
+
382
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
383
+ containerRect = {
384
+ top: 0,
385
+ right: window.innerWidth,
386
+ bottom: window.innerHeight,
387
+ left: 0
388
+ };
389
+ } else {
390
+ containerRect = container.getBoundingClientRect();
391
+ }
392
+
393
+ return elRect.top < containerRect.bottom &&
394
+ elRect.bottom > containerRect.top &&
395
+ elRect.right > containerRect.left &&
396
+ elRect.left < containerRect.right;
397
+ };
398
+
399
+ // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js
400
+
401
+
402
+ function isString(obj) {
403
+ return Object.prototype.toString.call(obj) === '[object String]';
404
+ }
405
+
406
+ function isObject(obj) {
407
+ return Object.prototype.toString.call(obj) === '[object Object]';
408
+ }
409
+
410
+ function isHtmlElement(node) {
411
+ return node && node.nodeType === Node.ELEMENT_NODE;
412
+ }
413
+
414
+ /**
415
+ * - Inspired:
416
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
417
+ */
418
+ let isFunction = (functionToCheck) => {
419
+ var getType = {};
420
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
421
+ };
422
+
423
+ if ( true && typeof Int8Array !== 'object' && (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
424
+ isFunction = function(obj) {
425
+ return typeof obj === 'function' || false;
426
+ };
427
+ }
428
+
429
+
430
+
431
+ const isUndefined = (val)=> {
432
+ return val === void 0;
433
+ };
434
+
435
+ const isDefined = (val) => {
436
+ return val !== undefined && val !== null;
437
+ };
438
+
439
+ // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js
440
+
441
+
442
+
443
+ const util_hasOwnProperty = Object.prototype.hasOwnProperty;
444
+
445
+ function noop() {};
446
+
447
+ function hasOwn(obj, key) {
448
+ return util_hasOwnProperty.call(obj, key);
449
+ };
450
+
451
+ function extend(to, _from) {
452
+ for (let key in _from) {
453
+ to[key] = _from[key];
454
+ }
455
+ return to;
456
+ };
457
+
458
+ function toObject(arr) {
459
+ var res = {};
460
+ for (let i = 0; i < arr.length; i++) {
461
+ if (arr[i]) {
462
+ extend(res, arr[i]);
463
+ }
464
+ }
465
+ return res;
466
+ };
467
+
468
+ const getValueByPath = function(object, prop) {
469
+ prop = prop || '';
470
+ const paths = prop.split('.');
471
+ let current = object;
472
+ let result = null;
473
+ for (let i = 0, j = paths.length; i < j; i++) {
474
+ const path = paths[i];
475
+ if (!current) break;
476
+
477
+ if (i === j - 1) {
478
+ result = current[path];
479
+ break;
480
+ }
481
+ current = current[path];
482
+ }
483
+ return result;
484
+ };
485
+
486
+ function getPropByPath(obj, path, strict) {
487
+ let tempObj = obj;
488
+ path = path.replace(/\[(\w+)\]/g, '.$1');
489
+ path = path.replace(/^\./, '');
490
+
491
+ let keyArr = path.split('.');
492
+ let i = 0;
493
+ for (let len = keyArr.length; i < len - 1; ++i) {
494
+ if (!tempObj && !strict) break;
495
+ let key = keyArr[i];
496
+ if (key in tempObj) {
497
+ tempObj = tempObj[key];
498
+ } else {
499
+ if (strict) {
500
+ throw new Error('please transfer a valid prop path to form item!');
501
+ }
502
+ break;
503
+ }
504
+ }
505
+ return {
506
+ o: tempObj,
507
+ k: keyArr[i],
508
+ v: tempObj ? tempObj[keyArr[i]] : null
509
+ };
510
+ };
511
+
512
+ const generateId = function() {
513
+ return Math.floor(Math.random() * 10000);
514
+ };
515
+
516
+ const valueEquals = (a, b) => {
517
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
518
+ if (a === b) return true;
519
+ if (!(a instanceof Array)) return false;
520
+ if (!(b instanceof Array)) return false;
521
+ if (a.length !== b.length) return false;
522
+ for (let i = 0; i !== a.length; ++i) {
523
+ if (a[i] !== b[i]) return false;
524
+ }
525
+ return true;
526
+ };
527
+
528
+ const escapeRegexpString = (value = '') => String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
529
+
530
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
531
+ const arrayFindIndex = function(arr, pred) {
532
+ for (let i = 0; i !== arr.length; ++i) {
533
+ if (pred(arr[i])) {
534
+ return i;
535
+ }
536
+ }
537
+ return -1;
538
+ };
539
+
540
+ const arrayFind = function(arr, pred) {
541
+ const idx = arrayFindIndex(arr, pred);
542
+ return idx !== -1 ? arr[idx] : undefined;
543
+ };
544
+
545
+ // coerce truthy value to array
546
+ const coerceTruthyValueToArray = function(val) {
547
+ if (Array.isArray(val)) {
548
+ return val;
549
+ } else if (val) {
550
+ return [val];
551
+ } else {
552
+ return [];
553
+ }
554
+ };
555
+
556
+ const isIE = function() {
557
+ return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
558
+ };
559
+
560
+ const isEdge = function() {
561
+ return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
562
+ };
563
+
564
+ const isFirefox = function() {
565
+ return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
566
+ };
567
+
568
+ const autoprefixer = function(style) {
569
+ if (typeof style !== 'object') return style;
570
+ const rules = ['transform', 'transition', 'animation'];
571
+ const prefixes = ['ms-', 'webkit-'];
572
+ rules.forEach(rule => {
573
+ const value = style[rule];
574
+ if (rule && value) {
575
+ prefixes.forEach(prefix => {
576
+ style[prefix + rule] = value;
577
+ });
578
+ }
579
+ });
580
+ return style;
581
+ };
582
+
583
+ const kebabCase = function(str) {
584
+ const hyphenateRE = /([^-])([A-Z])/g;
585
+ return str
586
+ .replace(hyphenateRE, '$1-$2')
587
+ .replace(hyphenateRE, '$1-$2')
588
+ .toLowerCase();
589
+ };
590
+
591
+ const capitalize = function(str) {
592
+ if (!isString(str)) return str;
593
+ return str.charAt(0).toUpperCase() + str.slice(1);
594
+ };
595
+
596
+ const looseEqual = function(a, b) {
597
+ const isObjectA = isObject(a);
598
+ const isObjectB = isObject(b);
599
+ if (isObjectA && isObjectB) {
600
+ return JSON.stringify(a) === JSON.stringify(b);
601
+ } else if (!isObjectA && !isObjectB) {
602
+ return String(a) === String(b);
603
+ } else {
604
+ return false;
605
+ }
606
+ };
607
+
608
+ const arrayEquals = function(arrayA, arrayB) {
609
+ arrayA = arrayA || [];
610
+ arrayB = arrayB || [];
611
+
612
+ if (arrayA.length !== arrayB.length) {
613
+ return false;
614
+ }
615
+
616
+ for (let i = 0; i < arrayA.length; i++) {
617
+ if (!looseEqual(arrayA[i], arrayB[i])) {
618
+ return false;
619
+ }
620
+ }
621
+
622
+ return true;
623
+ };
624
+
625
+ const isEqual = function(value1, value2) {
626
+ if (Array.isArray(value1) && Array.isArray(value2)) {
627
+ return arrayEquals(value1, value2);
628
+ }
629
+ return looseEqual(value1, value2);
630
+ };
631
+
632
+ const isEmpty = function(val) {
633
+ // null or undefined
634
+ if (val == null) return true;
635
+
636
+ if (typeof val === 'boolean') return false;
637
+
638
+ if (typeof val === 'number') return !val;
639
+
640
+ if (val instanceof Error) return val.message === '';
641
+
642
+ switch (Object.prototype.toString.call(val)) {
643
+ // String or Array
644
+ case '[object String]':
645
+ case '[object Array]':
646
+ return !val.length;
647
+
648
+ // Map or Set or File
649
+ case '[object File]':
650
+ case '[object Map]':
651
+ case '[object Set]': {
652
+ return !val.size;
653
+ }
654
+ // Plain Object
655
+ case '[object Object]': {
656
+ return !Object.keys(val).length;
657
+ }
658
+ }
659
+
660
+ return false;
661
+ };
662
+
663
+ function rafThrottle(fn) {
664
+ let locked = false;
665
+ return function(...args) {
666
+ if (locked) return;
667
+ locked = true;
668
+ window.requestAnimationFrame(_ => {
669
+ fn.apply(this, args);
670
+ locked = false;
671
+ });
672
+ };
673
+ }
674
+
675
+ function objToArray(obj) {
676
+ if (Array.isArray(obj)) {
677
+ return obj;
678
+ }
679
+ return isEmpty(obj) ? [] : [obj];
680
+ }
681
+
682
+ const isMac = function() {
683
+ return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
684
+ };
685
+
686
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/preview.vue?vue&type=script&lang=js
687
+
688
+
689
+
690
+
691
+ const Mode = {
692
+ CONTAIN: {
693
+ name: 'contain',
694
+ icon: 'el-icon-full-screen'
695
+ },
696
+ ORIGINAL: {
697
+ name: 'original',
698
+ icon: 'el-icon-c-scale-to-original'
699
+ }
700
+ };
701
+
702
+ const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';
703
+
704
+ /* harmony default export */ var previewvue_type_script_lang_js = ({
705
+ name: 'elImageViewer',
706
+
707
+ props: {
708
+ baseUrl: {
709
+ type: String,
710
+ default: ""
711
+ },
712
+ urlList: {
713
+ type: Array,
714
+ default: () => []
715
+ },
716
+ zIndex: {
717
+ type: Number,
718
+ default: 2000
719
+ },
720
+ onSwitch: {
721
+ type: Function,
722
+ default: () => {}
723
+ },
724
+ onClose: {
725
+ type: Function,
726
+ default: () => {}
727
+ },
728
+ initialIndex: {
729
+ type: Number,
730
+ default: 0
731
+ },
732
+ infiniteLoop: {
733
+ type: Boolean,
734
+ default: true
735
+ }
736
+ },
737
+
738
+ data() {
739
+ return {
740
+ index: this.initialIndex,
741
+ isShow: false,
742
+ infinite: this.infiniteLoop,
743
+ loading: false,
744
+ mode: Mode.CONTAIN,
745
+ transform: {
746
+ scale: 1,
747
+ deg: 0,
748
+ offsetX: 0,
749
+ offsetY: 0,
750
+ enableTransition: false
751
+ }
752
+ };
753
+ },
754
+ computed: {
755
+ isSingle() {
756
+ return this.urlList.length <= 1;
757
+ },
758
+ isFirst() {
759
+ return this.index === 0;
760
+ },
761
+ isLast() {
762
+ return this.index === this.urlList.length - 1;
763
+ },
764
+ currentImg() {
765
+ return this.baseUrl + this.urlList[this.index];
766
+ },
767
+ imgStyle() {
768
+ const { scale, deg, offsetX, offsetY, enableTransition } = this.transform;
769
+ const style = {
770
+ // transform: `scale(${scale * window.devicePixelRatio}) rotate(${deg}deg)`, // 解决手机屏幕放大问题
771
+ transform: `scale(${scale * 1}) rotate(${deg}deg)`,
772
+ transition: enableTransition ? 'transform .3s' : '',
773
+ 'margin-left': `${offsetX}px`,
774
+ 'margin-top': `${offsetY}px`
775
+ };
776
+ if (this.mode === Mode.CONTAIN) {
777
+ style.maxWidth = style.maxHeight = `80%`;
778
+ }
779
+ return style;
780
+ }
781
+ },
782
+ watch: {
783
+ index: {
784
+ handler: function(val) {
785
+ this.reset();
786
+ this.onSwitch(val);
787
+ }
788
+ },
789
+ currentImg(val) {
790
+ this.$nextTick(_ => {
791
+ const $img = this.$refs.img[0];
792
+ if (!$img.complete) {
793
+ this.loading = true;
794
+ }
795
+ });
796
+ }
797
+ },
798
+ methods: {
799
+ hide() {
800
+ this.deviceSupportUninstall();
801
+ this.onClose();
802
+ },
803
+ deviceSupportInstall() {
804
+ this._keyDownHandler = rafThrottle(e => {
805
+ const keyCode = e.keyCode;
806
+ switch (keyCode) {
807
+ // ESC
808
+ case 27:
809
+ this.hide();
810
+ break;
811
+ // SPACE
812
+ case 32:
813
+ this.toggleMode();
814
+ break;
815
+ // LEFT_ARROW
816
+ case 37:
817
+ this.prev();
818
+ break;
819
+ // UP_ARROW
820
+ case 38:
821
+ this.handleActions('zoomIn');
822
+ break;
823
+ // RIGHT_ARROW
824
+ case 39:
825
+ this.next();
826
+ break;
827
+ // DOWN_ARROW
828
+ case 40:
829
+ this.handleActions('zoomOut');
830
+ break;
831
+ }
832
+ });
833
+ this._mouseWheelHandler = rafThrottle(e => {
834
+ const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
835
+ if (delta > 0) {
836
+ this.handleActions('zoomIn', {
837
+ zoomRate: 0.015,
838
+ enableTransition: false
839
+ });
840
+ } else {
841
+ this.handleActions('zoomOut', {
842
+ zoomRate: 0.015,
843
+ enableTransition: false
844
+ });
845
+ }
846
+ });
847
+ on(document, 'keydown', this._keyDownHandler);
848
+ on(document, mousewheelEventName, this._mouseWheelHandler);
849
+ },
850
+ deviceSupportUninstall() {
851
+ off(document, 'keydown', this._keyDownHandler);
852
+ off(document, mousewheelEventName, this._mouseWheelHandler);
853
+ this._keyDownHandler = null;
854
+ this._mouseWheelHandler = null;
855
+ },
856
+ handleImgLoad(e) {
857
+ this.loading = false;
858
+ },
859
+ handleImgError(e) {
860
+ this.loading = false;
861
+ e.target.alt = '加载失败';
862
+ },
863
+ handleMouseDown(e) {
864
+ if (this.loading || e.button !== 0) return;
865
+
866
+ const { offsetX, offsetY } = this.transform;
867
+ const startX = e.pageX;
868
+ const startY = e.pageY;
869
+ this._dragHandler = rafThrottle(ev => {
870
+ this.transform.offsetX = offsetX + ev.pageX - startX;
871
+ this.transform.offsetY = offsetY + ev.pageY - startY;
872
+ });
873
+ on(document, 'mousemove', this._dragHandler);
874
+ on(document, 'mouseup', ev => {
875
+ off(document, 'mousemove', this._dragHandler);
876
+ });
877
+
878
+ e.preventDefault();
879
+ },
880
+ reset() {
881
+ this.transform = {
882
+ scale: 1,
883
+ deg: 0,
884
+ offsetX: 0,
885
+ offsetY: 0,
886
+ enableTransition: false
887
+ };
888
+ },
889
+ toggleMode() {
890
+ if (this.loading) return;
891
+
892
+ const modeNames = Object.keys(Mode);
893
+ const modeValues = Object.values(Mode);
894
+ const index = modeValues.indexOf(this.mode);
895
+ const nextIndex = (index + 1) % modeNames.length;
896
+ this.mode = Mode[modeNames[nextIndex]];
897
+ this.reset();
898
+ },
899
+ prev() {
900
+ if (this.isFirst && !this.infinite) return;
901
+ const len = this.urlList.length;
902
+ this.index = (this.index - 1 + len) % len;
903
+ },
904
+ next() {
905
+ if (this.isLast && !this.infinite) return;
906
+ const len = this.urlList.length;
907
+ this.index = (this.index + 1) % len;
908
+ },
909
+ handleActions(action, options = {}) {
910
+ if (this.loading) return;
911
+ const { zoomRate, rotateDeg, enableTransition } = {
912
+ zoomRate: 0.2,
913
+ rotateDeg: 90,
914
+ enableTransition: true,
915
+ ...options
916
+ };
917
+ const { transform } = this;
918
+ switch (action) {
919
+ case 'zoomOut':
920
+ if (transform.scale > 0.2) {
921
+ transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
922
+ }
923
+ break;
924
+ case 'zoomIn':
925
+ if (transform.scale < 10) {
926
+ transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
927
+ }
928
+ break;
929
+ case 'clocelise':
930
+ transform.deg += rotateDeg;
931
+ break;
932
+ case 'anticlocelise':
933
+ transform.deg -= rotateDeg;
934
+ break;
935
+ }
936
+ transform.enableTransition = enableTransition;
937
+ }
938
+ },
939
+ mounted() {
940
+ this.deviceSupportInstall();
941
+ // add tabindex then wrapper can be focusable via Javascript
942
+ // focus wrapper so arrow key can't cause inner scroll behavior underneath
943
+ this.$refs['el-image-viewer__wrapper'].focus();
944
+ }
945
+ });
946
+
947
+ // CONCATENATED MODULE: ./src/components/xt-upload/preview.vue?vue&type=script&lang=js
948
+ /* harmony default export */ var xt_upload_previewvue_type_script_lang_js = (previewvue_type_script_lang_js);
949
+ // EXTERNAL MODULE: ./src/components/xt-upload/preview.vue?vue&type=style&index=0&id=236adf7f&prod&scoped=true&lang=scss
950
+ var previewvue_type_style_index_0_id_236adf7f_prod_scoped_true_lang_scss = __webpack_require__("2c86");
951
+
952
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
953
+ /* globals __VUE_SSR_CONTEXT__ */
954
+
955
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
956
+ // This module is a runtime utility for cleaner component module output and will
957
+ // be included in the final webpack user bundle.
958
+
959
+ function normalizeComponent(
960
+ scriptExports,
961
+ render,
962
+ staticRenderFns,
963
+ functionalTemplate,
964
+ injectStyles,
965
+ scopeId,
966
+ moduleIdentifier /* server only */,
967
+ shadowMode /* vue-cli only */
968
+ ) {
969
+ // Vue.extend constructor export interop
970
+ var options =
971
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
972
+
973
+ // render functions
974
+ if (render) {
975
+ options.render = render
976
+ options.staticRenderFns = staticRenderFns
977
+ options._compiled = true
978
+ }
979
+
980
+ // functional template
981
+ if (functionalTemplate) {
982
+ options.functional = true
983
+ }
984
+
985
+ // scopedId
986
+ if (scopeId) {
987
+ options._scopeId = 'data-v-' + scopeId
988
+ }
989
+
990
+ var hook
991
+ if (moduleIdentifier) {
992
+ // server build
993
+ hook = function (context) {
994
+ // 2.3 injection
995
+ context =
996
+ context || // cached call
997
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
998
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
999
+ // 2.2 with runInNewContext: true
1000
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1001
+ context = __VUE_SSR_CONTEXT__
1002
+ }
1003
+ // inject component styles
1004
+ if (injectStyles) {
1005
+ injectStyles.call(this, context)
1006
+ }
1007
+ // register component module identifier for async chunk inferrence
1008
+ if (context && context._registeredComponents) {
1009
+ context._registeredComponents.add(moduleIdentifier)
1010
+ }
1011
+ }
1012
+ // used by ssr in case component is cached and beforeCreate
1013
+ // never gets called
1014
+ options._ssrRegister = hook
1015
+ } else if (injectStyles) {
1016
+ hook = shadowMode
1017
+ ? function () {
1018
+ injectStyles.call(
1019
+ this,
1020
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
1021
+ )
1022
+ }
1023
+ : injectStyles
1024
+ }
1025
+
1026
+ if (hook) {
1027
+ if (options.functional) {
1028
+ // for template-only hot-reload because in that case the render fn doesn't
1029
+ // go through the normalizer
1030
+ options._injectStyles = hook
1031
+ // register for functional component in vue file
1032
+ var originalRender = options.render
1033
+ options.render = function renderWithStyleInjection(h, context) {
1034
+ hook.call(context)
1035
+ return originalRender(h, context)
1036
+ }
1037
+ } else {
1038
+ // inject component registration as beforeCreate hook
1039
+ var existing = options.beforeCreate
1040
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1041
+ }
1042
+ }
1043
+
1044
+ return {
1045
+ exports: scriptExports,
1046
+ options: options
1047
+ }
1048
+ }
1049
+
1050
+ // CONCATENATED MODULE: ./src/components/xt-upload/preview.vue
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+ /* normalize component */
1058
+
1059
+ var component = normalizeComponent(
1060
+ xt_upload_previewvue_type_script_lang_js,
1061
+ previewvue_type_template_id_236adf7f_scoped_true_render,
1062
+ previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns,
1063
+ false,
1064
+ null,
1065
+ "236adf7f",
1066
+ null
1067
+
1068
+ )
1069
+
1070
+ /* harmony default export */ var preview = (component.exports);
1071
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/index.vue?vue&type=script&lang=js
1072
+
1073
+
1074
+ /* harmony default export */ var xt_uploadvue_type_script_lang_js = ({
1075
+ name: "XtUpload",
1076
+ components: {
1077
+ ImageViewer: preview
1078
+ },
1079
+ model: {
1080
+ prop: "src",
1081
+ event: "change"
1082
+ },
1083
+ props: {
1084
+ data: {
1085
+ type: Object,
1086
+ default: () => {
1087
+ return { };
1088
+ }
1089
+ },
1090
+ src: {
1091
+ type: String,
1092
+ default: "",
1093
+ required: true
1094
+ },
1095
+ accessToken: {
1096
+ type: String,
1097
+ default: ""
1098
+ },
1099
+ autoUpload: {
1100
+ type: Boolean,
1101
+ default: true
1102
+ },
1103
+ action: {
1104
+ type: String,
1105
+ default: ""
1106
+ },
1107
+ baseUrl: {
1108
+ type: String,
1109
+ default: ""
1110
+ },
1111
+ multiple: {
1112
+ type: Boolean,
1113
+ default: false
1114
+ },
1115
+ accept: {
1116
+ type: String,
1117
+ default: ".jpg,.jpeg,.png"
1118
+ },
1119
+ limit: {
1120
+ type: Number,
1121
+ default: 5
1122
+ },
1123
+ disabled: {
1124
+ type: Boolean,
1125
+ default: false
1126
+ },
1127
+ size: {
1128
+ type: String,
1129
+ default: ""
1130
+ },
1131
+ beforeEmitData: {
1132
+ type: Function,
1133
+ default: (res, file, type) => {
1134
+ if (res.code == 200) {
1135
+ if (res.data.Result) {
1136
+ return res.data.Data;
1137
+ } else {
1138
+ return res.data[0];
1139
+ }
1140
+ } else {
1141
+ return false;
1142
+ }
1143
+ }
1144
+ },
1145
+ // 当前图片在图片库中预览
1146
+ allFileList: {
1147
+ type: Array
1148
+ },
1149
+ icon: {
1150
+ type: String,
1151
+ default: "el-icon-camera"
1152
+ }
1153
+ },
1154
+ data() {
1155
+ return {
1156
+ YSSQP: this.baseUrl,
1157
+ previewVisible: false,
1158
+ uploading: false,
1159
+ imageUrl: "",
1160
+ fileList: [],
1161
+ imageIndex: 0
1162
+ };
1163
+ },
1164
+ computed: {
1165
+ preview() {
1166
+ const { fileList } = this;
1167
+ return Array.isArray(fileList) && fileList.length > 0;
1168
+ },
1169
+ plusPx() {
1170
+ const _size = this.size == "big" ? 100 : 20;
1171
+ return 2 * _size;
1172
+ }
1173
+ },
1174
+ watch: {
1175
+ src: {
1176
+ immediate: true,
1177
+ deep: true,
1178
+ handler(v) {
1179
+ if (v) {
1180
+ this.fileList = v.split(",");
1181
+ } else {
1182
+ this.fileList = [];
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ methods: {
1188
+ clickHandler() {
1189
+ if (!this.preview) {
1190
+ return;
1191
+ }
1192
+ this.previewVisible = true;
1193
+ },
1194
+ closeViewer() {
1195
+ this.previewVisible = false;
1196
+ },
1197
+ preShowPicture(url, ind) {
1198
+ if (!this.allFileList || this.allFileList.length == 0) {
1199
+ this.imageIndex = ind;
1200
+ } else {
1201
+ const imgInd = this.allFileList.findIndex(src => src == url);
1202
+ if (imgInd > -1) {
1203
+ this.imageIndex = imgInd;
1204
+ } else {
1205
+ this.imageIndex = ind;
1206
+ }
1207
+ }
1208
+ if (url.indexOf(".pdf") > -1) {
1209
+ window.open(url, "_blank");
1210
+ } else {
1211
+ this.imageUrl = this.baseUrl + "/" + url;
1212
+ this.previewVisible = true;
1213
+ }
1214
+ },
1215
+ handleRemove(index, type) {
1216
+ try {
1217
+ this.fileList.splice(index, 1);
1218
+ this.$emit("change", this.fileList.join(","));
1219
+ } catch (error) {
1220
+ console.log(error);
1221
+ }
1222
+ },
1223
+ getPathName(v) {
1224
+ return v.split("/").pop().split(".")[0];
1225
+ },
1226
+ uploadBefore(file, type) {
1227
+ console.log(file);
1228
+ const isJPG = file.type === "image/jpeg" || file.type === "image/jpg" || file.type === "image/png" || file.type === "application/pdf";
1229
+ const isLt2M = file.size / 1024 / 1024 < 50;
1230
+ if (!isJPG) {
1231
+ this.$message.error("上传图片只能是jpg,jpeg,png,pdf格式!");
1232
+ }
1233
+ if (!isLt2M) {
1234
+ this.$message.error("上传图片大小不能超过50MB!");
1235
+ }
1236
+ return isJPG && isLt2M;
1237
+ },
1238
+ // 上传文件
1239
+ uploadSuccess(res, file, type) {
1240
+ const _data = this.beforeEmitData(res, file, type);
1241
+ if (_data) {
1242
+ this.fileList.push(_data);
1243
+ this.$emit("change", this.fileList.join(","));
1244
+ this.$message({
1245
+ message: "上传成功",
1246
+ center: true,
1247
+ type: "success"
1248
+ });
1249
+ return res.data[0];
1250
+ } else {
1251
+ this.$message({
1252
+ message: "上传失败",
1253
+ center: true,
1254
+ type: "error"
1255
+ });
1256
+ }
1257
+ }
1258
+ }
1259
+ });
1260
+
1261
+ // CONCATENATED MODULE: ./src/components/xt-upload/index.vue?vue&type=script&lang=js
1262
+ /* harmony default export */ var components_xt_uploadvue_type_script_lang_js = (xt_uploadvue_type_script_lang_js);
1263
+ // CONCATENATED MODULE: ./src/components/xt-upload/index.vue
1264
+
1265
+
1266
+
1267
+
1268
+
1269
+ /* normalize component */
1270
+
1271
+ var xt_upload_component = normalizeComponent(
1272
+ components_xt_uploadvue_type_script_lang_js,
1273
+ render,
1274
+ staticRenderFns,
1275
+ false,
1276
+ null,
1277
+ null,
1278
+ null
1279
+
1280
+ )
1281
+
1282
+ /* harmony default export */ var xt_upload = (xt_upload_component.exports);
1283
+ // CONCATENATED MODULE: ./src/components/xt-upload/index.js
1284
+
1285
+
1286
+ xt_upload.install = function (Vue) {
1287
+ Vue.component(xt_upload.name, xt_upload)
1288
+ }
1289
+
1290
+ /* harmony default export */ var components_xt_upload = (xt_upload);
1291
+
1292
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
1293
+
1294
+
1295
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_upload);
1296
+
1297
+
1298
+
1299
+ /***/ })
1300
+
1301
+ /******/ });
1302
+ });