xt-element-ui 2.1.72 → 2.2.1

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 (194) hide show
  1. package/lib/index.common.js +267 -61
  2. package/lib/index.css +1 -1
  3. package/lib/index.umd.js +267 -61
  4. package/lib/index.umd.min.js +1 -1
  5. package/lib/xt-badge/demo.html +10 -0
  6. package/lib/xt-badge/index.js +1 -0
  7. package/lib/xt-badge/xt-badge.common.js +335 -0
  8. package/lib/xt-badge/xt-badge.css +1 -0
  9. package/lib/xt-badge/xt-badge.umd.js +345 -0
  10. package/lib/xt-badge/xt-badge.umd.min.js +1 -0
  11. package/lib/xt-button/demo.html +10 -0
  12. package/lib/xt-button/index.js +1 -0
  13. package/lib/xt-button/xt-button.common.js +331 -0
  14. package/lib/xt-button/xt-button.css +1 -0
  15. package/lib/xt-button/xt-button.umd.js +341 -0
  16. package/lib/xt-button/xt-button.umd.min.js +1 -0
  17. package/lib/xt-card/demo.html +10 -0
  18. package/lib/xt-card/index.js +1 -0
  19. package/lib/xt-card/xt-card.common.js +325 -0
  20. package/lib/xt-card/xt-card.css +1 -0
  21. package/lib/xt-card/xt-card.umd.js +335 -0
  22. package/lib/xt-card/xt-card.umd.min.js +1 -0
  23. package/lib/xt-card-item/demo.html +10 -0
  24. package/lib/xt-card-item/index.js +1 -0
  25. package/lib/xt-card-item/xt-card-item.common.js +291 -0
  26. package/lib/xt-card-item/xt-card-item.css +1 -0
  27. package/lib/xt-card-item/xt-card-item.umd.js +301 -0
  28. package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
  29. package/lib/xt-chart/demo.html +10 -0
  30. package/lib/xt-chart/index.js +1 -0
  31. package/lib/xt-chart/xt-chart.common.js +109203 -0
  32. package/lib/xt-chart/xt-chart.css +1 -0
  33. package/lib/xt-chart/xt-chart.umd.js +109213 -0
  34. package/lib/xt-chart/xt-chart.umd.min.js +1 -0
  35. package/lib/xt-config-provider/demo.html +10 -0
  36. package/lib/xt-config-provider/index.js +1 -0
  37. package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
  38. package/lib/xt-config-provider/xt-config-provider.css +1 -0
  39. package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
  40. package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
  41. package/lib/xt-date-picker/demo.html +10 -0
  42. package/lib/xt-date-picker/index.js +1 -0
  43. package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
  44. package/lib/xt-date-picker/xt-date-picker.css +1 -0
  45. package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
  46. package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
  47. package/lib/xt-flex-box/demo.html +10 -0
  48. package/lib/xt-flex-box/index.js +1 -0
  49. package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
  50. package/lib/xt-flex-box/xt-flex-box.css +1 -0
  51. package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
  52. package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
  53. package/lib/xt-form-schema/demo.html +10 -0
  54. package/lib/xt-form-schema/index.js +1 -0
  55. package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
  56. package/lib/xt-form-schema/xt-form-schema.css +1 -0
  57. package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
  58. package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
  59. package/lib/xt-grid-box/demo.html +10 -0
  60. package/lib/xt-grid-box/index.js +1 -0
  61. package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
  62. package/lib/xt-grid-box/xt-grid-box.css +1 -0
  63. package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
  64. package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
  65. package/lib/xt-grid-item/demo.html +10 -0
  66. package/lib/xt-grid-item/index.js +1 -0
  67. package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
  68. package/lib/xt-grid-item/xt-grid-item.css +1 -0
  69. package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
  70. package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
  71. package/lib/xt-icon/demo.html +10 -0
  72. package/lib/xt-icon/index.js +1 -0
  73. package/lib/xt-icon/xt-icon.common.js +430 -0
  74. package/lib/xt-icon/xt-icon.css +1 -0
  75. package/lib/xt-icon/xt-icon.umd.js +440 -0
  76. package/lib/xt-icon/xt-icon.umd.min.js +1 -0
  77. package/lib/xt-input/demo.html +10 -0
  78. package/lib/xt-input/index.js +1 -0
  79. package/lib/xt-input/xt-input.common.js +584 -0
  80. package/lib/xt-input/xt-input.css +1 -0
  81. package/lib/xt-input/xt-input.umd.js +594 -0
  82. package/lib/xt-input/xt-input.umd.min.js +1 -0
  83. package/lib/xt-list/demo.html +10 -0
  84. package/lib/xt-list/index.js +1 -0
  85. package/lib/xt-list/xt-list.common.js +714 -0
  86. package/lib/xt-list/xt-list.css +1 -0
  87. package/lib/xt-list/xt-list.umd.js +724 -0
  88. package/lib/xt-list/xt-list.umd.min.js +1 -0
  89. package/lib/xt-map/demo.html +10 -0
  90. package/lib/xt-map/index.js +1 -0
  91. package/lib/xt-map/xt-map.common.js +1951 -0
  92. package/lib/xt-map/xt-map.css +1 -0
  93. package/lib/xt-map/xt-map.umd.js +1961 -0
  94. package/lib/xt-map/xt-map.umd.min.js +1 -0
  95. package/lib/xt-map-provider/demo.html +10 -0
  96. package/lib/xt-map-provider/index.js +1 -0
  97. package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
  98. package/lib/xt-map-provider/xt-map-provider.css +1 -0
  99. package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
  100. package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
  101. package/lib/xt-page/demo.html +10 -0
  102. package/lib/xt-page/index.js +1 -0
  103. package/lib/xt-page/xt-page.common.js +353 -0
  104. package/lib/xt-page/xt-page.css +1 -0
  105. package/lib/xt-page/xt-page.umd.js +363 -0
  106. package/lib/xt-page/xt-page.umd.min.js +1 -0
  107. package/lib/xt-progress/demo.html +10 -0
  108. package/lib/xt-progress/index.js +1 -0
  109. package/lib/xt-progress/xt-progress.common.js +327 -0
  110. package/lib/xt-progress/xt-progress.css +1 -0
  111. package/lib/xt-progress/xt-progress.umd.js +337 -0
  112. package/lib/xt-progress/xt-progress.umd.min.js +1 -0
  113. package/lib/xt-scroll-arrow/demo.html +10 -0
  114. package/lib/xt-scroll-arrow/index.js +1 -0
  115. package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
  116. package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
  117. package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
  118. package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
  119. package/lib/xt-select-tree/demo.html +10 -0
  120. package/lib/xt-select-tree/index.js +1 -0
  121. package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
  122. package/lib/xt-select-tree/xt-select-tree.css +1 -0
  123. package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
  124. package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
  125. package/lib/xt-step-price/demo.html +10 -0
  126. package/lib/xt-step-price/index.js +1 -0
  127. package/lib/xt-step-price/xt-step-price.common.js +800 -0
  128. package/lib/xt-step-price/xt-step-price.css +1 -0
  129. package/lib/xt-step-price/xt-step-price.umd.js +810 -0
  130. package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
  131. package/lib/xt-step-price-item/demo.html +10 -0
  132. package/lib/xt-step-price-item/index.js +1 -0
  133. package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
  134. package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
  135. package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
  136. package/lib/xt-tab-pane/demo.html +10 -0
  137. package/lib/xt-tab-pane/index.js +1 -0
  138. package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
  139. package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
  140. package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
  141. package/lib/xt-table/demo.html +10 -0
  142. package/lib/xt-table/index.js +1 -0
  143. package/lib/xt-table/xt-table.common.js +1027 -0
  144. package/lib/xt-table/xt-table.css +1 -0
  145. package/lib/xt-table/xt-table.umd.js +1037 -0
  146. package/lib/xt-table/xt-table.umd.min.js +1 -0
  147. package/lib/xt-tabs/demo.html +10 -0
  148. package/lib/xt-tabs/index.js +1 -0
  149. package/lib/xt-tabs/xt-tabs.common.js +463 -0
  150. package/lib/xt-tabs/xt-tabs.css +1 -0
  151. package/lib/xt-tabs/xt-tabs.umd.js +473 -0
  152. package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
  153. package/lib/xt-text/demo.html +10 -0
  154. package/lib/xt-text/index.js +1 -0
  155. package/lib/xt-text/xt-text.common.js +536 -0
  156. package/lib/xt-text/xt-text.css +1 -0
  157. package/lib/xt-text/xt-text.umd.js +546 -0
  158. package/lib/xt-text/xt-text.umd.min.js +1 -0
  159. package/lib/xt-time/demo.html +10 -0
  160. package/lib/xt-time/index.js +1 -0
  161. package/lib/xt-time/xt-time.common.js +555 -0
  162. package/lib/xt-time/xt-time.css +1 -0
  163. package/lib/xt-time/xt-time.umd.js +565 -0
  164. package/lib/xt-time/xt-time.umd.min.js +1 -0
  165. package/lib/xt-transfer-tree/demo.html +10 -0
  166. package/lib/xt-transfer-tree/index.js +1 -0
  167. package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
  168. package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
  169. package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
  170. package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
  171. package/lib/xt-upload/demo.html +10 -0
  172. package/lib/xt-upload/index.js +1 -0
  173. package/lib/xt-upload/xt-upload.common.js +1292 -0
  174. package/lib/xt-upload/xt-upload.css +1 -0
  175. package/lib/xt-upload/xt-upload.umd.js +1302 -0
  176. package/lib/xt-upload/xt-upload.umd.min.js +1 -0
  177. package/package.json +4 -2
  178. package/src/components/xt-badge/index.js +8 -7
  179. package/src/components/xt-button/index.js +1 -0
  180. package/src/components/xt-card/index.js +1 -0
  181. package/src/components/xt-card-item/index.js +1 -0
  182. package/src/components/xt-config-provider/index.js +1 -0
  183. package/src/components/xt-flex-box/index.js +1 -0
  184. package/src/components/xt-grid-box/index.js +1 -0
  185. package/src/components/xt-icon/index.js +1 -0
  186. package/src/components/xt-input/index.js +1 -0
  187. package/src/components/xt-map/index.js +1 -0
  188. package/src/components/xt-progress/index.js +8 -7
  189. package/src/components/xt-scroll-arrow/index.js +8 -7
  190. package/src/components/xt-step-price/index.js +1 -0
  191. package/src/components/xt-tabs/index.js +9 -8
  192. package/src/components/xt-text/index.js +1 -0
  193. package/src/components/xt-time/index.js +1 -0
  194. package/src/index.js +32 -2
