xt-element-ui 2.1.72 → 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 (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 @@
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-table"]=e():t["xt-table"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"0ba2":function(t,e,n){},"26be":function(t,e,n){"use strict";n("0ba2")},9940:function(t,e,n){"use strict";n("f3c2")},f3c2:function(t,e,n){},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"XtTable",(function(){return _})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var l,i,s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"xt-table-wrapper"},[t.title||t.$slots.toolbar?e("div",{staticClass:"xt-table-header"},[t.title?e("span",{staticClass:"xt-table-title"},[t._v(t._s(t.title))]):t._e(),e("div",{staticClass:"xt-table-toolbar"},[t._t("toolbar")],2)]):t._e(),e("div",{staticClass:"xt-table-body"},[e("VirtualElTable",t._g(t._b({ref:"table",staticClass:"xt-table",attrs:{data:t.processedTableData,height:t.computedHeight,"max-height":t.computedMaxHeight,"virtual-scroll":t.virtualScroll,"row-height":t.rowInitHeight,"buffer-size":t.bufferSize,"span-method":t.groupColumns.length?t.handleSpanMethod:void 0,"row-class-name":t.getRowClassName},on:{"selection-change":t.handleSelectionChange,"sort-change":t.handleSortChange}},"VirtualElTable",t.$attrs,!1),t.$listeners),[t.selection?e("el-table-column",{attrs:{type:"selection",width:"55",fixed:t.selectionFixed}}):t._e(),t.showIndex?e("el-table-column",{attrs:{type:"index",width:"60",label:"#",fixed:t.indexFixed,index:t.indexMethod}}):t._e(),t._l(t.flattenedColumns,(function(n){return[n.children&&n.children.length?e("el-table-column",t._b({key:n._key},"el-table-column",t.getColumnProps(n),!1),[t._l(n.children,(function(n){return[e("el-table-column",t._b({key:n._key,scopedSlots:t._u([n.render?{key:"default",fn:function(t){return[e("XtTableCell",{attrs:{row:t.row,index:t.$index,render:n.render,column:n}})]}}:n.slot?{key:"default",fn:function(e){return[t._t(n.slot,null,{row:e.row,index:e.$index,column:n})]}}:null],null,!0)},"el-table-column",t.getColumnProps(n),!1))]}))],2):e("el-table-column",t._b({key:n._key,scopedSlots:t._u([n.render?{key:"default",fn:function(t){return[e("XtTableCell",{attrs:{row:t.row,index:t.$index,render:n.render,column:n}})]}}:n.slot?{key:"default",fn:function(e){return[t._t(n.slot,null,{row:e.row,index:e.$index,column:n})]}}:null],null,!0)},"el-table-column",t.getColumnProps(n),!1))]}))],2)],1),t.showPagination?e("div",{staticClass:"xt-table-footer"},[e("el-pagination",{attrs:{"current-page":t.pagination.pageNum,"page-size":t.pagination.pageSize,total:t.total,"page-sizes":t.pagination.pageSizes||[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()])},a=[],u={name:"XtTableCell",functional:!0,props:{row:Object,index:Number,render:Function,column:{type:Object,default:null}},render:(t,e)=>{const n={row:e.props.row,index:e.props.index};e.props.column&&(n.column=e.props.column);const r=t=>null!==t&&void 0!==t&&"object"===typeof t&&t.hasOwnProperty("componentOptions"),o=e.props.render(t,n);return null===o||void 0===o||""===o?t("span",""):r(o)?o:t("span",String(o))}},h=u;function c(t,e,n,r,o,l,i,s){var a,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(a=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=a):o&&(a=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(u.functional){u._injectStyles=a;var h=u.render;u.render=function(t,e){return a.call(e),h(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,a):[a]}return{exports:t,options:u}}var d=c(h,l,i,!1,null,null,null),p=d.exports,f=function(){var t=this,e=t._self._c;return e("el-table",t._g(t._b({ref:"innerTable",attrs:{data:t.renderList}},"el-table",t.$attrs,!1),t.$listeners),[t._t("default")],2)},b=[],m={name:"VirtualElTable",inheritAttrs:!1,props:{virtualScroll:{type:Boolean,default:!1},rowHeight:{type:Number,default:48},bufferSize:{type:Number,default:5}},data(){return{scrollWrap:null,phantomDom:null,scrollTop:0,startIndex:0,endIndex:20,rafId:null,unwatchPhantom:null,layoutTimer:null,retryTimers:[]}},computed:{originData(){return this.$attrs.data||[]},renderList(){if(!this.virtualScroll)return this.originData;const t=Math.max(0,this.startIndex-this.bufferSize),e=Math.min(this.originData.length,this.endIndex+this.bufferSize);return this.originData.slice(t,e)},totalListHeight(){return this.originData.length*this.rowHeight},contentOffsetY(){return Math.max(0,this.startIndex-this.bufferSize)*this.rowHeight}},watch:{renderList(){this.scheduleLayout()},originData:{handler(t){this.virtualScroll&&t&&t.length&&this.$nextTick(()=>{this.calcVisibleRange()})}}},mounted(){this.$nextTick(()=>{this.initVirtualScroll()})},beforeDestroy(){this.unbindScrollEvent(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.unwatchPhantom&&(this.unwatchPhantom(),this.unwatchPhantom=null),this.layoutTimer&&(clearTimeout(this.layoutTimer),this.layoutTimer=null),this.retryTimers.forEach(t=>clearTimeout(t)),this.retryTimers=[]},methods:{initVirtualScroll(){if(!this.virtualScroll)return;if(this.scrollWrap=this.$refs.innerTable.$el.querySelector(".el-table__body-wrapper"),!this.scrollWrap)return console.warn("[VirtualElTable] 无法找到滚动容器,虚拟滚动功能已禁用"),void(this.virtualScroll=!1);this.scrollWrap.style.overflowY="auto",this.scrollWrap.style.overflowX="auto",this.wrapTableBody(),this.scrollWrap.addEventListener("scroll",this.onScroll,{passive:!0}),this.calcVisibleRange();const t=[100,300,600,1e3];t.forEach(t=>{const e=setTimeout(()=>{this.calcVisibleRange()},t);this.retryTimers.push(e)})},wrapTableBody(){const t=this.scrollWrap.querySelector(".el-table__body");if(!t||t.querySelector(".vs-phantom"))return;const e=document.createElement("div");e.className="vs-phantom",e.style.position="relative",e.style.minWidth="100%",e.style.boxSizing="border-box",e.style.zIndex="1",this.phantomDom=e;const n=t.querySelector("table");e.appendChild(n),t.appendChild(e),this.unwatchPhantom=this.$watch(["totalListHeight","contentOffsetY"],()=>{this.phantomDom&&(this.phantomDom.style.height=this.totalListHeight+"px",this.phantomDom.style.paddingTop=this.contentOffsetY+"px")},{immediate:!0})},onScroll(){this.scrollTop=this.scrollWrap.scrollTop,this.rafId||(this.rafId=requestAnimationFrame(()=>{this.calcVisibleRange(),this.rafId=null}))},calcVisibleRange(){if(!this.scrollWrap)return;let t=this.scrollWrap.clientHeight;if(!t){const e=this.$attrs.height||this.$attrs.maxHeight;e&&(t="number"===typeof e?e:parseInt(String(e),10))}if(!t||t<=0)return;const e=Math.ceil(t/this.rowHeight),n=Math.floor(this.scrollTop/this.rowHeight),r=Math.min(this.originData.length,n+e);n===this.startIndex&&r===this.endIndex||(this.startIndex=n,this.endIndex=r)},unbindScrollEvent(){this.scrollWrap&&this.scrollWrap.removeEventListener("scroll",this.onScroll)},scheduleLayout(){this.layoutTimer||(this.layoutTimer=setTimeout(()=>{this.$refs.innerTable&&this.$refs.innerTable.doLayout(),this.layoutTimer=null},0))},clearSelection(){return this.$refs.innerTable.clearSelection()},toggleRowSelection(){return this.$refs.innerTable.toggleRowSelection()},doLayout(){return this.$refs.innerTable.doLayout()}}},g=m,y=(n("26be"),c(g,f,b,!1,null,"01f7dcee",null)),C=y.exports,w={name:"XtTable",inheritAttrs:!1,components:{XtTableCell:p,VirtualElTable:C},props:{tableData:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},groupColumns:{type:Array,default:()=>[]},sortGroup:{type:Boolean,default:!1},defaultSort:{type:Object,default:null},filterMethod:{type:Function,default:null},title:{type:String,default:""},height:{type:[Number,String],default:null},maxHeight:{type:[Number,String],default:null},virtualScroll:{type:Boolean,default:!1},rowInitHeight:{type:Number,default:48},bufferSize:{type:Number,default:5},pagination:{type:Object,default:null},total:{type:Number,default:0},showIndex:{type:Boolean,default:!1},selection:{type:Boolean,default:!1},selectionFixed:{type:[String,Boolean],default:!1},indexFixed:{type:[String,Boolean],default:!1},loading:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无数据"},subtotalConfig:{type:Object,default:()=>({enabled:!1})},totalConfig:{type:Object,default:()=>({enabled:!1})}},data(){return{spanCache:{},flattenedColumnsCache:[],selectedRows:[],sortProp:null,sortOrder:null}},computed:{showPagination(){return this.pagination&&this.total>0},computedHeight(){return this.height||void 0},computedMaxHeight(){return this.height?void 0:this.maxHeight||void 0},sortedTableData(){if(!this.tableData.length)return[];let t=[...this.tableData];if("function"===typeof this.filterMethod&&(t=t.filter(this.filterMethod)),!this.sortProp||!this.sortOrder)return t;const e="ascending"===this.sortOrder?1:-1,n=this.resolveSortMethod(this.sortProp);return this.sortGroup&&this.groupColumns.length?this.groupSort(t,n,e):t.sort((t,r)=>n(t,r)*e)},processedTableData(){if(!this.sortedTableData.length)return[];let t=[...this.sortedTableData];const e=this.subtotalConfig&&this.subtotalConfig.enabled,n=this.totalConfig&&this.totalConfig.enabled;if(!e&&!n)return t;this.findLabelColumn();let r=[];if(e&&this.subtotalConfig.groupBy&&this.subtotalConfig.groupBy.length){const e=this.groupData(t,this.subtotalConfig.groupBy);e.forEach(t=>{r.push(...t);const e=this.createSubtotalRow(t);r.push(e)})}else r=t;if(n){const e=this.createTotalRow(t);r.push(e)}return r},flattenedColumns(){if(this.flattenedColumnsCache.length)return this.flattenedColumnsCache;const t=(e,n="")=>e.map((e,r)=>{const o=n?`${n}_${r}`:String(r),l=e.prop||e.slot||e.label||o,i={...e,_key:l};return e.children&&e.children.length&&(i.children=t(e.children,o)),i});return this.flattenedColumnsCache=t(this.columns),this.flattenedColumnsCache}},watch:{tableData(){this.spanCache={},this.flattenedColumnsCache=[]},columns:{handler(){this.flattenedColumnsCache=[],this.spanCache={}},deep:!0},groupColumns:{handler(){this.spanCache={}},deep:!0},defaultSort:{handler(t){t&&t.prop&&(this.sortProp=t.prop,this.sortOrder=t.order||"ascending")},immediate:!1},sortProp(){this.spanCache={}}},created(){this.defaultSort&&this.defaultSort.prop&&(this.sortProp=this.defaultSort.prop,this.sortOrder=this.defaultSort.order||"ascending")},mounted(){this.$nextTick(()=>{window.addEventListener("resize",this.handleResize)})},beforeDestroy(){window.removeEventListener("resize",this.handleResize)},methods:{resolveSortMethod(t){const e=this.findColumnByProp(t);return e&&"function"===typeof e.sortMethod?e.sortMethod:(e,n)=>{const r=e[t],o=n[t];return null==r&&null==o?0:null==r?-1:null==o?1:"number"===typeof r&&"number"===typeof o?r-o:String(r).localeCompare(String(o),void 0,{numeric:!0})}},findColumnByProp(t){for(const e of this.columns)if(e.children&&e.children.length){for(const n of e.children)if(n.prop===t)return n}else if(e.prop===t)return e;return null},groupSort(t,e,n){const r={};t.forEach(t=>{const e=this.groupColumns.map(e=>null==t[e]?"":String(t[e])).join("|||");r[e]||(r[e]=[]),r[e].push(t)});const o=[];return Object.keys(r).sort().forEach(t=>{const l=r[t];l.sort((t,r)=>e(t,r)*n),o.push(...l)}),o},handleResize(){this.$nextTick(()=>{this.$refs.table&&this.$refs.table.doLayout()})},findLabelColumn(){for(const t of this.columns)if(t.children&&t.children.length){for(const e of t.children)if(e.prop)return{prop:e.prop,label:e.label}}else if(t.prop)return{prop:t.prop,label:t.label};return{prop:"",label:""}},groupData(t,e){const n=new Map;return t.forEach(t=>{const r=e.map(e=>t[e]).join("|||");n.has(r)||n.set(r,[]),n.get(r).push(t)}),n},_calcValue(t,e){if("function"===typeof e)return e(t);const n=e.prop,r=e.type||"sum",o=n?t.map(t=>parseFloat(t[n])||0):[];switch(r){case"sum":return o.reduce((t,e)=>t+e,0);case"avg":case"average":return o.length?o.reduce((t,e)=>t+e,0)/o.length:0;case"count":return t.length;case"min":return o.length?Math.min(...o):0;case"max":return o.length?Math.max(...o):0;default:return""}},createSubtotalRow(t){const e=this.subtotalConfig,n=this.findLabelColumn(),r=e.groupBy?e.groupBy[0]:"",o=t[0]?t[0][r]:"",l=e.labelText||o+" 小计",i={_rowType:"subtotal"};return i[n.prop]=l,e.columns&&Object.keys(e.columns).forEach(n=>{const r=e.columns[n];i[n]="string"===typeof r?this._calcValue(t,{prop:n,type:r}):this._calcValue(t,r)}),i},createTotalRow(t){const e=this.totalConfig,n=this.findLabelColumn(),r=e.labelText||"总计",o={_rowType:"total"};return o[n.prop]=r,e.columns&&Object.keys(e.columns).forEach(n=>{const r=e.columns[n];o[n]="string"===typeof r?this._calcValue(t,{prop:n,type:r}):this._calcValue(t,r)}),o},getRowClassName({row:t}){return"subtotal"===t._rowType?"xt-table-row-subtotal":"total"===t._rowType?"xt-table-row-total":""},getColumnProps(t){const{_key:e,children:n,render:r,slot:o,sortMethod:l,...i}=t;return i},indexMethod(t){return t+1},handleSpanMethod({row:t,column:e,rowIndex:n}){if("subtotal"===t._rowType||"total"===t._rowType)return{rowspan:1,colspan:1};if(!this.groupColumns.length)return{rowspan:1,colspan:1};const r=this.processedTableData,o=e.property,l=this.groupColumns.indexOf(o);if(-1===l)return{rowspan:1,colspan:1};const i=`${n}_${o}`;if(this.spanCache[i])return this.spanCache[i];if(n>0){const e=r[n-1];let o=!0;for(let n=0;n<=l;n++){const r=this.groupColumns[n];if(e[r]!==t[r]){o=!1;break}}if(o){const t={rowspan:0,colspan:1};return this.spanCache[i]=t,t}}let s=1;for(let u=n+1;u<r.length;u++){const e=r[u];let n=!0;for(let r=0;r<=l;r++){const o=this.groupColumns[r];if(e[o]!==t[o]){n=!1;break}}if(!n)break;s++}const a={rowspan:s>1?s:1,colspan:1};return this.spanCache[i]=a,a},handleSelectionChange(t){this.selectedRows=t.filter(t=>!t._rowType),this.$emit("selection-change",this.selectedRows)},handleSortChange(t){this.sortProp=t.prop,this.sortOrder=t.order,this.$emit("sort-change",t)},handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("page-change",t)},getSelection(){return this.selectedRows},clearSelection(){this.$refs.table&&this.$refs.table.clearSelection(),this.selectedRows=[]},clearSort(){this.sortProp=null,this.sortOrder=null,this.$nextTick(()=>{this.$refs.table&&this.$refs.table.$refs.innerTable&&this.$refs.table.$refs.innerTable.clearSort()})},toggleRowSelection(t,e){this.$refs.table&&this.$refs.table.toggleRowSelection(t,e)},toggleRowsSelection(t,e){t&&t.length&&t.forEach(t=>{this.$refs.table&&this.$refs.table.toggleRowSelection(t,e)})},doLayout(){this.$refs.table&&this.$refs.table.doLayout()}}},x=w,S=(n("9940"),c(x,s,a,!1,null,"39458c28",null)),_=S.exports;_.install=function(t){t.component(_.name,_)};var T=_;e["default"]=T}})}));
@@ -0,0 +1,10 @@
1
+ <meta charset="utf-8">
2
+ <title>xt-tabs demo</title>
3
+ <script src="./xt-tabs.umd.js"></script>
4
+
5
+ <link rel="stylesheet" href="./xt-tabs.css">
6
+
7
+
8
+ <script>
9
+ console.log(xt-tabs)
10
+ </script>
@@ -0,0 +1 @@
1
+ module.exports = require('./xt-tabs.common.js');
@@ -0,0 +1,463 @@
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
+ /***/ "2f86":
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ // extracted by mini-css-extract-plugin
94
+
95
+ /***/ }),
96
+
97
+ /***/ "d273":
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_3859f3fa_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2f86");
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_3859f3fa_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_3859f3fa_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
103
+ /* unused harmony reexport * */
104
+
105
+
106
+ /***/ }),
107
+
108
+ /***/ "e8d2":
109
+ /***/ (function(module, exports, __webpack_require__) {
110
+
111
+ // extracted by mini-css-extract-plugin
112
+
113
+ /***/ }),
114
+
115
+ /***/ "fb15":
116
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
117
+
118
+ "use strict";
119
+ // ESM COMPAT FLAG
120
+ __webpack_require__.r(__webpack_exports__);
121
+
122
+ // EXPORTS
123
+ __webpack_require__.d(__webpack_exports__, "XtTabs", function() { return /* reexport */ xt_tabs; });
124
+
125
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
126
+ // This file is imported into lib/wc client bundles.
127
+
128
+ if (typeof window !== 'undefined') {
129
+ var currentScript = window.document.currentScript
130
+ if (false) { var getCurrentScript; }
131
+
132
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
133
+ if (src) {
134
+ __webpack_require__.p = src[1] // eslint-disable-line
135
+ }
136
+ }
137
+
138
+ // Indicate to webpack that this file can be concatenated
139
+ /* harmony default export */ var setPublicPath = (null);
140
+
141
+ // EXTERNAL MODULE: ./src/components/xt-tabs/style/index.scss
142
+ var style = __webpack_require__("e8d2");
143
+
144
+ // 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-tabs/index.vue?vue&type=template&id=3859f3fa&scoped=true
145
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"tabsWrap",staticClass:"xt-tabs",class:[
146
+ `xt-tabs--${_vm.actualPosition}`,
147
+ { 'xt-tabs--card': _vm.type === 'card' },
148
+ { 'xt-tabs--border-card': _vm.type === 'border-card' },
149
+ { 'xt-tabs--editable': _vm.editable }
150
+ ]},[_c('div',{ref:"tabsHeader",staticClass:"xt-tabs__header"},[_c('div',{ref:"tabsNav",staticClass:"xt-tabs__nav"},[_vm._l((_vm.panes),function(pane,index){return _c('div',{key:pane.name,staticClass:"xt-tabs__nav-item",class:{
151
+ 'xt-tabs__nav-item--active': _vm.activeName === pane.name,
152
+ 'xt-tabs__nav-item--disabled': pane.disabled
153
+ },on:{"click":function($event){return _vm.handleTabClick(pane)}}},[_c('span',{staticClass:"xt-tabs__nav-link"},[_vm._v(_vm._s(pane.label))]),((_vm.closable || pane.closable) && !_vm.editable)?_c('span',{staticClass:"xt-tabs__close",on:{"click":function($event){$event.stopPropagation();return _vm.handleTabRemove(pane.name)}}},[_vm._v("×")]):_vm._e()])}),(_vm.addable || _vm.editable)?_c('div',{staticClass:"xt-tabs__nav-item xt-tabs__nav-item--add",on:{"click":_vm.handleTabAdd}},[_c('span',[_vm._v("+")])]):_vm._e()],2),_c('div',{staticClass:"xt-tabs__nav-indicator",style:(_vm.indicatorStyle)})]),_c('div',{staticClass:"xt-tabs__content"},[_vm._t("default")],2)])
154
+ }
155
+ var staticRenderFns = []
156
+
157
+
158
+ // CONCATENATED MODULE: ./src/components/xt-tabs/index.vue?vue&type=template&id=3859f3fa&scoped=true
159
+
160
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-tabs/index.vue?vue&type=script&lang=js
161
+
162
+ /* harmony default export */ var xt_tabsvue_type_script_lang_js = ({
163
+ name: 'XtTabs',
164
+ props: {
165
+ value: {
166
+ type: [String, Number],
167
+ default: ''
168
+ },
169
+ type: {
170
+ type: String,
171
+ default: 'card',
172
+ validator: (val) => ['default', 'card', 'border-card'].includes(val)
173
+ },
174
+ position: {
175
+ type: String,
176
+ default: 'top',
177
+ validator: (val) => ['top', 'bottom', 'left', 'right'].includes(val)
178
+ },
179
+ tabPosition: {
180
+ type: String,
181
+ default: ''
182
+ },
183
+ closable: {
184
+ type: Boolean,
185
+ default: false
186
+ },
187
+ addable: {
188
+ type: Boolean,
189
+ default: false
190
+ },
191
+ editable: {
192
+ type: Boolean,
193
+ default: false
194
+ }
195
+ },
196
+ data() {
197
+ return {
198
+ panes: [],
199
+ activeName: this.value
200
+ }
201
+ },
202
+ computed: {
203
+ actualPosition() {
204
+ return this.tabPosition || this.position
205
+ },
206
+ indicatorStyle() {
207
+ const activeIndex = this.panes.findIndex(p => p.name === this.activeName)
208
+ if (activeIndex === -1 || !this.$refs.tabsNav) return { display: 'none' }
209
+
210
+ const navItems = this.$refs.tabsNav.querySelectorAll('.xt-tabs__nav-item:not(.xt-tabs__nav-item--add)')
211
+ if (!navItems || navItems.length === 0) return { display: 'none' }
212
+
213
+ const activeItem = navItems[activeIndex]
214
+ if (!activeItem) return { display: 'none' }
215
+
216
+ const pos = this.actualPosition
217
+ const base = { transition: 'all 0.3s ease' }
218
+ if (pos === 'top' || pos === 'bottom') {
219
+ return {
220
+ ...base,
221
+ left: `${activeItem.offsetLeft}px`,
222
+ width: `${activeItem.offsetWidth}px`,
223
+ height: '2px',
224
+ bottom: pos === 'top' ? 0 : 'auto',
225
+ top: pos === 'bottom' ? 0 : 'auto',
226
+ display: 'block'
227
+ }
228
+ } else {
229
+ return {
230
+ ...base,
231
+ top: `${activeItem.offsetTop}px`,
232
+ height: `${activeItem.offsetHeight}px`,
233
+ width: '2px',
234
+ left: pos === 'left' ? 'auto' : 0,
235
+ right: pos === 'right' ? 0 : 'auto',
236
+ display: 'block'
237
+ }
238
+ }
239
+ }
240
+ },
241
+ watch: {
242
+ value(val) {
243
+ this.activeName = val
244
+ },
245
+ activeName(val) {
246
+ this.$emit('input', val)
247
+ this.$emit('change', val)
248
+ this.$nextTick(() => this.$forceUpdate())
249
+ },
250
+ panes: {
251
+ handler() {
252
+ this.$nextTick(() => this.$forceUpdate())
253
+ },
254
+ deep: true
255
+ }
256
+ },
257
+ methods: {
258
+ handleTabClick(pane) {
259
+ if (pane.disabled) return
260
+ this.activeName = pane.name
261
+ this.$emit('tab-click', pane)
262
+ },
263
+ handleTabRemove(name) {
264
+ this.$emit('tab-remove', name)
265
+ this.$emit('edit', name, 'remove')
266
+ const index = this.panes.findIndex(p => p.name === name)
267
+ if (index > -1) {
268
+ this.panes.splice(index, 1)
269
+ if (this.activeName === name && this.panes.length > 0) {
270
+ this.activeName = this.panes[0].name
271
+ }
272
+ }
273
+ },
274
+ handleTabAdd() {
275
+ this.$emit('tab-add')
276
+ this.$emit('edit', null, 'add')
277
+ },
278
+ addPane(pane) {
279
+ const exist = this.panes.some(p => p.name === pane.name)
280
+ if (!exist) {
281
+ this.panes.push(pane)
282
+ if (!this.activeName && this.panes.length === 1) {
283
+ this.activeName = pane.name
284
+ }
285
+ this.$nextTick(() => this.$forceUpdate())
286
+ }
287
+ },
288
+ removePane(name) {
289
+ const idx = this.panes.findIndex(p => p.name === name)
290
+ if (idx > -1) {
291
+ this.panes.splice(idx, 1)
292
+ this.$nextTick(() => this.$forceUpdate())
293
+ }
294
+ },
295
+ collectPanes() {
296
+ this.panes = []
297
+ this.$children.forEach(child => {
298
+ if (child.$options.name === 'XtTabPane') {
299
+ this.addPane({
300
+ name: child.name,
301
+ label: child.label,
302
+ disabled: child.disabled,
303
+ closable: child.closable
304
+ })
305
+ }
306
+ })
307
+ }
308
+ },
309
+ mounted() {
310
+ this.$nextTick(() => {
311
+ this.collectPanes()
312
+ this.$watch(() => this.$children, () => {
313
+ this.collectPanes()
314
+ }, { flush: 'post' })
315
+ })
316
+ }
317
+ });
318
+
319
+ // CONCATENATED MODULE: ./src/components/xt-tabs/index.vue?vue&type=script&lang=js
320
+ /* harmony default export */ var components_xt_tabsvue_type_script_lang_js = (xt_tabsvue_type_script_lang_js);
321
+ // EXTERNAL MODULE: ./src/components/xt-tabs/index.vue?vue&type=style&index=0&id=3859f3fa&prod&lang=scss&scoped=true
322
+ var xt_tabsvue_type_style_index_0_id_3859f3fa_prod_lang_scss_scoped_true = __webpack_require__("d273");
323
+
324
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
325
+ /* globals __VUE_SSR_CONTEXT__ */
326
+
327
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
328
+ // This module is a runtime utility for cleaner component module output and will
329
+ // be included in the final webpack user bundle.
330
+
331
+ function normalizeComponent(
332
+ scriptExports,
333
+ render,
334
+ staticRenderFns,
335
+ functionalTemplate,
336
+ injectStyles,
337
+ scopeId,
338
+ moduleIdentifier /* server only */,
339
+ shadowMode /* vue-cli only */
340
+ ) {
341
+ // Vue.extend constructor export interop
342
+ var options =
343
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
344
+
345
+ // render functions
346
+ if (render) {
347
+ options.render = render
348
+ options.staticRenderFns = staticRenderFns
349
+ options._compiled = true
350
+ }
351
+
352
+ // functional template
353
+ if (functionalTemplate) {
354
+ options.functional = true
355
+ }
356
+
357
+ // scopedId
358
+ if (scopeId) {
359
+ options._scopeId = 'data-v-' + scopeId
360
+ }
361
+
362
+ var hook
363
+ if (moduleIdentifier) {
364
+ // server build
365
+ hook = function (context) {
366
+ // 2.3 injection
367
+ context =
368
+ context || // cached call
369
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
370
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
371
+ // 2.2 with runInNewContext: true
372
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
373
+ context = __VUE_SSR_CONTEXT__
374
+ }
375
+ // inject component styles
376
+ if (injectStyles) {
377
+ injectStyles.call(this, context)
378
+ }
379
+ // register component module identifier for async chunk inferrence
380
+ if (context && context._registeredComponents) {
381
+ context._registeredComponents.add(moduleIdentifier)
382
+ }
383
+ }
384
+ // used by ssr in case component is cached and beforeCreate
385
+ // never gets called
386
+ options._ssrRegister = hook
387
+ } else if (injectStyles) {
388
+ hook = shadowMode
389
+ ? function () {
390
+ injectStyles.call(
391
+ this,
392
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
393
+ )
394
+ }
395
+ : injectStyles
396
+ }
397
+
398
+ if (hook) {
399
+ if (options.functional) {
400
+ // for template-only hot-reload because in that case the render fn doesn't
401
+ // go through the normalizer
402
+ options._injectStyles = hook
403
+ // register for functional component in vue file
404
+ var originalRender = options.render
405
+ options.render = function renderWithStyleInjection(h, context) {
406
+ hook.call(context)
407
+ return originalRender(h, context)
408
+ }
409
+ } else {
410
+ // inject component registration as beforeCreate hook
411
+ var existing = options.beforeCreate
412
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
413
+ }
414
+ }
415
+
416
+ return {
417
+ exports: scriptExports,
418
+ options: options
419
+ }
420
+ }
421
+
422
+ // CONCATENATED MODULE: ./src/components/xt-tabs/index.vue
423
+
424
+
425
+
426
+
427
+
428
+
429
+ /* normalize component */
430
+
431
+ var component = normalizeComponent(
432
+ components_xt_tabsvue_type_script_lang_js,
433
+ render,
434
+ staticRenderFns,
435
+ false,
436
+ null,
437
+ "3859f3fa",
438
+ null
439
+
440
+ )
441
+
442
+ /* harmony default export */ var xt_tabs = (component.exports);
443
+ // CONCATENATED MODULE: ./src/components/xt-tabs/index.js
444
+
445
+
446
+
447
+ xt_tabs.install = function(Vue) {
448
+ Vue.component(xt_tabs.name, xt_tabs)
449
+ }
450
+
451
+ /* harmony default export */ var components_xt_tabs = (xt_tabs);
452
+
453
+
454
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
455
+
456
+
457
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_tabs);
458
+
459
+
460
+
461
+ /***/ })
462
+
463
+ /******/ });
@@ -0,0 +1 @@
1
+ .xt-tabs{display:flex;flex-direction:column}.xt-tabs--left,.xt-tabs--right{flex-direction:row}.xt-tabs__header{position:relative;border-bottom:1px solid #e4e7ed;padding-bottom:0}.xt-tabs--card .xt-tabs__header{border-bottom:none;background:#f5f7fa;padding:4px 4px 0;border-radius:4px 4px 0 0}.xt-tabs--left .xt-tabs__header{border-right:1px solid #e4e7ed;border-bottom:none;padding-right:0}.xt-tabs--right .xt-tabs__header{border-left:1px solid #e4e7ed;border-bottom:none;padding-left:0}.xt-tabs__nav{display:flex}.xt-tabs--left .xt-tabs__nav,.xt-tabs--right .xt-tabs__nav{flex-direction:column}.xt-tabs__nav-item{position:relative;padding:12px 20px;font-size:14px;color:#909399;cursor:pointer;transition:color .3s ease}.xt-tabs--card .xt-tabs__nav-item{margin-bottom:-1px;border-radius:4px 4px 0 0;background:transparent;border:1px solid transparent}.xt-tabs--card .xt-tabs__nav-item--active{background:#fff;border-color:#e4e7ed;border-bottom-color:#fff}.xt-tabs__nav-item:hover{color:#1890ff}.xt-tabs__nav-item--active{color:#1890ff;font-weight:500}.xt-tabs__nav-link{display:inline-block}.xt-tabs__nav-indicator{position:absolute;bottom:0;height:2px;background:#1890ff;transition:left .3s ease,width .3s ease}.xt-tabs--left .xt-tabs__nav-indicator{bottom:auto;left:auto;right:0;width:2px;height:auto;top:0}.xt-tabs--right .xt-tabs__nav-indicator{bottom:auto;right:auto;left:0;width:2px;height:auto;top:0}.xt-tabs--card .xt-tabs__nav-indicator{display:none}.xt-tabs__content{flex:1;padding:20px 0}.xt-tabs--card .xt-tabs__content{border:1px solid #e4e7ed;border-top:none;border-radius:0 0 4px 4px;padding:20px}.xt-tabs--left .xt-tabs__content,.xt-tabs--right .xt-tabs__content{padding:0 20px}.xt-tabs__pane{animation:xt-tabs-fade-in .3s ease}@keyframes xt-tabs-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.xt-tabs-fade-enter-active,.xt-tabs-fade-leave-active{transition:opacity .3s ease,transform .3s ease}.xt-tabs-fade-enter{opacity:0;transform:translateY(10px)}.xt-tabs-fade-leave-to{opacity:0;transform:translateY(-10px)}.xt-tabs[data-v-3859f3fa]{display:flex;flex-direction:column}.xt-tabs--bottom[data-v-3859f3fa],.xt-tabs--top[data-v-3859f3fa]{flex-direction:column}.xt-tabs--bottom .xt-tabs__header[data-v-3859f3fa],.xt-tabs--top .xt-tabs__header[data-v-3859f3fa]{width:100%}.xt-tabs--left[data-v-3859f3fa],.xt-tabs--right[data-v-3859f3fa]{flex-direction:row}.xt-tabs--left .xt-tabs__header[data-v-3859f3fa],.xt-tabs--right .xt-tabs__header[data-v-3859f3fa]{flex-direction:column;width:auto}.xt-tabs--left .xt-tabs__nav[data-v-3859f3fa],.xt-tabs--right .xt-tabs__nav[data-v-3859f3fa]{flex-direction:column}.xt-tabs--left .xt-tabs__nav-indicator[data-v-3859f3fa],.xt-tabs--right .xt-tabs__nav-indicator[data-v-3859f3fa]{width:2px;height:auto}.xt-tabs--left .xt-tabs__content[data-v-3859f3fa],.xt-tabs--right .xt-tabs__content[data-v-3859f3fa]{border-left:1px solid #dcdfe6;border-top:none}.xt-tabs--left--right .xt-tabs__content[data-v-3859f3fa],.xt-tabs--right--right .xt-tabs__content[data-v-3859f3fa]{border-left:none;border-right:1px solid #dcdfe6}.xt-tabs--top .xt-tabs__nav-indicator[data-v-3859f3fa]{bottom:0}.xt-tabs--bottom .xt-tabs__nav-indicator[data-v-3859f3fa]{top:0}.xt-tabs--left .xt-tabs__nav-indicator[data-v-3859f3fa]{right:0}.xt-tabs--right .xt-tabs__nav-indicator[data-v-3859f3fa]{left:0}.xt-tabs--card .xt-tabs__header[data-v-3859f3fa]{margin-bottom:-1px}.xt-tabs--card .xt-tabs__nav-item[data-v-3859f3fa]{border:1px solid transparent;border-bottom:none;background:#f5f7fa}.xt-tabs--card .xt-tabs__nav-item--active[data-v-3859f3fa]{background:#fff;border-color:#dcdfe6;border-bottom-color:#fff}.xt-tabs--card--left .xt-tabs__nav-item[data-v-3859f3fa],.xt-tabs--card--right .xt-tabs__nav-item[data-v-3859f3fa]{border-bottom:1px solid transparent;border-right:none}.xt-tabs--card--left .xt-tabs__nav-item--active[data-v-3859f3fa],.xt-tabs--card--right .xt-tabs__nav-item--active[data-v-3859f3fa]{border-right-color:#fff;border-bottom-color:#dcdfe6}.xt-tabs--border-card[data-v-3859f3fa]{border:1px solid #dcdfe6;border-radius:4px;overflow:hidden}.xt-tabs--border-card .xt-tabs__nav-item--active[data-v-3859f3fa]{background:#ecf5ff;color:#409eff}.xt-tabs--editable .xt-tabs__close[data-v-3859f3fa]{display:inline-block}.xt-tabs__header[data-v-3859f3fa]{position:relative;display:flex}.xt-tabs__nav[data-v-3859f3fa]{display:flex;flex-wrap:nowrap}.xt-tabs__nav-item[data-v-3859f3fa]{position:relative;padding:12px 20px;cursor:pointer;font-size:14px;color:#606266;transition:all .3s;white-space:nowrap}.xt-tabs__nav-item--active[data-v-3859f3fa]{color:#409eff}.xt-tabs__nav-item--disabled[data-v-3859f3fa]{cursor:not-allowed;color:#c0c4cc}.xt-tabs__nav-item--add[data-v-3859f3fa]{color:#909399;font-size:20px}.xt-tabs__nav-item[data-v-3859f3fa]:hover:not(.xt-tabs__nav-item--disabled){color:#409eff;background-color:#ecf5ff}.xt-tabs__nav-link[data-v-3859f3fa]{display:inline-block}.xt-tabs__close[data-v-3859f3fa]{display:none;margin-left:8px;font-size:16px;line-height:1;color:#909399;vertical-align:middle}.xt-tabs__close[data-v-3859f3fa]:hover{color:#f56c6c}.xt-tabs__nav-indicator[data-v-3859f3fa]{position:absolute;height:2px;background-color:#409eff}.xt-tabs__content[data-v-3859f3fa]{flex:1;padding:16px;border-top:1px solid #dcdfe6}.xt-tabs--border-card .xt-tabs__content[data-v-3859f3fa]{border-top:none}.xt-tabs__pane[data-v-3859f3fa]{min-height:40px}