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,10 @@
1
+ <meta charset="utf-8">
2
+ <title>xt-form-schema demo</title>
3
+ <script src="./xt-form-schema.umd.js"></script>
4
+
5
+ <link rel="stylesheet" href="./xt-form-schema.css">
6
+
7
+
8
+ <script>
9
+ console.log(xt-form-schema)
10
+ </script>
@@ -0,0 +1 @@
1
+ module.exports = require('./xt-form-schema.common.js');
@@ -0,0 +1,510 @@
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
+ /***/ "76cb":
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ // extracted by mini-css-extract-plugin
94
+
95
+ /***/ }),
96
+
97
+ /***/ "ee05":
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ /* 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_index_vue_vue_type_style_index_0_id_50399771_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("76cb");
102
+ /* 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_index_vue_vue_type_style_index_0_id_50399771_prod_lang_scss_scoped_true__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_index_vue_vue_type_style_index_0_id_50399771_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
103
+ /* unused harmony reexport * */
104
+
105
+
106
+ /***/ }),
107
+
108
+ /***/ "fb15":
109
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
110
+
111
+ "use strict";
112
+ // ESM COMPAT FLAG
113
+ __webpack_require__.r(__webpack_exports__);
114
+
115
+ // EXPORTS
116
+ __webpack_require__.d(__webpack_exports__, "XtFormSchema", function() { return /* reexport */ xt_form_schema; });
117
+
118
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
119
+ // This file is imported into lib/wc client bundles.
120
+
121
+ if (typeof window !== 'undefined') {
122
+ var currentScript = window.document.currentScript
123
+ if (false) { var getCurrentScript; }
124
+
125
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
126
+ if (src) {
127
+ __webpack_require__.p = src[1] // eslint-disable-line
128
+ }
129
+ }
130
+
131
+ // Indicate to webpack that this file can be concatenated
132
+ /* harmony default export */ var setPublicPath = (null);
133
+
134
+ // 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-form-schema/index.vue?vue&type=template&id=50399771&scoped=true
135
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-form-schema"},[(_vm.showSearchTags)?_c('div',{staticClass:"search-tags"},[_c('span',{staticClass:"tags-title"},[_vm._v("已检索:")]),_vm._l((_vm.activeSearchTags),function(tag,key){return _c('el-tag',{key:key,attrs:{"closable":"","size":"small"},on:{"close":function($event){return _vm.handleRemoveTag(key)}}},[_vm._v(" "+_vm._s(tag.label)+": "+_vm._s(tag.value)+" ")])}),(_vm.activeSearchTagsCount === 0)?_c('span',{staticClass:"no-tags"},[_vm._v("暂无检索条件")]):_vm._e()],2):_vm._e(),(_vm.mode === 'dialog')?_c('el-dialog',{staticClass:"xt-form-schema-dialog",attrs:{"title":_vm.title,"visible":_vm.visible,"width":_vm.width,"before-close":_vm.handleCancel,"append-to-body":"","modal-append-to-body":""},on:{"update:visible":function($event){_vm.visible=$event}}},[_c('el-form',{attrs:{"model":_vm.formData,"inline":false,"label-width":"120px"}},_vm._l((_vm.schema),function(field){return _c('el-form-item',{key:field.prop,attrs:{"label":field.label,"prop":field.prop}},[(!field.isSlot)?_c(_vm.getFieldComponent(field),_vm._b({tag:"component"},'component',_vm.getFieldProps(field),false)):_vm._t(field.prop,null,{"field":field})],2)}),1),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{on:{"click":_vm.handleCancel}},[_vm._v("取消")]),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.handleConfirm}},[_vm._v("确认")])],1)],1):_vm._e(),(_vm.mode === 'drawer')?_c('el-drawer',{staticClass:"xt-form-schema-drawer",attrs:{"title":_vm.title,"visible":_vm.visible,"direction":_vm.direction,"size":_vm.width,"before-close":_vm.handleCancel,"append-to-body":"","modal-append-to-body":""},on:{"update:visible":function($event){_vm.visible=$event}}},[_c('el-form',{attrs:{"model":_vm.formData,"inline":false,"label-width":"120px"}},_vm._l((_vm.schema),function(field){return _c('el-form-item',{key:field.prop,attrs:{"label":field.label,"prop":field.prop}},[(!field.isSlot)?_c(_vm.getFieldComponent(field),_vm._b({tag:"component"},'component',_vm.getFieldProps(field),false)):_vm._t(field.prop,null,{"field":field})],2)}),1),_c('div',{staticClass:"drawer-footer"},[_c('el-button',{on:{"click":_vm.handleCancel}},[_vm._v("取消")]),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.handleConfirm}},[_vm._v("确认")])],1)],1):_vm._e()],1)
136
+ }
137
+ var staticRenderFns = []
138
+
139
+
140
+ // CONCATENATED MODULE: ./src/components/xt-form-schema/index.vue?vue&type=template&id=50399771&scoped=true
141
+
142
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-form-schema/index.vue?vue&type=script&lang=js
143
+
144
+ /* harmony default export */ var xt_form_schemavue_type_script_lang_js = ({
145
+ name: 'XtFormSchema',
146
+ props: {
147
+ visible: {
148
+ type: Boolean,
149
+ default: false
150
+ },
151
+ value: {
152
+ type: Object,
153
+ default: () => ({})
154
+ },
155
+ schema: {
156
+ type: Array,
157
+ default: () => []
158
+ },
159
+ mode: {
160
+ type: String,
161
+ default: 'dialog',
162
+ validator: (val) => ['dialog', 'drawer'].includes(val)
163
+ },
164
+ title: {
165
+ type: String,
166
+ default: '高级搜索'
167
+ },
168
+ width: {
169
+ type: [String, Number],
170
+ default: '500px'
171
+ },
172
+ direction: {
173
+ type: String,
174
+ default: 'rtl',
175
+ validator: (val) => ['ltr', 'rtl', 'ttb', 'btt'].includes(val)
176
+ },
177
+ showSearchTags: {
178
+ type: Boolean,
179
+ default: false
180
+ },
181
+ simpleFields: {
182
+ type: Array,
183
+ default: () => []
184
+ }
185
+ },
186
+ data() {
187
+ return {
188
+ formData: {}
189
+ }
190
+ },
191
+ computed: {
192
+ activeSearchTags() {
193
+ const tags = {}
194
+ this.schema.forEach(field => {
195
+ const value = this.formData[field.prop]
196
+ if (value !== null && value !== undefined && value !== '' && value !== []) {
197
+ let displayValue = value
198
+ if (field.type === 'select' && field.options) {
199
+ const option = field.options.find(opt => opt.value === value)
200
+ displayValue = option ? option.label : value
201
+ } else if (field.type === 'date' && Array.isArray(value)) {
202
+ displayValue = value.map(v => v ? this.formatDate(v) : '').join(' - ')
203
+ } else if (field.type === 'daterange' && Array.isArray(value)) {
204
+ displayValue = value.map(v => v ? this.formatDate(v) : '').join(' - ')
205
+ } else if (field.type === 'checkbox-group' && Array.isArray(value)) {
206
+ const labels = value.map(v => {
207
+ const option = (field.options || []).find(opt => opt.value === v)
208
+ return option ? option.label : v
209
+ })
210
+ displayValue = labels.join(', ')
211
+ }
212
+ tags[field.prop] = {
213
+ label: field.label,
214
+ value: displayValue
215
+ }
216
+ }
217
+ })
218
+ return tags
219
+ },
220
+ activeSearchTagsCount() {
221
+ return Object.keys(this.activeSearchTags).length
222
+ }
223
+ },
224
+ watch: {
225
+ visible: {
226
+ immediate: true,
227
+ handler(val) {
228
+ if (val) {
229
+ this.initFormData()
230
+ }
231
+ }
232
+ },
233
+ value: {
234
+ deep: true,
235
+ handler(val) {
236
+ if (val && this.visible) {
237
+ this.formData = { ...val }
238
+ }
239
+ }
240
+ }
241
+ },
242
+ methods: {
243
+ initFormData() {
244
+ const data = {}
245
+ this.schema.forEach(field => {
246
+ data[field.prop] = this.value[field.prop] !== undefined ? this.value[field.prop] : (field.defaultValue !== undefined ? field.defaultValue : '')
247
+ })
248
+ this.formData = data
249
+ },
250
+ getFieldComponent(field) {
251
+ const componentMap = {
252
+ input: 'el-input',
253
+ textarea: 'el-input',
254
+ select: 'el-select',
255
+ checkbox: 'el-checkbox',
256
+ 'checkbox-group': 'el-checkbox-group',
257
+ radio: 'el-radio',
258
+ 'radio-group': 'el-radio-group',
259
+ 'date': 'el-date-picker',
260
+ daterange: 'el-date-picker',
261
+ datetime: 'el-date-picker',
262
+ 'datetime-range': 'el-date-picker',
263
+ number: 'el-input-number',
264
+ switch: 'el-switch'
265
+ }
266
+ return componentMap[field.type] || 'el-input'
267
+ },
268
+ getFieldProps(field) {
269
+ const props = {
270
+ value: this.formData[field.prop],
271
+ placeholder: field.placeholder || `请输入${field.label}`
272
+ }
273
+
274
+ if (field.type === 'textarea') {
275
+ props.type = 'textarea'
276
+ props.rows = field.rows || 3
277
+ }
278
+
279
+ if (field.type === 'select') {
280
+ props.filterable = field.filterable || false
281
+ props.multiple = field.multiple || false
282
+ }
283
+
284
+ if (field.type === 'date') {
285
+ props.type = field.dateType || 'date'
286
+ props.format = field.format || 'yyyy-MM-dd'
287
+ props['value-format'] = field.valueFormat || 'yyyy-MM-dd'
288
+ }
289
+
290
+ if (field.type === 'daterange') {
291
+ props.type = 'daterange'
292
+ props.format = field.format || 'yyyy-MM-dd'
293
+ props['value-format'] = field.valueFormat || 'yyyy-MM-dd'
294
+ }
295
+
296
+ if (field.type === 'datetime') {
297
+ props.type = 'datetime'
298
+ props.format = field.format || 'yyyy-MM-dd HH:mm:ss'
299
+ props['value-format'] = field.valueFormat || 'yyyy-MM-dd HH:mm:ss'
300
+ }
301
+
302
+ if (field.type === 'datetime-range') {
303
+ props.type = 'datetimerange'
304
+ props.format = field.format || 'yyyy-MM-dd HH:mm:ss'
305
+ props['value-format'] = field.valueFormat || 'yyyy-MM-dd HH:mm:ss'
306
+ }
307
+
308
+ if (field.type === 'number') {
309
+ props.min = field.min
310
+ props.max = field.max
311
+ props.step = field.step || 1
312
+ }
313
+
314
+ if (field.type === 'checkbox-group' || field.type === 'radio-group') {
315
+ props.options = field.options || []
316
+ }
317
+
318
+ if (field.disabled !== undefined) {
319
+ props.disabled = field.disabled
320
+ }
321
+
322
+ if (field.size !== undefined) {
323
+ props.size = field.size
324
+ }
325
+
326
+ props['on:input'] = (val) => this.handleFieldChange(field.prop, val)
327
+ props['on:change'] = (val) => this.handleFieldChange(field.prop, val)
328
+
329
+ return props
330
+ },
331
+ handleFieldChange(prop, val) {
332
+ this.formData[prop] = val
333
+ this.$emit('input', { ...this.formData })
334
+ this.$emit('change', { prop, value: val })
335
+ },
336
+ handleRemoveTag(prop) {
337
+ this.formData[prop] = ''
338
+ this.$emit('input', { ...this.formData })
339
+ this.$emit('change', { prop, value: '' })
340
+ },
341
+ handleConfirm() {
342
+ this.$emit('confirm', { ...this.formData })
343
+ this.$emit('input', { ...this.formData })
344
+ this.$emit('update:visible', false)
345
+ },
346
+ handleCancel() {
347
+ this.$emit('cancel')
348
+ this.$emit('update:visible', false)
349
+ },
350
+ formatDate(date) {
351
+ if (!date) return ''
352
+ const d = new Date(date)
353
+ const year = d.getFullYear()
354
+ const month = String(d.getMonth() + 1).padStart(2, '0')
355
+ const day = String(d.getDate()).padStart(2, '0')
356
+ return `${year}-${month}-${day}`
357
+ },
358
+ resetFields() {
359
+ this.initFormData()
360
+ this.schema.forEach(field => {
361
+ this.formData[field.prop] = field.defaultValue !== undefined ? field.defaultValue : ''
362
+ })
363
+ this.$emit('input', { ...this.formData })
364
+ }
365
+ }
366
+ });
367
+
368
+ // CONCATENATED MODULE: ./src/components/xt-form-schema/index.vue?vue&type=script&lang=js
369
+ /* harmony default export */ var components_xt_form_schemavue_type_script_lang_js = (xt_form_schemavue_type_script_lang_js);
370
+ // EXTERNAL MODULE: ./src/components/xt-form-schema/index.vue?vue&type=style&index=0&id=50399771&prod&lang=scss&scoped=true
371
+ var xt_form_schemavue_type_style_index_0_id_50399771_prod_lang_scss_scoped_true = __webpack_require__("ee05");
372
+
373
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
374
+ /* globals __VUE_SSR_CONTEXT__ */
375
+
376
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
377
+ // This module is a runtime utility for cleaner component module output and will
378
+ // be included in the final webpack user bundle.
379
+
380
+ function normalizeComponent(
381
+ scriptExports,
382
+ render,
383
+ staticRenderFns,
384
+ functionalTemplate,
385
+ injectStyles,
386
+ scopeId,
387
+ moduleIdentifier /* server only */,
388
+ shadowMode /* vue-cli only */
389
+ ) {
390
+ // Vue.extend constructor export interop
391
+ var options =
392
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
393
+
394
+ // render functions
395
+ if (render) {
396
+ options.render = render
397
+ options.staticRenderFns = staticRenderFns
398
+ options._compiled = true
399
+ }
400
+
401
+ // functional template
402
+ if (functionalTemplate) {
403
+ options.functional = true
404
+ }
405
+
406
+ // scopedId
407
+ if (scopeId) {
408
+ options._scopeId = 'data-v-' + scopeId
409
+ }
410
+
411
+ var hook
412
+ if (moduleIdentifier) {
413
+ // server build
414
+ hook = function (context) {
415
+ // 2.3 injection
416
+ context =
417
+ context || // cached call
418
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
419
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
420
+ // 2.2 with runInNewContext: true
421
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
422
+ context = __VUE_SSR_CONTEXT__
423
+ }
424
+ // inject component styles
425
+ if (injectStyles) {
426
+ injectStyles.call(this, context)
427
+ }
428
+ // register component module identifier for async chunk inferrence
429
+ if (context && context._registeredComponents) {
430
+ context._registeredComponents.add(moduleIdentifier)
431
+ }
432
+ }
433
+ // used by ssr in case component is cached and beforeCreate
434
+ // never gets called
435
+ options._ssrRegister = hook
436
+ } else if (injectStyles) {
437
+ hook = shadowMode
438
+ ? function () {
439
+ injectStyles.call(
440
+ this,
441
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
442
+ )
443
+ }
444
+ : injectStyles
445
+ }
446
+
447
+ if (hook) {
448
+ if (options.functional) {
449
+ // for template-only hot-reload because in that case the render fn doesn't
450
+ // go through the normalizer
451
+ options._injectStyles = hook
452
+ // register for functional component in vue file
453
+ var originalRender = options.render
454
+ options.render = function renderWithStyleInjection(h, context) {
455
+ hook.call(context)
456
+ return originalRender(h, context)
457
+ }
458
+ } else {
459
+ // inject component registration as beforeCreate hook
460
+ var existing = options.beforeCreate
461
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
462
+ }
463
+ }
464
+
465
+ return {
466
+ exports: scriptExports,
467
+ options: options
468
+ }
469
+ }
470
+
471
+ // CONCATENATED MODULE: ./src/components/xt-form-schema/index.vue
472
+
473
+
474
+
475
+
476
+
477
+
478
+ /* normalize component */
479
+
480
+ var component = normalizeComponent(
481
+ components_xt_form_schemavue_type_script_lang_js,
482
+ render,
483
+ staticRenderFns,
484
+ false,
485
+ null,
486
+ "50399771",
487
+ null
488
+
489
+ )
490
+
491
+ /* harmony default export */ var xt_form_schema = (component.exports);
492
+ // CONCATENATED MODULE: ./src/components/xt-form-schema/index.js
493
+
494
+
495
+ xt_form_schema.install = function (Vue) {
496
+ Vue.component(xt_form_schema.name, xt_form_schema)
497
+ }
498
+
499
+ /* harmony default export */ var components_xt_form_schema = (xt_form_schema);
500
+
501
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
502
+
503
+
504
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_form_schema);
505
+
506
+
507
+
508
+ /***/ })
509
+
510
+ /******/ });
@@ -0,0 +1 @@
1
+ .xt-form-schema .search-tags[data-v-50399771]{display:flex;flex-wrap:wrap;align-items:center;padding:8px 12px;background:#f5f7fa;border-radius:4px;margin-bottom:12px}.xt-form-schema .search-tags .tags-title[data-v-50399771]{font-size:14px;color:#606266;margin-right:8px;flex-shrink:0}.xt-form-schema .search-tags .el-tag[data-v-50399771]{margin:4px;cursor:pointer}.xt-form-schema .search-tags .no-tags[data-v-50399771]{font-size:14px;color:#c0c4cc}.xt-form-schema .dialog-footer[data-v-50399771],.xt-form-schema .drawer-footer[data-v-50399771]{text-align:right;padding-top:16px;border-top:1px solid #ebeef5}