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,427 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["xt-step-price-item"] = factory();
8
+ else
9
+ root["xt-step-price-item"] = factory();
10
+ })((typeof self !== 'undefined' ? self : this), function() {
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
+ /***/ "fb15":
100
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
101
+
102
+ "use strict";
103
+ // ESM COMPAT FLAG
104
+ __webpack_require__.r(__webpack_exports__);
105
+
106
+ // EXPORTS
107
+ __webpack_require__.d(__webpack_exports__, "XtStepPriceItem", function() { return /* reexport */ xt_step_price_item; });
108
+
109
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
110
+ // This file is imported into lib/wc client bundles.
111
+
112
+ if (typeof window !== 'undefined') {
113
+ var currentScript = window.document.currentScript
114
+ if (false) { var getCurrentScript; }
115
+
116
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
117
+ if (src) {
118
+ __webpack_require__.p = src[1] // eslint-disable-line
119
+ }
120
+ }
121
+
122
+ // Indicate to webpack that this file can be concatenated
123
+ /* harmony default export */ var setPublicPath = (null);
124
+
125
+ // 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-step-price-item/index.vue?vue&type=template&id=4d5bb3b1
126
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price-item"},[_c('div',{staticClass:"xt-step-price-item__range"},[_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalLeftBracket))]),(_vm.itemsLength > 1)?_c('span',{staticClass:"xt-step-price-item__name"},[_vm._v("第"+_vm._s(_vm.index + 1)+_vm._s(_vm.stepName))]):_vm._e(),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))]),_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small","placeholder":"下限"},on:{"blur":(e) => { _vm.onMinBlur(); _vm.onBlur(e) }},model:{value:(_vm.minInput),callback:function ($$v) {_vm.minInput=_vm._n($$v)},expression:"minInput"}}),_c('span',{staticClass:"xt-step-price-item__comma"},[_vm._v("-")]),(!_vm.isLast)?_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"type":"number","disabled":_vm.disabled,"size":"small","placeholder":"上限"},on:{"blur":(e) => { _vm.onMaxBlur(); _vm.onBlur(e) }},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")])],1),_c('div',{staticClass:"xt-step-price-item__price"},[_c('xt-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"type":"number","disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":(e) => { _vm.onPriceBlur(); _vm.onBlur(e) }},model:{value:(_vm.priceInput),callback:function ($$v) {_vm.priceInput=_vm._n($$v)},expression:"priceInput"}}),_c('span',{staticClass:"xt-step-price-item__unit"},[_vm._v(_vm._s(_vm.unit))])],1),(!_vm.disabled && _vm.removable && _vm.itemsLength > 1)?_c('xt-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
127
+ }
128
+ var staticRenderFns = []
129
+
130
+
131
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=4d5bb3b1
132
+
133
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price-item/index.vue?vue&type=script&lang=js
134
+
135
+ /* harmony default export */ var xt_step_price_itemvue_type_script_lang_js = ({
136
+ name: 'XtStepPriceItem',
137
+
138
+ props: {
139
+ value: {
140
+ type: Object,
141
+ required: true,
142
+ default: () => ({ min: 0, max: null, price: 0 })
143
+ },
144
+ stepName: { type: String, default: '阶梯' },
145
+ index: { type: Number, default: 0 },
146
+ isFirst: { type: Boolean, default: false },
147
+ isLast: { type: Boolean, default: false },
148
+ itemsLength: { type: Number, default: 1 },
149
+ removable: { type: Boolean, default: true },
150
+ disabled: { type: Boolean, default: false },
151
+ allowNegative: { type: Boolean, default: false },
152
+ minLocked: { type: Boolean, default: false },
153
+ unit: { type: String, default: '元' },
154
+ precision: { type: Number, default: 2 },
155
+ // 阶梯增量:控制新增/校正时的区间跨度,默认 1
156
+ step: { type: Number, default: 1 },
157
+ // 左括号:默认 '[',传空则不显示
158
+ leftBracket: { type: String, default: '[' },
159
+ // 右括号:默认 null,走内置规则(只有1条为 ']',多条为 ')');传值则强制使用
160
+ rightBracket: { type: String, default: null },
161
+ // 字段名映射:{ min, max, price },允许传入的 value 使用自定义字段名
162
+ fieldKeys: {
163
+ type: Object,
164
+ default: () => ({ min: 'min', max: 'max', price: 'price' })
165
+ }
166
+ },
167
+
168
+ computed: {
169
+ keyMin() { return (this.fieldKeys && this.fieldKeys.min) || 'min' },
170
+ keyMax() { return (this.fieldKeys && this.fieldKeys.max) || 'max' },
171
+ keyPrice() { return (this.fieldKeys && this.fieldKeys.price) || 'price' },
172
+ finalRightBracket() {
173
+ if (this.rightBracket !== null && this.rightBracket !== undefined && this.rightBracket !== '') return this.rightBracket
174
+ return this.isLast ? ']' : ')'
175
+ },
176
+ finalLeftBracket() {
177
+ return (this.leftBracket === null || this.leftBracket === undefined) ? '[' : this.leftBracket
178
+ }
179
+ },
180
+
181
+ data() {
182
+ const { minVal, maxVal, priceVal } = this.getPriceItem(this.value)
183
+ return {
184
+ minInput: minVal,
185
+ maxInput: maxVal,
186
+ priceInput: priceVal
187
+ }
188
+ },
189
+
190
+ watch: {
191
+ value: {
192
+ deep: true,
193
+ immediate: true,
194
+ handler(val) {
195
+ const { minVal, maxVal, priceVal } = this.getPriceItem(val)
196
+ this.minInput = minVal
197
+ this.maxInput = maxVal
198
+ this.priceInput = priceVal
199
+ }
200
+ },
201
+ isLast(val) {
202
+ if (val) {
203
+ this.maxInput = null
204
+ } else {
205
+ const minVal = this.safeNumber(this.minInput, 0)
206
+ const v = this.value
207
+ this.maxInput = this.safeNumber(v && v[this.keyMax], minVal + 1)
208
+ }
209
+ }
210
+ },
211
+
212
+ methods: {
213
+ getPriceItem(value) {
214
+ const v = value
215
+ const minVal = this.safeNumber(v && v[this.keyMin], 0)
216
+ const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
217
+ const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
218
+ return {
219
+ minVal,
220
+ maxVal,
221
+ priceVal
222
+ }
223
+ },
224
+ // 统一兜底:非数字输入一律转为 fallback(默认 0)
225
+ safeNumber(v, fallback = 0) {
226
+ if (v === null || v === undefined || v === '' || v === Infinity || v === -Infinity) return fallback
227
+ const n = Number(v)
228
+ return isNaN(n) ? fallback : n
229
+ },
230
+
231
+ emitChange(partial) {
232
+ const next = {
233
+ [this.keyMin]: this.minInput,
234
+ [this.keyMax]: this.isLast ? null : this.maxInput,
235
+ [this.keyPrice]: this.priceInput,
236
+ ...partial
237
+ }
238
+ this.$emit('input', next)
239
+ this.$emit('change', next, this.index)
240
+ },
241
+
242
+ onMinBlur() {
243
+ let v = this.safeNumber(this.minInput, 0)
244
+ if (v !== 0) {
245
+ v = Number(v.toFixed(this.precision))
246
+ }
247
+ this.minInput = v
248
+ this.$emit('min-change', v, this.index)
249
+ this.emitChange({ [this.keyMin]: v })
250
+ },
251
+
252
+ onMaxBlur() {
253
+ if (this.isLast) return
254
+ const minVal = this.safeNumber(this.minInput, 0)
255
+ const stepVal = this.safeNumber(this.step, 1)
256
+ let v = this.safeNumber(this.maxInput, minVal + stepVal)
257
+ if (v <= minVal) v = minVal + stepVal
258
+ v = Number(v.toFixed(this.precision))
259
+ this.maxInput = v
260
+ this.$emit('max-change', v, this.index)
261
+ this.emitChange({ [this.keyMax]: v })
262
+ },
263
+
264
+ onPriceBlur() {
265
+ const rawVal = this.priceInput
266
+ if (rawVal === null || rawVal === undefined || rawVal === '' || isNaN(rawVal)) {
267
+ this.priceInput = ''
268
+ this.emitChange({ [this.keyPrice]: '' })
269
+ return
270
+ }
271
+ let v = this.safeNumber(rawVal, 0)
272
+ if (v < 0 && !this.allowNegative) v = 0
273
+ v = Number(v.toFixed(this.precision))
274
+ this.priceInput = v
275
+ this.emitChange({ [this.keyPrice]: v })
276
+ },
277
+
278
+ onBlur(e) {
279
+ this.$emit('blur', e)
280
+ },
281
+
282
+ onDelete() {
283
+ this.$emit('delete', this.index)
284
+ }
285
+ }
286
+ });
287
+
288
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=script&lang=js
289
+ /* harmony default export */ var components_xt_step_price_itemvue_type_script_lang_js = (xt_step_price_itemvue_type_script_lang_js);
290
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
291
+ /* globals __VUE_SSR_CONTEXT__ */
292
+
293
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
294
+ // This module is a runtime utility for cleaner component module output and will
295
+ // be included in the final webpack user bundle.
296
+
297
+ function normalizeComponent(
298
+ scriptExports,
299
+ render,
300
+ staticRenderFns,
301
+ functionalTemplate,
302
+ injectStyles,
303
+ scopeId,
304
+ moduleIdentifier /* server only */,
305
+ shadowMode /* vue-cli only */
306
+ ) {
307
+ // Vue.extend constructor export interop
308
+ var options =
309
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
310
+
311
+ // render functions
312
+ if (render) {
313
+ options.render = render
314
+ options.staticRenderFns = staticRenderFns
315
+ options._compiled = true
316
+ }
317
+
318
+ // functional template
319
+ if (functionalTemplate) {
320
+ options.functional = true
321
+ }
322
+
323
+ // scopedId
324
+ if (scopeId) {
325
+ options._scopeId = 'data-v-' + scopeId
326
+ }
327
+
328
+ var hook
329
+ if (moduleIdentifier) {
330
+ // server build
331
+ hook = function (context) {
332
+ // 2.3 injection
333
+ context =
334
+ context || // cached call
335
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
336
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
337
+ // 2.2 with runInNewContext: true
338
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
339
+ context = __VUE_SSR_CONTEXT__
340
+ }
341
+ // inject component styles
342
+ if (injectStyles) {
343
+ injectStyles.call(this, context)
344
+ }
345
+ // register component module identifier for async chunk inferrence
346
+ if (context && context._registeredComponents) {
347
+ context._registeredComponents.add(moduleIdentifier)
348
+ }
349
+ }
350
+ // used by ssr in case component is cached and beforeCreate
351
+ // never gets called
352
+ options._ssrRegister = hook
353
+ } else if (injectStyles) {
354
+ hook = shadowMode
355
+ ? function () {
356
+ injectStyles.call(
357
+ this,
358
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
359
+ )
360
+ }
361
+ : injectStyles
362
+ }
363
+
364
+ if (hook) {
365
+ if (options.functional) {
366
+ // for template-only hot-reload because in that case the render fn doesn't
367
+ // go through the normalizer
368
+ options._injectStyles = hook
369
+ // register for functional component in vue file
370
+ var originalRender = options.render
371
+ options.render = function renderWithStyleInjection(h, context) {
372
+ hook.call(context)
373
+ return originalRender(h, context)
374
+ }
375
+ } else {
376
+ // inject component registration as beforeCreate hook
377
+ var existing = options.beforeCreate
378
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
379
+ }
380
+ }
381
+
382
+ return {
383
+ exports: scriptExports,
384
+ options: options
385
+ }
386
+ }
387
+
388
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue
389
+
390
+
391
+
392
+
393
+
394
+ /* normalize component */
395
+
396
+ var component = normalizeComponent(
397
+ components_xt_step_price_itemvue_type_script_lang_js,
398
+ render,
399
+ staticRenderFns,
400
+ false,
401
+ null,
402
+ null,
403
+ null
404
+
405
+ )
406
+
407
+ /* harmony default export */ var xt_step_price_item = (component.exports);
408
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.js
409
+
410
+
411
+ xt_step_price_item.install = function (Vue) {
412
+ Vue.component(xt_step_price_item.name, xt_step_price_item)
413
+ }
414
+
415
+ /* harmony default export */ var components_xt_step_price_item = (xt_step_price_item);
416
+
417
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
418
+
419
+
420
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_step_price_item);
421
+
422
+
423
+
424
+ /***/ })
425
+
426
+ /******/ });
427
+ });
@@ -0,0 +1 @@
1
+ (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-step-price-item"]=t():e["xt-step-price-item"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"XtStepPriceItem",(function(){return c})),"undefined"!==typeof window){var n=window.document.currentScript,s=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-step-price-item"},[t("div",{staticClass:"xt-step-price-item__range"},[t("span",{staticClass:"xt-step-price-item__bracket"},[e._v(e._s(e.finalLeftBracket))]),e.itemsLength>1?t("span",{staticClass:"xt-step-price-item__name"},[e._v("第"+e._s(e.index+1)+e._s(e.stepName))]):e._e(),t("span",{staticClass:"xt-step-price-item__bracket"},[e._v(e._s(e.finalRightBracket))]),t("xt-input",{staticClass:"xt-step-price-item__input",attrs:{disabled:e.disabled||e.minLocked,size:"small",placeholder:"下限"},on:{blur:t=>{e.onMinBlur(),e.onBlur(t)}},model:{value:e.minInput,callback:function(t){e.minInput=e._n(t)},expression:"minInput"}}),t("span",{staticClass:"xt-step-price-item__comma"},[e._v("-")]),e.isLast?t("span",{staticClass:"xt-step-price-item__infinity"},[e._v("+∞")]):t("xt-input",{staticClass:"xt-step-price-item__input",attrs:{type:"number",disabled:e.disabled,size:"small",placeholder:"上限"},on:{blur:t=>{e.onMaxBlur(),e.onBlur(t)}},model:{value:e.maxInput,callback:function(t){e.maxInput=e._n(t)},expression:"maxInput"}})],1),t("div",{staticClass:"xt-step-price-item__price"},[t("xt-input",{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{type:"number",disabled:e.disabled,size:"small",placeholder:"价格"},on:{blur:t=>{e.onPriceBlur(),e.onBlur(t)}},model:{value:e.priceInput,callback:function(t){e.priceInput=e._n(t)},expression:"priceInput"}}),t("span",{staticClass:"xt-step-price-item__unit"},[e._v(e._s(e.unit))])],1),!e.disabled&&e.removable&&e.itemsLength>1?t("xt-button",{staticClass:"xt-step-price-item__delete",attrs:{type:"text",icon:"el-icon-delete"},on:{click:e.onDelete}}):e._e()],1)},a=[],l={name:"XtStepPriceItem",props:{value:{type:Object,required:!0,default:()=>({min:0,max:null,price:0})},stepName:{type:String,default:"阶梯"},index:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1},itemsLength:{type:Number,default:1},removable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},allowNegative:{type:Boolean,default:!1},minLocked:{type:Boolean,default:!1},unit:{type:String,default:"元"},precision:{type:Number,default:2},step:{type:Number,default:1},leftBracket:{type:String,default:"["},rightBracket:{type:String,default:null},fieldKeys:{type:Object,default:()=>({min:"min",max:"max",price:"price"})}},computed:{keyMin(){return this.fieldKeys&&this.fieldKeys.min||"min"},keyMax(){return this.fieldKeys&&this.fieldKeys.max||"max"},keyPrice(){return this.fieldKeys&&this.fieldKeys.price||"price"},finalRightBracket(){return null!==this.rightBracket&&void 0!==this.rightBracket&&""!==this.rightBracket?this.rightBracket:this.isLast?"]":")"},finalLeftBracket(){return null===this.leftBracket||void 0===this.leftBracket?"[":this.leftBracket}},data(){const{minVal:e,maxVal:t,priceVal:i}=this.getPriceItem(this.value);return{minInput:e,maxInput:t,priceInput:i}},watch:{value:{deep:!0,immediate:!0,handler(e){const{minVal:t,maxVal:i,priceVal:n}=this.getPriceItem(e);this.minInput=t,this.maxInput=i,this.priceInput=n}},isLast(e){if(e)this.maxInput=null;else{const e=this.safeNumber(this.minInput,0),t=this.value;this.maxInput=this.safeNumber(t&&t[this.keyMax],e+1)}}},methods:{getPriceItem(e){const t=e,i=this.safeNumber(t&&t[this.keyMin],0),n=this.isLast?null:this.safeNumber(t&&t[this.keyMax],i+1),s=this.safeNumber(t&&t[this.keyPrice],0);return{minVal:i,maxVal:n,priceVal:s}},safeNumber(e,t=0){if(null===e||void 0===e||""===e||e===1/0||e===-1/0)return t;const i=Number(e);return isNaN(i)?t:i},emitChange(e){const t={[this.keyMin]:this.minInput,[this.keyMax]:this.isLast?null:this.maxInput,[this.keyPrice]:this.priceInput,...e};this.$emit("input",t),this.$emit("change",t,this.index)},onMinBlur(){let e=this.safeNumber(this.minInput,0);0!==e&&(e=Number(e.toFixed(this.precision))),this.minInput=e,this.$emit("min-change",e,this.index),this.emitChange({[this.keyMin]:e})},onMaxBlur(){if(this.isLast)return;const e=this.safeNumber(this.minInput,0),t=this.safeNumber(this.step,1);let i=this.safeNumber(this.maxInput,e+t);i<=e&&(i=e+t),i=Number(i.toFixed(this.precision)),this.maxInput=i,this.$emit("max-change",i,this.index),this.emitChange({[this.keyMax]:i})},onPriceBlur(){const e=this.priceInput;if(null===e||void 0===e||""===e||isNaN(e))return this.priceInput="",void this.emitChange({[this.keyPrice]:""});let t=this.safeNumber(e,0);t<0&&!this.allowNegative&&(t=0),t=Number(t.toFixed(this.precision)),this.priceInput=t,this.emitChange({[this.keyPrice]:t})},onBlur(e){this.$emit("blur",e)},onDelete(){this.$emit("delete",this.index)}}},u=l;function p(e,t,i,n,s,r,a,l){var u,p="function"===typeof e?e.options:e;if(t&&(p.render=t,p.staticRenderFns=i,p._compiled=!0),n&&(p.functional=!0),r&&(p._scopeId="data-v-"+r),a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},p._ssrRegister=u):s&&(u=l?function(){s.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(p.functional){p._injectStyles=u;var o=p.render;p.render=function(e,t){return u.call(t),o(e,t)}}else{var c=p.beforeCreate;p.beforeCreate=c?[].concat(c,u):[u]}return{exports:e,options:p}}var o=p(u,r,a,!1,null,null,null),c=o.exports;c.install=function(e){e.component(c.name,c)};var m=c;t["default"]=m}})}));
@@ -0,0 +1,10 @@
1
+ <meta charset="utf-8">
2
+ <title>xt-tab-pane demo</title>
3
+ <script src="./xt-tab-pane.umd.js"></script>
4
+
5
+ <link rel="stylesheet" href="./xt-tab-pane.css">
6
+
7
+
8
+ <script>
9
+ console.log(xt-tab-pane)
10
+ </script>
@@ -0,0 +1 @@
1
+ module.exports = require('./xt-tab-pane.common.js');