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