@@ -0,0 +1,505 @@
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-scroll-arrow"] = factory();
8
+ else
9
+ root["xt-scroll-arrow"] = 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
+ /***/ "4e56":
100
+ /***/ (function(module, exports, __webpack_require__) {
101
+
102
+ // extracted by mini-css-extract-plugin
103
+
104
+ /***/ }),
105
+
106
+ /***/ "fb15":
107
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
108
+
109
+ "use strict";
110
+ // ESM COMPAT FLAG
111
+ __webpack_require__.r(__webpack_exports__);
112
+
113
+ // EXPORTS
114
+ __webpack_require__.d(__webpack_exports__, "XtScrollArrow", function() { return /* reexport */ xt_scroll_arrow; });
115
+
116
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
117
+ // This file is imported into lib/wc client bundles.
118
+
119
+ if (typeof window !== 'undefined') {
120
+ var currentScript = window.document.currentScript
121
+ if (false) { var getCurrentScript; }
122
+
123
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
124
+ if (src) {
125
+ __webpack_require__.p = src[1] // eslint-disable-line
126
+ }
127
+ }
128
+
129
+ // Indicate to webpack that this file can be concatenated
130
+ /* harmony default export */ var setPublicPath = (null);
131
+
132
+ // EXTERNAL MODULE: ./src/components/xt-scroll-arrow/style/index.scss
133
+ var style = __webpack_require__("4e56");
134
+
135
+ // 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-scroll-arrow/index.vue?vue&type=template&id=3d6a271c
136
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-scroll-arrow",class:[`xt-scroll-arrow--${_vm.direction}`],style:(_vm.containerStyle)},[(_vm.showLeftArrow)?_c('div',{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--left",on:{"click":_vm.scrollLeft}},[_c('i',{staticClass:"el-icon-arrow-left"})]):_vm._e(),_c('div',{ref:"scrollContainer",staticClass:"xt-scroll-arrow__content",on:{"scroll":_vm.handleScroll,"click":_vm.handleClick}},[_vm._t("default")],2),(_vm.showRightArrow)?_c('div',{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--right",on:{"click":_vm.scrollRight}},[_c('i',{staticClass:"el-icon-arrow-right"})]):_vm._e(),(_vm.showTopArrow && _vm.direction === 'vertical')?_c('div',{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--top",on:{"click":_vm.scrollTop}},[_c('i',{staticClass:"el-icon-arrow-up"})]):_vm._e(),(_vm.showBottomArrow && _vm.direction === 'vertical')?_c('div',{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--bottom",on:{"click":_vm.scrollBottom}},[_c('i',{staticClass:"el-icon-arrow-down"})]):_vm._e()])
137
+ }
138
+ var staticRenderFns = []
139
+
140
+
141
+ // CONCATENATED MODULE: ./src/components/xt-scroll-arrow/index.vue?vue&type=template&id=3d6a271c
142
+
143
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-scroll-arrow/index.vue?vue&type=script&lang=js
144
+
145
+ /* harmony default export */ var xt_scroll_arrowvue_type_script_lang_js = ({
146
+ name: 'XtScrollArrow',
147
+ props: {
148
+ direction: {
149
+ type: String,
150
+ default: 'horizontal',
151
+ validator: (val) => ['horizontal', 'vertical'].includes(val)
152
+ },
153
+ scrollStep: {
154
+ type: Number,
155
+ default: 100
156
+ },
157
+ autoHide: {
158
+ type: Boolean,
159
+ default: true
160
+ },
161
+ height: {
162
+ type: [String, Number],
163
+ default: ''
164
+ },
165
+ width: {
166
+ type: [String, Number],
167
+ default: ''
168
+ },
169
+ appendMode: {
170
+ type: Boolean,
171
+ default: false
172
+ },
173
+ clickMode: {
174
+ type: Boolean,
175
+ default: false
176
+ }
177
+ },
178
+ data() {
179
+ return {
180
+ showLeftArrow: false,
181
+ showRightArrow: false,
182
+ showTopArrow: false,
183
+ showBottomArrow: false
184
+ }
185
+ },
186
+ computed: {
187
+ containerStyle() {
188
+ const style = {}
189
+ if (this.height) {
190
+ style.height = typeof this.height === 'number' ? `${this.height}px` : this.height
191
+ }
192
+ if (this.width) {
193
+ style.width = typeof this.width === 'number' ? `${this.width}px` : this.width
194
+ }
195
+ return style
196
+ }
197
+ },
198
+ watch: {
199
+ direction() {
200
+ this.$nextTick(() => {
201
+ this.checkScroll()
202
+ })
203
+ }
204
+ },
205
+ mounted() {
206
+ this.$nextTick(() => {
207
+ this.checkScroll()
208
+ })
209
+ this.addResizeObserver()
210
+ this.addMutationObserver()
211
+ },
212
+ beforeDestroy() {
213
+ this.removeResizeObserver()
214
+ this.removeMutationObserver()
215
+ },
216
+ methods: {
217
+ addResizeObserver() {
218
+ if (typeof ResizeObserver !== 'undefined') {
219
+ this.resizeObserver = new ResizeObserver(() => {
220
+ this.$nextTick(() => {
221
+ this.checkScroll()
222
+ })
223
+ })
224
+ const container = this.$refs.scrollContainer
225
+ if (container) {
226
+ this.resizeObserver.observe(container)
227
+ }
228
+ }
229
+ },
230
+ removeResizeObserver() {
231
+ if (this.resizeObserver) {
232
+ this.resizeObserver.disconnect()
233
+ }
234
+ },
235
+ addMutationObserver() {
236
+ if (typeof MutationObserver !== 'undefined') {
237
+ this.mutationObserver = new MutationObserver(() => {
238
+ this.$nextTick(() => {
239
+ this.checkScroll()
240
+ if (this.appendMode) {
241
+ this.scrollToEnd()
242
+ }
243
+ })
244
+ })
245
+ const container = this.$refs.scrollContainer
246
+ if (container) {
247
+ this.mutationObserver.observe(container, {
248
+ childList: true,
249
+ subtree: true
250
+ })
251
+ }
252
+ }
253
+ },
254
+ removeMutationObserver() {
255
+ if (this.mutationObserver) {
256
+ this.mutationObserver.disconnect()
257
+ }
258
+ },
259
+ checkScroll() {
260
+ const container = this.$refs.scrollContainer
261
+ if (!container) return
262
+
263
+ if (this.direction === 'horizontal') {
264
+ const scrollLeft = container.scrollLeft
265
+ const scrollWidth = container.scrollWidth
266
+ const clientWidth = container.clientWidth
267
+ const maxScroll = scrollWidth - clientWidth
268
+
269
+ this.showTopArrow = false
270
+ this.showBottomArrow = false
271
+
272
+ if (this.autoHide) {
273
+ this.showLeftArrow = scrollLeft > 0
274
+ this.showRightArrow = maxScroll > 0 && scrollLeft < maxScroll
275
+ } else {
276
+ this.showLeftArrow = maxScroll > 0
277
+ this.showRightArrow = maxScroll > 0
278
+ }
279
+ } else {
280
+ const scrollTop = container.scrollTop
281
+ const scrollHeight = container.scrollHeight
282
+ const clientHeight = container.clientHeight
283
+ const maxScroll = scrollHeight - clientHeight
284
+
285
+ this.showLeftArrow = false
286
+ this.showRightArrow = false
287
+
288
+ if (this.autoHide) {
289
+ this.showTopArrow = scrollTop > 0
290
+ this.showBottomArrow = maxScroll > 0 && scrollTop < maxScroll
291
+ } else {
292
+ this.showTopArrow = maxScroll > 0
293
+ this.showBottomArrow = maxScroll > 0
294
+ }
295
+ }
296
+ },
297
+ handleScroll() {
298
+ this.checkScroll()
299
+ this.$emit('scroll', this.$refs.scrollContainer)
300
+ },
301
+ handleClick(e) {
302
+ if (!this.clickMode) return
303
+ const container = this.$refs.scrollContainer
304
+ if (!container) return
305
+
306
+ const target = e.target
307
+ if (!target || target === container) return
308
+
309
+ const containerRect = container.getBoundingClientRect()
310
+ const targetRect = target.getBoundingClientRect()
311
+
312
+ const isVisible = (
313
+ targetRect.left >= containerRect.left &&
314
+ targetRect.right <= containerRect.right &&
315
+ targetRect.top >= containerRect.top &&
316
+ targetRect.bottom <= containerRect.bottom
317
+ )
318
+
319
+ if (!isVisible) {
320
+ if (this.direction === 'horizontal') {
321
+ const scrollLeft = target.offsetLeft - (container.clientWidth - targetRect.width) / 2
322
+ container.scrollTo({ left: scrollLeft, behavior: 'smooth' })
323
+ } else {
324
+ const scrollTop = target.offsetTop - (container.clientHeight - targetRect.height) / 2
325
+ container.scrollTo({ top: scrollTop, behavior: 'smooth' })
326
+ }
327
+ }
328
+ },
329
+ scrollLeft() {
330
+ const container = this.$refs.scrollContainer
331
+ if (container) {
332
+ container.scrollBy({ left: -this.scrollStep, behavior: 'smooth' })
333
+ }
334
+ },
335
+ scrollRight() {
336
+ const container = this.$refs.scrollContainer
337
+ if (container) {
338
+ container.scrollBy({ left: this.scrollStep, behavior: 'smooth' })
339
+ }
340
+ },
341
+ scrollTop() {
342
+ const container = this.$refs.scrollContainer
343
+ if (container) {
344
+ container.scrollBy({ top: -this.scrollStep, behavior: 'smooth' })
345
+ }
346
+ },
347
+ scrollBottom() {
348
+ const container = this.$refs.scrollContainer
349
+ if (container) {
350
+ container.scrollBy({ top: this.scrollStep, behavior: 'smooth' })
351
+ }
352
+ },
353
+ scrollToEnd() {
354
+ const container = this.$refs.scrollContainer
355
+ if (!container) return
356
+ if (this.direction === 'horizontal') {
357
+ container.scrollTo({ left: container.scrollWidth, behavior: 'smooth' })
358
+ } else {
359
+ container.scrollTo({ top: container.scrollHeight, behavior: 'smooth' })
360
+ }
361
+ }
362
+ }
363
+ });
364
+
365
+ // CONCATENATED MODULE: ./src/components/xt-scroll-arrow/index.vue?vue&type=script&lang=js
366
+ /* harmony default export */ var components_xt_scroll_arrowvue_type_script_lang_js = (xt_scroll_arrowvue_type_script_lang_js);
367
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
368
+ /* globals __VUE_SSR_CONTEXT__ */
369
+
370
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
371
+ // This module is a runtime utility for cleaner component module output and will
372
+ // be included in the final webpack user bundle.
373
+
374
+ function normalizeComponent(
375
+ scriptExports,
376
+ render,
377
+ staticRenderFns,
378
+ functionalTemplate,
379
+ injectStyles,
380
+ scopeId,
381
+ moduleIdentifier /* server only */,
382
+ shadowMode /* vue-cli only */
383
+ ) {
384
+ // Vue.extend constructor export interop
385
+ var options =
386
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
387
+
388
+ // render functions
389
+ if (render) {
390
+ options.render = render
391
+ options.staticRenderFns = staticRenderFns
392
+ options._compiled = true
393
+ }
394
+
395
+ // functional template
396
+ if (functionalTemplate) {
397
+ options.functional = true
398
+ }
399
+
400
+ // scopedId
401
+ if (scopeId) {
402
+ options._scopeId = 'data-v-' + scopeId
403
+ }
404
+
405
+ var hook
406
+ if (moduleIdentifier) {
407
+ // server build
408
+ hook = function (context) {
409
+ // 2.3 injection
410
+ context =
411
+ context || // cached call
412
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
413
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
414
+ // 2.2 with runInNewContext: true
415
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
416
+ context = __VUE_SSR_CONTEXT__
417
+ }
418
+ // inject component styles
419
+ if (injectStyles) {
420
+ injectStyles.call(this, context)
421
+ }
422
+ // register component module identifier for async chunk inferrence
423
+ if (context && context._registeredComponents) {
424
+ context._registeredComponents.add(moduleIdentifier)
425
+ }
426
+ }
427
+ // used by ssr in case component is cached and beforeCreate
428
+ // never gets called
429
+ options._ssrRegister = hook
430
+ } else if (injectStyles) {
431
+ hook = shadowMode
432
+ ? function () {
433
+ injectStyles.call(
434
+ this,
435
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
436
+ )
437
+ }
438
+ : injectStyles
439
+ }
440
+
441
+ if (hook) {
442
+ if (options.functional) {
443
+ // for template-only hot-reload because in that case the render fn doesn't
444
+ // go through the normalizer
445
+ options._injectStyles = hook
446
+ // register for functional component in vue file
447
+ var originalRender = options.render
448
+ options.render = function renderWithStyleInjection(h, context) {
449
+ hook.call(context)
450
+ return originalRender(h, context)
451
+ }
452
+ } else {
453
+ // inject component registration as beforeCreate hook
454
+ var existing = options.beforeCreate
455
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
456
+ }
457
+ }
458
+
459
+ return {
460
+ exports: scriptExports,
461
+ options: options
462
+ }
463
+ }
464
+
465
+ // CONCATENATED MODULE: ./src/components/xt-scroll-arrow/index.vue
466
+
467
+
468
+
469
+
470
+
471
+ /* normalize component */
472
+
473
+ var component = normalizeComponent(
474
+ components_xt_scroll_arrowvue_type_script_lang_js,
475
+ render,
476
+ staticRenderFns,
477
+ false,
478
+ null,
479
+ null,
480
+ null
481
+
482
+ )
483
+
484
+ /* harmony default export */ var xt_scroll_arrow = (component.exports);
485
+ // CONCATENATED MODULE: ./src/components/xt-scroll-arrow/index.js
486
+
487
+
488
+
489
+ xt_scroll_arrow.install = function (Vue) {
490
+ Vue.component(xt_scroll_arrow.name, xt_scroll_arrow)
491
+ }
492
+
493
+ /* harmony default export */ var components_xt_scroll_arrow = (xt_scroll_arrow);
494
+
495
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
496
+
497
+
498
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_scroll_arrow);
499
+
500
+
501
+
502
+ /***/ })
503
+
504
+ /******/ });
505
+ });
@@ -0,0 +1 @@
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xt-scroll-arrow"]=e():t["xt-scroll-arrow"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function o(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(r,i,function(e){return t[e]}.bind(null,i));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s="fb15")}({"4e56":function(t,e,o){},fb15:function(t,e,o){"use strict";if(o.r(e),o.d(e,"XtScrollArrow",(function(){return f})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(o.p=i[1])}o("4e56");var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"xt-scroll-arrow",class:["xt-scroll-arrow--"+t.direction],style:t.containerStyle},[t.showLeftArrow?e("div",{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--left",on:{click:t.scrollLeft}},[e("i",{staticClass:"el-icon-arrow-left"})]):t._e(),e("div",{ref:"scrollContainer",staticClass:"xt-scroll-arrow__content",on:{scroll:t.handleScroll,click:t.handleClick}},[t._t("default")],2),t.showRightArrow?e("div",{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--right",on:{click:t.scrollRight}},[e("i",{staticClass:"el-icon-arrow-right"})]):t._e(),t.showTopArrow&&"vertical"===t.direction?e("div",{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--top",on:{click:t.scrollTop}},[e("i",{staticClass:"el-icon-arrow-up"})]):t._e(),t.showBottomArrow&&"vertical"===t.direction?e("div",{staticClass:"xt-scroll-arrow__btn xt-scroll-arrow__btn--bottom",on:{click:t.scrollBottom}},[e("i",{staticClass:"el-icon-arrow-down"})]):t._e()])},n=[],l={name:"XtScrollArrow",props:{direction:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},scrollStep:{type:Number,default:100},autoHide:{type:Boolean,default:!0},height:{type:[String,Number],default:""},width:{type:[String,Number],default:""},appendMode:{type:Boolean,default:!1},clickMode:{type:Boolean,default:!1}},data(){return{showLeftArrow:!1,showRightArrow:!1,showTopArrow:!1,showBottomArrow:!1}},computed:{containerStyle(){const t={};return this.height&&(t.height="number"===typeof this.height?this.height+"px":this.height),this.width&&(t.width="number"===typeof this.width?this.width+"px":this.width),t}},watch:{direction(){this.$nextTick(()=>{this.checkScroll()})}},mounted(){this.$nextTick(()=>{this.checkScroll()}),this.addResizeObserver(),this.addMutationObserver()},beforeDestroy(){this.removeResizeObserver(),this.removeMutationObserver()},methods:{addResizeObserver(){if("undefined"!==typeof ResizeObserver){this.resizeObserver=new ResizeObserver(()=>{this.$nextTick(()=>{this.checkScroll()})});const t=this.$refs.scrollContainer;t&&this.resizeObserver.observe(t)}},removeResizeObserver(){this.resizeObserver&&this.resizeObserver.disconnect()},addMutationObserver(){if("undefined"!==typeof MutationObserver){this.mutationObserver=new MutationObserver(()=>{this.$nextTick(()=>{this.checkScroll(),this.appendMode&&this.scrollToEnd()})});const t=this.$refs.scrollContainer;t&&this.mutationObserver.observe(t,{childList:!0,subtree:!0})}},removeMutationObserver(){this.mutationObserver&&this.mutationObserver.disconnect()},checkScroll(){const t=this.$refs.scrollContainer;if(t)if("horizontal"===this.direction){const e=t.scrollLeft,o=t.scrollWidth,r=t.clientWidth,i=o-r;this.showTopArrow=!1,this.showBottomArrow=!1,this.autoHide?(this.showLeftArrow=e>0,this.showRightArrow=i>0&&e<i):(this.showLeftArrow=i>0,this.showRightArrow=i>0)}else{const e=t.scrollTop,o=t.scrollHeight,r=t.clientHeight,i=o-r;this.showLeftArrow=!1,this.showRightArrow=!1,this.autoHide?(this.showTopArrow=e>0,this.showBottomArrow=i>0&&e<i):(this.showTopArrow=i>0,this.showBottomArrow=i>0)}},handleScroll(){this.checkScroll(),this.$emit("scroll",this.$refs.scrollContainer)},handleClick(t){if(!this.clickMode)return;const e=this.$refs.scrollContainer;if(!e)return;const o=t.target;if(!o||o===e)return;const r=e.getBoundingClientRect(),i=o.getBoundingClientRect(),s=i.left>=r.left&&i.right<=r.right&&i.top>=r.top&&i.bottom<=r.bottom;if(!s)if("horizontal"===this.direction){const t=o.offsetLeft-(e.clientWidth-i.width)/2;e.scrollTo({left:t,behavior:"smooth"})}else{const t=o.offsetTop-(e.clientHeight-i.height)/2;e.scrollTo({top:t,behavior:"smooth"})}},scrollLeft(){const t=this.$refs.scrollContainer;t&&t.scrollBy({left:-this.scrollStep,behavior:"smooth"})},scrollRight(){const t=this.$refs.scrollContainer;t&&t.scrollBy({left:this.scrollStep,behavior:"smooth"})},scrollTop(){const t=this.$refs.scrollContainer;t&&t.scrollBy({top:-this.scrollStep,behavior:"smooth"})},scrollBottom(){const t=this.$refs.scrollContainer;t&&t.scrollBy({top:this.scrollStep,behavior:"smooth"})},scrollToEnd(){const t=this.$refs.scrollContainer;t&&("horizontal"===this.direction?t.scrollTo({left:t.scrollWidth,behavior:"smooth"}):t.scrollTo({top:t.scrollHeight,behavior:"smooth"}))}}},c=l;function h(t,e,o,r,i,s,n,l){var c,h="function"===typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=o,h._compiled=!0),r&&(h.functional=!0),s&&(h._scopeId="data-v-"+s),n?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},h._ssrRegister=c):i&&(c=l?function(){i.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(h.functional){h._injectStyles=c;var a=h.render;h.render=function(t,e){return c.call(e),a(t,e)}}else{var f=h.beforeCreate;h.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:h}}var a=h(c,s,n,!1,null,null,null),f=a.exports;f.install=function(t){t.component(f.name,f)};var d=f;e["default"]=d}})}));
@@ -0,0 +1,10 @@
1
+ <meta charset="utf-8">
2
+ <title>xt-select-tree demo</title>
3
+ <script src="./xt-select-tree.umd.js"></script>
4
+
5
+ <link rel="stylesheet" href="./xt-select-tree.css">
6
+
7
+
8
+ <script>
9
+ console.log(xt-select-tree)
10
+ </script>
@@ -0,0 +1 @@
1
+ module.exports = require('./xt-select-tree.common.js');