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.
- package/docs/components/base/xt-bar.md +5 -5
- package/docs/components/base/xt-chart.md +5 -5
- package/docs/components/base/xt-line.md +4 -4
- package/docs/components/base/xt-multi.md +5 -5
- package/docs/components/base/xt-pie.md +5 -5
- package/lib/index.common.js +503 -165
- package/lib/index.css +1 -1
- package/lib/index.umd.js +506 -168
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/demo.html +10 -0
- package/lib/xt-badge/index.js +1 -0
- package/lib/xt-badge/xt-badge.common.js +335 -0
- package/lib/xt-badge/xt-badge.css +1 -0
- package/lib/xt-badge/xt-badge.umd.js +345 -0
- package/lib/xt-badge/xt-badge.umd.min.js +1 -0
- package/lib/xt-button/demo.html +10 -0
- package/lib/xt-button/index.js +1 -0
- package/lib/xt-button/xt-button.common.js +331 -0
- package/lib/xt-button/xt-button.css +1 -0
- package/lib/xt-button/xt-button.umd.js +341 -0
- package/lib/xt-button/xt-button.umd.min.js +1 -0
- package/lib/xt-card/demo.html +10 -0
- package/lib/xt-card/index.js +1 -0
- package/lib/xt-card/xt-card.common.js +325 -0
- package/lib/xt-card/xt-card.css +1 -0
- package/lib/xt-card/xt-card.umd.js +335 -0
- package/lib/xt-card/xt-card.umd.min.js +1 -0
- package/lib/xt-card-item/demo.html +10 -0
- package/lib/xt-card-item/index.js +1 -0
- package/lib/xt-card-item/xt-card-item.common.js +291 -0
- package/lib/xt-card-item/xt-card-item.css +1 -0
- package/lib/xt-card-item/xt-card-item.umd.js +301 -0
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
- package/lib/xt-chart/demo.html +10 -0
- package/lib/xt-chart/index.js +1 -0
- package/lib/xt-chart/xt-chart.common.js +109203 -0
- package/lib/xt-chart/xt-chart.css +1 -0
- package/lib/xt-chart/xt-chart.umd.js +109213 -0
- package/lib/xt-chart/xt-chart.umd.min.js +1 -0
- package/lib/xt-config-provider/demo.html +10 -0
- package/lib/xt-config-provider/index.js +1 -0
- package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
- package/lib/xt-config-provider/xt-config-provider.css +1 -0
- package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
- package/lib/xt-date-picker/demo.html +10 -0
- package/lib/xt-date-picker/index.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
- package/lib/xt-date-picker/xt-date-picker.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
- package/lib/xt-flex-box/demo.html +10 -0
- package/lib/xt-flex-box/index.js +1 -0
- package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
- package/lib/xt-flex-box/xt-flex-box.css +1 -0
- package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
- package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
- package/lib/xt-form-schema/demo.html +10 -0
- package/lib/xt-form-schema/index.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
- package/lib/xt-form-schema/xt-form-schema.css +1 -0
- package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
- package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
- package/lib/xt-grid-box/demo.html +10 -0
- package/lib/xt-grid-box/index.js +1 -0
- package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
- package/lib/xt-grid-box/xt-grid-box.css +1 -0
- package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
- package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
- package/lib/xt-grid-item/demo.html +10 -0
- package/lib/xt-grid-item/index.js +1 -0
- package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
- package/lib/xt-grid-item/xt-grid-item.css +1 -0
- package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
- package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
- package/lib/xt-icon/demo.html +10 -0
- package/lib/xt-icon/index.js +1 -0
- package/lib/xt-icon/xt-icon.common.js +430 -0
- package/lib/xt-icon/xt-icon.css +1 -0
- package/lib/xt-icon/xt-icon.umd.js +440 -0
- package/lib/xt-icon/xt-icon.umd.min.js +1 -0
- package/lib/xt-input/demo.html +10 -0
- package/lib/xt-input/index.js +1 -0
- package/lib/xt-input/xt-input.common.js +584 -0
- package/lib/xt-input/xt-input.css +1 -0
- package/lib/xt-input/xt-input.umd.js +594 -0
- package/lib/xt-input/xt-input.umd.min.js +1 -0
- package/lib/xt-list/demo.html +10 -0
- package/lib/xt-list/index.js +1 -0
- package/lib/xt-list/xt-list.common.js +714 -0
- package/lib/xt-list/xt-list.css +1 -0
- package/lib/xt-list/xt-list.umd.js +724 -0
- package/lib/xt-list/xt-list.umd.min.js +1 -0
- package/lib/xt-map/demo.html +10 -0
- package/lib/xt-map/index.js +1 -0
- package/lib/xt-map/xt-map.common.js +1951 -0
- package/lib/xt-map/xt-map.css +1 -0
- package/lib/xt-map/xt-map.umd.js +1961 -0
- package/lib/xt-map/xt-map.umd.min.js +1 -0
- package/lib/xt-map-provider/demo.html +10 -0
- package/lib/xt-map-provider/index.js +1 -0
- package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
- package/lib/xt-map-provider/xt-map-provider.css +1 -0
- package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
- package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
- package/lib/xt-page/demo.html +10 -0
- package/lib/xt-page/index.js +1 -0
- package/lib/xt-page/xt-page.common.js +353 -0
- package/lib/xt-page/xt-page.css +1 -0
- package/lib/xt-page/xt-page.umd.js +363 -0
- package/lib/xt-page/xt-page.umd.min.js +1 -0
- package/lib/xt-progress/demo.html +10 -0
- package/lib/xt-progress/index.js +1 -0
- package/lib/xt-progress/xt-progress.common.js +327 -0
- package/lib/xt-progress/xt-progress.css +1 -0
- package/lib/xt-progress/xt-progress.umd.js +337 -0
- package/lib/xt-progress/xt-progress.umd.min.js +1 -0
- package/lib/xt-scroll-arrow/demo.html +10 -0
- package/lib/xt-scroll-arrow/index.js +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
- package/lib/xt-select-tree/demo.html +10 -0
- package/lib/xt-select-tree/index.js +1 -0
- package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
- package/lib/xt-select-tree/xt-select-tree.css +1 -0
- package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
- package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
- package/lib/xt-step-price/demo.html +10 -0
- package/lib/xt-step-price/index.js +1 -0
- package/lib/xt-step-price/xt-step-price.common.js +800 -0
- package/lib/xt-step-price/xt-step-price.css +1 -0
- package/lib/xt-step-price/xt-step-price.umd.js +810 -0
- package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
- package/lib/xt-step-price-item/demo.html +10 -0
- package/lib/xt-step-price-item/index.js +1 -0
- package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
- package/lib/xt-tab-pane/demo.html +10 -0
- package/lib/xt-tab-pane/index.js +1 -0
- package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
- package/lib/xt-table/demo.html +10 -0
- package/lib/xt-table/index.js +1 -0
- package/lib/xt-table/xt-table.common.js +1027 -0
- package/lib/xt-table/xt-table.css +1 -0
- package/lib/xt-table/xt-table.umd.js +1037 -0
- package/lib/xt-table/xt-table.umd.min.js +1 -0
- package/lib/xt-tabs/demo.html +10 -0
- package/lib/xt-tabs/index.js +1 -0
- package/lib/xt-tabs/xt-tabs.common.js +463 -0
- package/lib/xt-tabs/xt-tabs.css +1 -0
- package/lib/xt-tabs/xt-tabs.umd.js +473 -0
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
- package/lib/xt-text/demo.html +10 -0
- package/lib/xt-text/index.js +1 -0
- package/lib/xt-text/xt-text.common.js +536 -0
- package/lib/xt-text/xt-text.css +1 -0
- package/lib/xt-text/xt-text.umd.js +546 -0
- package/lib/xt-text/xt-text.umd.min.js +1 -0
- package/lib/xt-time/demo.html +10 -0
- package/lib/xt-time/index.js +1 -0
- package/lib/xt-time/xt-time.common.js +555 -0
- package/lib/xt-time/xt-time.css +1 -0
- package/lib/xt-time/xt-time.umd.js +565 -0
- package/lib/xt-time/xt-time.umd.min.js +1 -0
- package/lib/xt-transfer-tree/demo.html +10 -0
- package/lib/xt-transfer-tree/index.js +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
- package/lib/xt-upload/demo.html +10 -0
- package/lib/xt-upload/index.js +1 -0
- package/lib/xt-upload/xt-upload.common.js +1292 -0
- package/lib/xt-upload/xt-upload.css +1 -0
- package/lib/xt-upload/xt-upload.umd.js +1302 -0
- package/lib/xt-upload/xt-upload.umd.min.js +1 -0
- package/package.json +10 -7
- package/src/components/xt-badge/index.js +8 -7
- package/src/components/xt-button/index.js +1 -0
- package/src/components/xt-card/index.js +1 -0
- package/src/components/xt-card-item/index.js +1 -0
- package/src/components/xt-config-provider/index.js +1 -0
- package/src/components/xt-flex-box/index.js +1 -0
- package/src/components/xt-grid-box/index.js +1 -0
- package/src/components/xt-icon/index.js +1 -0
- package/src/components/xt-input/index.js +1 -0
- package/src/components/xt-map/index.js +1 -0
- package/src/components/xt-progress/index.js +8 -7
- package/src/components/xt-scroll-arrow/index.js +8 -7
- package/src/components/xt-step-price/index.js +1 -0
- package/src/components/xt-tab-pane/index.js +10 -0
- package/src/components/{xt-tabs/TabPane.vue → xt-tab-pane/index.vue} +14 -1
- package/src/components/xt-tabs/index.js +9 -10
- package/src/components/xt-tabs/index.vue +303 -44
- package/src/components/xt-text/index.js +1 -0
- package/src/components/xt-time/index.js +1 -0
- package/src/index.js +34 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-upload"]=t(require("vue")):e["xt-upload"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){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")}({"2c86":function(e,t,i){"use strict";i("6d33")},"6d33":function(e,t,i){},"8bbf":function(t,i){t.exports=e},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"XtUpload",(function(){return I})),"undefined"!==typeof window){var n=window.document.currentScript,s=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var o=function(){var e=this,t=e._self._c;return t("XtFlexBox",{attrs:{type:"inline-flex",gap:"5px"}},[e.action?t("el-upload",{ref:"uploadFile",attrs:{disabled:e.disabled||e.uploading,action:e.YSSQP+e.action,"file-list":e.fileList,data:{accessToken:e.accessToken,...e.data},multiple:e.multiple,limit:e.limit,"on-success":e.uploadSuccess,"show-file-list":!1,"auto-upload":e.autoUpload,"before-upload":e.uploadBefore,accept:e.accept}},[t("span",{staticStyle:{"font-size":"20px",padding:"20px",background:"#f0f0f1",color:"#409EFF"},style:{padding:e.plusPx/2+"px",cursor:e.disabled?"not-allowed":"pointer"}},[e._t("default",(function(){return[t("i",{class:e.icon})]}))],2)]):e._e(),null!==e.fileList&&e.fileList.length>0?t("XtFlexBox",{staticClass:"el-upload-list el-upload-list--picture-card",staticStyle:{flex:"1"},attrs:{gap:"5px",wrap:"wrap"}},e._l(e.fileList,(function(i,n){return t("li",{key:n,staticClass:"el-upload-list__item is-ready",staticStyle:{margin:"0",width:"62px",height:"62px"},style:{width:e.plusPx+22+"px",height:e.plusPx+22+"px"}},[t("el-image",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.YSSQP+"/"+i,alt:""},on:{click:e.clickHandler}}),t("span",{staticClass:"el-upload-list__item-actions",on:{click:function(t){return e.preShowPicture(i,n)}}},[t("span",{staticClass:"el-upload-list__item-preview",on:{click:function(t){return t.stopPropagation(),e.preShowPicture(i,n)}}},[t("i",{staticClass:"el-icon-zoom-in"})]),e.uploading||e.disabled?e._e():t("span",{staticClass:"el-upload-list__item-delete",staticStyle:{"margin-left":"0"},on:{click:function(t){return t.stopPropagation(),e.handleRemove(n)}}},[t("i",{staticClass:"el-icon-delete"})])])],1)})),0):e._e(),e.preview?[e.previewVisible?t("ImageViewer",{attrs:{"z-index":3e3,"base-url":e.baseUrl+"/",infiniteLoop:!1,"initial-index":e.imageIndex,"url-list":e.allFileList||e.fileList,"on-close":e.closeViewer}}):e._e()]:e._e()],2)},a=[],r=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"viewer-fade"}},[t("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.zIndex},attrs:{tabindex:"-1"}},[t("div",{staticClass:"el-image-viewer__mask",on:{click:e.hide}}),t("span",{staticClass:"el-image-viewer__btn fix_close",on:{click:e.hide}},[t("i",{staticClass:"el-icon-close"})]),e.isSingle?e._e():[t("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[t("i",{staticClass:"el-icon-arrow-left"})]),t("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[t("i",{staticClass:"el-icon-arrow-right"})])],t("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[t("div",{staticClass:"el-image-viewer__actions__inner"},[t("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomOut")}}}),t("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomIn")}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{class:e.mode.icon,on:{click:function(t){return t.stopPropagation(),e.toggleMode.apply(null,arguments)}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return t.stopPropagation(),e.handleActions("anticlocelise")}}}),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return t.stopPropagation(),e.handleActions("clocelise")}}})])]),t("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(i,n){return n===e.index?t("img",{key:i,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])},l=[],c=i("8bbf"),d=i.n(c);const u=d.a.prototype.$isServer,p=(u||Number(document.documentMode),function(){return!u&&document.addEventListener?function(e,t,i){e&&t&&i&&e.addEventListener(t,i,!1)}:function(e,t,i){e&&t&&i&&e.attachEvent("on"+t,i)}}()),f=function(){return!u&&document.removeEventListener?function(e,t,i){e&&t&&e.removeEventListener(t,i,!1)}:function(e,t,i){e&&t&&e.detachEvent("on"+t,i)}}();let h=e=>{var t={};return e&&"[object Function]"===t.toString.call(e)};"object"===typeof Int8Array||!d.a.prototype.$isServer&&"function"===typeof document.childNodes||(h=function(e){return"function"===typeof e||!1});Object.prototype.hasOwnProperty;const m=function(){return!d.a.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function g(e){let t=!1;return function(...i){t||(t=!0,window.requestAnimationFrame(n=>{e.apply(this,i),t=!1}))}}const _={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},v=m()?"DOMMouseScroll":"mousewheel";var y={name:"elImageViewer",props:{baseUrl:{type:String,default:""},urlList:{type:Array,default:()=>[]},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}},initialIndex:{type:Number,default:0},infiniteLoop:{type:Boolean,default:!0}},data(){return{index:this.initialIndex,isShow:!1,infinite:this.infiniteLoop,loading:!1,mode:_.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return 0===this.index},isLast(){return this.index===this.urlList.length-1},currentImg(){return this.baseUrl+this.urlList[this.index]},imgStyle(){const{scale:e,deg:t,offsetX:i,offsetY:n,enableTransition:s}=this.transform,o={transform:`scale(${1*e}) rotate(${t}deg)`,transition:s?"transform .3s":"","margin-left":i+"px","margin-top":n+"px"};return this.mode===_.CONTAIN&&(o.maxWidth=o.maxHeight="80%"),o}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg(e){this.$nextTick(e=>{const t=this.$refs.img[0];t.complete||(this.loading=!0)})}},methods:{hide(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall(){this._keyDownHandler=g(e=>{const t=e.keyCode;switch(t){case 27:this.hide();break;case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut");break}}),this._mouseWheelHandler=g(e=>{const t=e.wheelDelta?e.wheelDelta:-e.detail;t>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),p(document,"keydown",this._keyDownHandler),p(document,v,this._mouseWheelHandler)},deviceSupportUninstall(){f(document,"keydown",this._keyDownHandler),f(document,v,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown(e){if(this.loading||0!==e.button)return;const{offsetX:t,offsetY:i}=this.transform,n=e.pageX,s=e.pageY;this._dragHandler=g(e=>{this.transform.offsetX=t+e.pageX-n,this.transform.offsetY=i+e.pageY-s}),p(document,"mousemove",this._dragHandler),p(document,"mouseup",e=>{f(document,"mousemove",this._dragHandler)}),e.preventDefault()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(_),t=Object.values(_),i=t.indexOf(this.mode),n=(i+1)%e.length;this.mode=_[e[n]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,t={}){if(this.loading)return;const{zoomRate:i,rotateDeg:n,enableTransition:s}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...t},{transform:o}=this;switch(e){case"zoomOut":o.scale>.2&&(o.scale=parseFloat((o.scale-i).toFixed(3)));break;case"zoomIn":o.scale<10&&(o.scale=parseFloat((o.scale+i).toFixed(3)));break;case"clocelise":o.deg+=n;break;case"anticlocelise":o.deg-=n;break}o.enableTransition=s}},mounted(){this.deviceSupportInstall(),this.$refs["el-image-viewer__wrapper"].focus()}},b=y;i("2c86");function w(e,t,i,n,s,o,a,r){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=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)},c._ssrRegister=l):s&&(l=r?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var x=w(b,r,l,!1,null,"236adf7f",null),S=x.exports,k={name:"XtUpload",components:{ImageViewer:S},model:{prop:"src",event:"change"},props:{data:{type:Object,default:()=>({})},src:{type:String,default:"",required:!0},accessToken:{type:String,default:""},autoUpload:{type:Boolean,default:!0},action:{type:String,default:""},baseUrl:{type:String,default:""},multiple:{type:Boolean,default:!1},accept:{type:String,default:".jpg,.jpeg,.png"},limit:{type:Number,default:5},disabled:{type:Boolean,default:!1},size:{type:String,default:""},beforeEmitData:{type:Function,default:(e,t,i)=>200==e.code&&(e.data.Result?e.data.Data:e.data[0])},allFileList:{type:Array},icon:{type:String,default:"el-icon-camera"}},data(){return{YSSQP:this.baseUrl,previewVisible:!1,uploading:!1,imageUrl:"",fileList:[],imageIndex:0}},computed:{preview(){const{fileList:e}=this;return Array.isArray(e)&&e.length>0},plusPx(){const e="big"==this.size?100:20;return 2*e}},watch:{src:{immediate:!0,deep:!0,handler(e){this.fileList=e?e.split(","):[]}}},methods:{clickHandler(){this.preview&&(this.previewVisible=!0)},closeViewer(){this.previewVisible=!1},preShowPicture(e,t){if(this.allFileList&&0!=this.allFileList.length){const i=this.allFileList.findIndex(t=>t==e);this.imageIndex=i>-1?i:t}else this.imageIndex=t;e.indexOf(".pdf")>-1?window.open(e,"_blank"):(this.imageUrl=this.baseUrl+"/"+e,this.previewVisible=!0)},handleRemove(e,t){try{this.fileList.splice(e,1),this.$emit("change",this.fileList.join(","))}catch(i){console.log(i)}},getPathName(e){return e.split("/").pop().split(".")[0]},uploadBefore(e,t){console.log(e);const i="image/jpeg"===e.type||"image/jpg"===e.type||"image/png"===e.type||"application/pdf"===e.type,n=e.size/1024/1024<50;return i||this.$message.error("上传图片只能是jpg,jpeg,png,pdf格式!"),n||this.$message.error("上传图片大小不能超过50MB!"),i&&n},uploadSuccess(e,t,i){const n=this.beforeEmitData(e,t,i);if(n)return this.fileList.push(n),this.$emit("change",this.fileList.join(",")),this.$message({message:"上传成功",center:!0,type:"success"}),e.data[0];this.$message({message:"上传失败",center:!0,type:"error"})}}},C=k,L=w(C,o,a,!1,null,null,null),I=L.exports;I.install=function(e){e.component(I.name,I)};var j=I;t["default"]=j}})}));
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xt-element-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "基于 Vue 2.7 + ElementUI 的企业级组件库,提供丰富的自定义组件和扩展组件",
|
|
5
5
|
"main": "lib/index.common.js",
|
|
6
|
-
"module": "lib/index.esm.js",
|
|
7
6
|
"unpkg": "lib/index.umd.min.js",
|
|
8
7
|
"style": "lib/index.css",
|
|
9
8
|
"scripts": {
|
|
10
9
|
"docs:dev": "vuepress dev docs",
|
|
11
10
|
"docs:build": "vuepress build docs",
|
|
12
11
|
"dev": "vue-cli-service serve",
|
|
13
|
-
"lib": "
|
|
12
|
+
"lib": "node scripts/build-lib.js",
|
|
13
|
+
"build:components": "node scripts/build-components.js",
|
|
14
14
|
"prepublishOnly": "npm run lib",
|
|
15
15
|
"postinstall": "patch-package"
|
|
16
16
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@vue/cli-service": "~4.5.19",
|
|
22
|
-
"
|
|
22
|
+
"babel-plugin-component": "^1.1.1",
|
|
23
23
|
"sass": "^1.56.0",
|
|
24
24
|
"sass-loader": "^10.5.2",
|
|
25
25
|
"vuepress": "^1.9.10",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"lib",
|
|
31
|
-
"src",
|
|
31
|
+
"src/components",
|
|
32
|
+
"src/styles",
|
|
33
|
+
"src/utils",
|
|
34
|
+
"src/index.js",
|
|
32
35
|
"README.md",
|
|
33
36
|
"CHANGELOG.md",
|
|
34
37
|
"docs/components/**/*md",
|
|
@@ -37,8 +40,8 @@
|
|
|
37
40
|
"dependencies": {
|
|
38
41
|
"echarts": "^4.0.0",
|
|
39
42
|
"element-ui": "^2.11.1",
|
|
40
|
-
"
|
|
41
|
-
"vue
|
|
43
|
+
"patch-package": "^8.0.1",
|
|
44
|
+
"vue": "^2.6.10"
|
|
42
45
|
},
|
|
43
46
|
"keywords": [
|
|
44
47
|
"vue",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import './style/index.scss'
|
|
2
|
+
import XtBadge from './index.vue'
|
|
3
|
+
|
|
4
|
+
XtBadge.install = function(Vue) {
|
|
5
|
+
Vue.component(XtBadge.name, XtBadge)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default XtBadge
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import './style/index.scss'
|
|
2
|
+
import XtProgress from './index.vue'
|
|
3
|
+
|
|
4
|
+
XtProgress.install = function(Vue) {
|
|
5
|
+
Vue.component(XtProgress.name, XtProgress)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default XtProgress
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import './style/index.scss'
|
|
2
|
+
import XtScrollArrow from './index.vue'
|
|
3
|
+
|
|
4
|
+
XtScrollArrow.install = function (Vue) {
|
|
5
|
+
Vue.component(XtScrollArrow.name, XtScrollArrow)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default XtScrollArrow
|
|
8
9
|
export { XtScrollArrow }
|
|
@@ -15,6 +15,14 @@ export default {
|
|
|
15
15
|
label: {
|
|
16
16
|
type: String,
|
|
17
17
|
default: ''
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
closable: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
18
26
|
}
|
|
19
27
|
},
|
|
20
28
|
computed: {
|
|
@@ -24,7 +32,12 @@ export default {
|
|
|
24
32
|
},
|
|
25
33
|
mounted() {
|
|
26
34
|
if (this.$parent && typeof this.$parent.addPane === 'function') {
|
|
27
|
-
this.$parent.addPane({
|
|
35
|
+
this.$parent.addPane({
|
|
36
|
+
name: this.name,
|
|
37
|
+
label: this.label,
|
|
38
|
+
disabled: this.disabled,
|
|
39
|
+
closable: this.closable
|
|
40
|
+
})
|
|
28
41
|
}
|
|
29
42
|
},
|
|
30
43
|
beforeDestroy() {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
XtTabs.install = function(Vue) {
|
|
5
|
-
Vue.component(XtTabs.name, XtTabs)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export { XtTabPane }
|
|
1
|
+
import './style/index.scss'
|
|
2
|
+
import XtTabs from './index.vue'
|
|
3
|
+
|
|
4
|
+
XtTabs.install = function(Vue) {
|
|
5
|
+
Vue.component(XtTabs.name, XtTabs)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default XtTabs
|
|
9
|
+
export { XtTabs }
|
|
@@ -1,34 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="xt-tabs" :class="[
|
|
3
|
-
`xt-tabs--${
|
|
4
|
-
{ 'xt-tabs--card': type === 'card' }
|
|
2
|
+
<div ref="tabsWrap" class="xt-tabs" :class="[
|
|
3
|
+
`xt-tabs--${actualPosition}`,
|
|
4
|
+
{ 'xt-tabs--card': type === 'card' },
|
|
5
|
+
{ 'xt-tabs--border-card': type === 'border-card' },
|
|
6
|
+
{ 'xt-tabs--editable': editable }
|
|
5
7
|
]">
|
|
6
|
-
<div class="xt-tabs__header">
|
|
7
|
-
<div class="xt-tabs__nav">
|
|
8
|
+
<div class="xt-tabs__header" ref="tabsHeader">
|
|
9
|
+
<div class="xt-tabs__nav" ref="tabsNav">
|
|
8
10
|
<div
|
|
9
11
|
v-for="(pane, index) in panes"
|
|
10
12
|
:key="pane.name"
|
|
11
13
|
class="xt-tabs__nav-item"
|
|
12
|
-
:class="{
|
|
13
|
-
|
|
14
|
+
:class="{
|
|
15
|
+
'xt-tabs__nav-item--active': activeName === pane.name,
|
|
16
|
+
'xt-tabs__nav-item--disabled': pane.disabled
|
|
17
|
+
}"
|
|
18
|
+
@click="handleTabClick(pane)"
|
|
14
19
|
>
|
|
15
20
|
<span class="xt-tabs__nav-link">{{ pane.label }}</span>
|
|
21
|
+
<span
|
|
22
|
+
v-if="(closable || pane.closable) && !editable"
|
|
23
|
+
class="xt-tabs__close"
|
|
24
|
+
@click.stop="handleTabRemove(pane.name)"
|
|
25
|
+
>×</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
v-if="addable || editable"
|
|
29
|
+
class="xt-tabs__nav-item xt-tabs__nav-item--add"
|
|
30
|
+
@click="handleTabAdd"
|
|
31
|
+
>
|
|
32
|
+
<span>+</span>
|
|
16
33
|
</div>
|
|
17
34
|
</div>
|
|
18
35
|
<div class="xt-tabs__nav-indicator" :style="indicatorStyle"></div>
|
|
19
36
|
</div>
|
|
20
37
|
|
|
21
38
|
<div class="xt-tabs__content">
|
|
22
|
-
<
|
|
23
|
-
<div
|
|
24
|
-
v-for="(pane, index) in panes"
|
|
25
|
-
:key="pane.name"
|
|
26
|
-
class="xt-tabs__pane"
|
|
27
|
-
v-show="activeName === pane.name"
|
|
28
|
-
>
|
|
29
|
-
<slot :name="pane.name"></slot>
|
|
30
|
-
</div>
|
|
31
|
-
</transition>
|
|
39
|
+
<slot></slot>
|
|
32
40
|
</div>
|
|
33
41
|
</div>
|
|
34
42
|
</template>
|
|
@@ -43,13 +51,29 @@ export default {
|
|
|
43
51
|
},
|
|
44
52
|
type: {
|
|
45
53
|
type: String,
|
|
46
|
-
default: '
|
|
47
|
-
validator: (val) => ['default', 'card'].includes(val)
|
|
54
|
+
default: 'card',
|
|
55
|
+
validator: (val) => ['default', 'card', 'border-card'].includes(val)
|
|
48
56
|
},
|
|
49
57
|
position: {
|
|
50
58
|
type: String,
|
|
51
59
|
default: 'top',
|
|
52
60
|
validator: (val) => ['top', 'bottom', 'left', 'right'].includes(val)
|
|
61
|
+
},
|
|
62
|
+
tabPosition: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
},
|
|
66
|
+
closable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
addable: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
74
|
+
editable: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
53
77
|
}
|
|
54
78
|
},
|
|
55
79
|
data() {
|
|
@@ -58,56 +82,291 @@ export default {
|
|
|
58
82
|
activeName: this.value
|
|
59
83
|
}
|
|
60
84
|
},
|
|
61
|
-
watch: {
|
|
62
|
-
value(val) {
|
|
63
|
-
this.activeName = val
|
|
64
|
-
},
|
|
65
|
-
activeName(val) {
|
|
66
|
-
this.$emit('input', val)
|
|
67
|
-
this.$emit('change', val)
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
85
|
computed: {
|
|
86
|
+
actualPosition() {
|
|
87
|
+
return this.tabPosition || this.position
|
|
88
|
+
},
|
|
71
89
|
indicatorStyle() {
|
|
72
90
|
const activeIndex = this.panes.findIndex(p => p.name === this.activeName)
|
|
73
|
-
if (activeIndex === -1) return { display: 'none' }
|
|
91
|
+
if (activeIndex === -1 || !this.$refs.tabsNav) return { display: 'none' }
|
|
74
92
|
|
|
75
|
-
const navItems = this.$
|
|
93
|
+
const navItems = this.$refs.tabsNav.querySelectorAll('.xt-tabs__nav-item:not(.xt-tabs__nav-item--add)')
|
|
76
94
|
if (!navItems || navItems.length === 0) return { display: 'none' }
|
|
77
95
|
|
|
78
96
|
const activeItem = navItems[activeIndex]
|
|
79
|
-
return {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
97
|
+
if (!activeItem) return { display: 'none' }
|
|
98
|
+
|
|
99
|
+
const pos = this.actualPosition
|
|
100
|
+
const base = { transition: 'all 0.3s ease' }
|
|
101
|
+
if (pos === 'top' || pos === 'bottom') {
|
|
102
|
+
return {
|
|
103
|
+
...base,
|
|
104
|
+
left: `${activeItem.offsetLeft}px`,
|
|
105
|
+
width: `${activeItem.offsetWidth}px`,
|
|
106
|
+
height: '2px',
|
|
107
|
+
bottom: pos === 'top' ? 0 : 'auto',
|
|
108
|
+
top: pos === 'bottom' ? 0 : 'auto',
|
|
109
|
+
display: 'block'
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
return {
|
|
113
|
+
...base,
|
|
114
|
+
top: `${activeItem.offsetTop}px`,
|
|
115
|
+
height: `${activeItem.offsetHeight}px`,
|
|
116
|
+
width: '2px',
|
|
117
|
+
left: pos === 'left' ? 'auto' : 0,
|
|
118
|
+
right: pos === 'right' ? 0 : 'auto',
|
|
119
|
+
display: 'block'
|
|
120
|
+
}
|
|
83
121
|
}
|
|
84
122
|
}
|
|
85
123
|
},
|
|
124
|
+
watch: {
|
|
125
|
+
value(val) {
|
|
126
|
+
this.activeName = val
|
|
127
|
+
},
|
|
128
|
+
activeName(val) {
|
|
129
|
+
this.$emit('input', val)
|
|
130
|
+
this.$emit('change', val)
|
|
131
|
+
this.$nextTick(() => this.$forceUpdate())
|
|
132
|
+
},
|
|
133
|
+
panes: {
|
|
134
|
+
handler() {
|
|
135
|
+
this.$nextTick(() => this.$forceUpdate())
|
|
136
|
+
},
|
|
137
|
+
deep: true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
86
140
|
methods: {
|
|
87
|
-
handleTabClick(
|
|
88
|
-
|
|
141
|
+
handleTabClick(pane) {
|
|
142
|
+
if (pane.disabled) return
|
|
143
|
+
this.activeName = pane.name
|
|
144
|
+
this.$emit('tab-click', pane)
|
|
145
|
+
},
|
|
146
|
+
handleTabRemove(name) {
|
|
147
|
+
this.$emit('tab-remove', name)
|
|
148
|
+
this.$emit('edit', name, 'remove')
|
|
149
|
+
const index = this.panes.findIndex(p => p.name === name)
|
|
150
|
+
if (index > -1) {
|
|
151
|
+
this.panes.splice(index, 1)
|
|
152
|
+
if (this.activeName === name && this.panes.length > 0) {
|
|
153
|
+
this.activeName = this.panes[0].name
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
handleTabAdd() {
|
|
158
|
+
this.$emit('tab-add')
|
|
159
|
+
this.$emit('edit', null, 'add')
|
|
89
160
|
},
|
|
90
161
|
addPane(pane) {
|
|
91
|
-
|
|
162
|
+
const exist = this.panes.some(p => p.name === pane.name)
|
|
163
|
+
if (!exist) {
|
|
92
164
|
this.panes.push(pane)
|
|
93
165
|
if (!this.activeName && this.panes.length === 1) {
|
|
94
166
|
this.activeName = pane.name
|
|
95
167
|
}
|
|
168
|
+
this.$nextTick(() => this.$forceUpdate())
|
|
96
169
|
}
|
|
97
170
|
},
|
|
98
171
|
removePane(name) {
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
this.panes.splice(
|
|
172
|
+
const idx = this.panes.findIndex(p => p.name === name)
|
|
173
|
+
if (idx > -1) {
|
|
174
|
+
this.panes.splice(idx, 1)
|
|
175
|
+
this.$nextTick(() => this.$forceUpdate())
|
|
102
176
|
}
|
|
177
|
+
},
|
|
178
|
+
collectPanes() {
|
|
179
|
+
this.panes = []
|
|
180
|
+
this.$children.forEach(child => {
|
|
181
|
+
if (child.$options.name === 'XtTabPane') {
|
|
182
|
+
this.addPane({
|
|
183
|
+
name: child.name,
|
|
184
|
+
label: child.label,
|
|
185
|
+
disabled: child.disabled,
|
|
186
|
+
closable: child.closable
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
})
|
|
103
190
|
}
|
|
104
191
|
},
|
|
105
192
|
mounted() {
|
|
106
|
-
this.$
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
193
|
+
this.$nextTick(() => {
|
|
194
|
+
this.collectPanes()
|
|
195
|
+
this.$watch(() => this.$children, () => {
|
|
196
|
+
this.collectPanes()
|
|
197
|
+
}, { flush: 'post' })
|
|
110
198
|
})
|
|
111
199
|
}
|
|
112
200
|
}
|
|
113
201
|
</script>
|
|
202
|
+
|
|
203
|
+
<style lang="scss" scoped>
|
|
204
|
+
.xt-tabs {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
|
|
208
|
+
&--top, &--bottom {
|
|
209
|
+
flex-direction: column;
|
|
210
|
+
.xt-tabs__header {
|
|
211
|
+
width: 100%;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&--left, &--right {
|
|
216
|
+
flex-direction: row;
|
|
217
|
+
.xt-tabs__header {
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
width: auto;
|
|
220
|
+
}
|
|
221
|
+
.xt-tabs__nav {
|
|
222
|
+
flex-direction: column;
|
|
223
|
+
}
|
|
224
|
+
.xt-tabs__nav-indicator {
|
|
225
|
+
width: 2px;
|
|
226
|
+
height: auto;
|
|
227
|
+
}
|
|
228
|
+
.xt-tabs__content {
|
|
229
|
+
border-left: 1px solid #dcdfe6;
|
|
230
|
+
border-top: none;
|
|
231
|
+
}
|
|
232
|
+
&--right .xt-tabs__content {
|
|
233
|
+
border-left: none;
|
|
234
|
+
border-right: 1px solid #dcdfe6;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&--top .xt-tabs__nav-indicator {
|
|
239
|
+
bottom: 0;
|
|
240
|
+
}
|
|
241
|
+
&--bottom .xt-tabs__nav-indicator {
|
|
242
|
+
top: 0;
|
|
243
|
+
}
|
|
244
|
+
&--left .xt-tabs__nav-indicator {
|
|
245
|
+
right: 0;
|
|
246
|
+
}
|
|
247
|
+
&--right .xt-tabs__nav-indicator {
|
|
248
|
+
left: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&--card {
|
|
252
|
+
.xt-tabs__header {
|
|
253
|
+
margin-bottom: -1px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.xt-tabs__nav-item {
|
|
257
|
+
border: 1px solid transparent;
|
|
258
|
+
border-bottom: none;
|
|
259
|
+
background: #f5f7fa;
|
|
260
|
+
|
|
261
|
+
&--active {
|
|
262
|
+
background: #fff;
|
|
263
|
+
border-color: #dcdfe6;
|
|
264
|
+
border-bottom-color: #fff;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
&--left, &--right {
|
|
268
|
+
.xt-tabs__nav-item {
|
|
269
|
+
border-bottom: 1px solid transparent;
|
|
270
|
+
border-right: none;
|
|
271
|
+
}
|
|
272
|
+
.xt-tabs__nav-item--active {
|
|
273
|
+
border-right-color: #fff;
|
|
274
|
+
border-bottom-color: #dcdfe6;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&--border-card {
|
|
280
|
+
border: 1px solid #dcdfe6;
|
|
281
|
+
border-radius: 4px;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
|
|
284
|
+
.xt-tabs__nav-item--active {
|
|
285
|
+
background: #ecf5ff;
|
|
286
|
+
color: #409eff;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&--editable {
|
|
291
|
+
.xt-tabs__close {
|
|
292
|
+
display: inline-block;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.xt-tabs__header {
|
|
298
|
+
position: relative;
|
|
299
|
+
display: flex;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.xt-tabs__nav {
|
|
303
|
+
display: flex;
|
|
304
|
+
flex-wrap: nowrap;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.xt-tabs__nav-item {
|
|
308
|
+
position: relative;
|
|
309
|
+
padding: 12px 20px;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
font-size: 14px;
|
|
312
|
+
color: #606266;
|
|
313
|
+
transition: all 0.3s;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
|
|
316
|
+
&--active {
|
|
317
|
+
color: #409eff;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&--disabled {
|
|
321
|
+
cursor: not-allowed;
|
|
322
|
+
color: #c0c4cc;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&--add {
|
|
326
|
+
color: #909399;
|
|
327
|
+
font-size: 20px;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
&:hover:not(.xt-tabs__nav-item--disabled) {
|
|
331
|
+
color: #409eff;
|
|
332
|
+
background-color: #ecf5ff;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.xt-tabs__nav-link {
|
|
337
|
+
display: inline-block;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.xt-tabs__close {
|
|
341
|
+
display: none;
|
|
342
|
+
margin-left: 8px;
|
|
343
|
+
font-size: 16px;
|
|
344
|
+
line-height: 1;
|
|
345
|
+
color: #909399;
|
|
346
|
+
vertical-align: middle;
|
|
347
|
+
|
|
348
|
+
&:hover {
|
|
349
|
+
color: #f56c6c;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.xt-tabs__nav-indicator {
|
|
354
|
+
position: absolute;
|
|
355
|
+
height: 2px;
|
|
356
|
+
background-color: #409eff;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.xt-tabs__content {
|
|
360
|
+
flex: 1;
|
|
361
|
+
padding: 16px;
|
|
362
|
+
border-top: 1px solid #dcdfe6;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.xt-tabs--border-card .xt-tabs__content {
|
|
366
|
+
border-top: none;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.xt-tabs__pane {
|
|
370
|
+
min-height: 40px;
|
|
371
|
+
}
|
|
372
|
+
</style>
|