xt-element-ui 2.2.1 → 2.2.3
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/README.md +1 -1
- package/docs/README.md +10 -3
- package/docs/components/base/xt-button.md +11 -4
- package/docs/components/base/xt-card.md +5 -11
- package/docs/components/base/xt-config-provider.md +2 -0
- package/docs/components/base/xt-date-picker.md +7 -26
- package/docs/components/base/xt-flow.md +404 -0
- package/docs/components/base/xt-grid-box.md +34 -34
- package/docs/components/base/xt-multi.md +5 -5
- package/docs/components/base/xt-tabs.md +51 -6
- package/docs/components/base/xt-text.md +20 -3
- package/docs/components/business/xt-chart.md +1 -0
- package/lib/css/1.87a493be.css +1 -0
- package/lib/index.common.1.js +294 -0
- package/lib/index.common.2.js +141 -0
- package/lib/index.common.js +12125 -118823
- package/lib/index.css +1 -1
- package/lib/index.umd.1.js +294 -0
- package/lib/index.umd.2.js +141 -0
- package/lib/index.umd.js +12131 -118828
- package/lib/index.umd.min.1.js +1 -0
- package/lib/index.umd.min.2.js +1 -0
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/xt-badge.common.js +1 -1
- package/lib/xt-badge/xt-badge.css +1 -1
- package/lib/xt-badge/xt-badge.umd.js +1 -1
- package/lib/xt-button/xt-button.common.js +13 -8
- package/lib/xt-button/xt-button.css +1 -1
- package/lib/xt-button/xt-button.umd.js +13 -8
- package/lib/xt-button/xt-button.umd.min.js +1 -1
- package/lib/xt-card/xt-card.common.js +5 -5
- package/lib/xt-card/xt-card.umd.js +5 -5
- package/lib/xt-card/xt-card.umd.min.js +1 -1
- package/lib/xt-card-item/xt-card-item.common.js +4 -4
- package/lib/xt-card-item/xt-card-item.umd.js +4 -4
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -1
- package/lib/xt-chart/xt-chart.common.js +1969 -108924
- package/lib/xt-chart/xt-chart.css +1 -1
- package/lib/xt-chart/xt-chart.umd.js +1975 -108929
- package/lib/xt-chart/xt-chart.umd.min.js +1 -1
- package/lib/xt-config-provider/xt-config-provider.common.js +561 -107504
- package/lib/xt-config-provider/xt-config-provider.css +1 -1
- package/lib/xt-config-provider/xt-config-provider.umd.js +567 -107509
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -1
- package/lib/xt-date-picker/css/1.87a493be.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.common.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.css +1 -1
- package/lib/xt-date-picker/xt-date-picker.umd.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.umd.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.umd.min.1.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.2.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -1
- package/lib/xt-flex-box/xt-flex-box.common.js +1 -1
- package/lib/xt-flex-box/xt-flex-box.umd.js +1 -1
- package/lib/xt-flow/demo.html +10 -0
- package/lib/xt-flow/index.js +1 -0
- package/lib/xt-flow/xt-flow.common.js +638 -0
- package/lib/xt-flow/xt-flow.css +1 -0
- package/lib/xt-flow/xt-flow.umd.js +648 -0
- package/lib/xt-flow/xt-flow.umd.min.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +1 -1
- package/lib/xt-form-schema/xt-form-schema.umd.js +1 -1
- package/lib/xt-grid-box/xt-grid-box.common.js +1 -1
- package/lib/xt-grid-box/xt-grid-box.umd.js +1 -1
- package/lib/xt-grid-item/xt-grid-item.common.js +1 -1
- package/lib/xt-grid-item/xt-grid-item.umd.js +1 -1
- package/lib/xt-icon/xt-icon.common.js +1 -1
- package/lib/xt-icon/xt-icon.umd.js +1 -1
- package/lib/xt-input/xt-input.common.js +1 -1
- package/lib/xt-input/xt-input.umd.js +1 -1
- package/lib/xt-list/xt-list.common.js +1 -1
- package/lib/xt-list/xt-list.umd.js +1 -1
- package/lib/xt-map/xt-map.common.js +1 -1
- package/lib/xt-map/xt-map.umd.js +1 -1
- package/lib/xt-map-provider/xt-map-provider.common.js +1 -1
- package/lib/xt-map-provider/xt-map-provider.umd.js +1 -1
- package/lib/xt-page/xt-page.common.js +1 -1
- package/lib/xt-page/xt-page.umd.js +1 -1
- package/lib/xt-progress/xt-progress.common.js +1 -1
- package/lib/xt-progress/xt-progress.umd.js +1 -1
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +1 -1
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +1 -1
- package/lib/xt-select-tree/xt-select-tree.common.js +1 -1
- package/lib/xt-select-tree/xt-select-tree.umd.js +1 -1
- package/lib/xt-step-price/xt-step-price.common.js +2 -2
- package/lib/xt-step-price/xt-step-price.umd.js +2 -2
- package/lib/xt-step-price-item/xt-step-price-item.common.js +1 -1
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +1 -1
- package/lib/xt-tab-pane/xt-tab-pane.common.js +1 -1
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +1 -1
- package/lib/xt-table/xt-table.common.js +2 -2
- package/lib/xt-table/xt-table.umd.js +2 -2
- package/lib/xt-tabs/xt-tabs.common.js +5 -27
- package/lib/xt-tabs/xt-tabs.css +1 -1
- package/lib/xt-tabs/xt-tabs.umd.js +5 -27
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -1
- package/lib/xt-text/xt-text.common.js +7 -4
- package/lib/xt-text/xt-text.css +1 -1
- package/lib/xt-text/xt-text.umd.js +7 -4
- package/lib/xt-text/xt-text.umd.min.js +1 -1
- package/lib/xt-time/xt-time.common.js +1 -1
- package/lib/xt-time/xt-time.umd.js +1 -1
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +1 -1
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +1 -1
- package/lib/xt-upload/xt-upload.common.js +11 -11
- package/lib/xt-upload/xt-upload.umd.js +12 -12
- package/lib/xt-upload/xt-upload.umd.min.js +1 -1
- package/package.json +5 -6
- package/src/components/index.scss +7 -1
- package/src/components/xt-badge/style/index.scss +6 -6
- package/src/components/xt-button/index.vue +11 -6
- package/src/components/xt-button/style/index.scss +7 -5
- package/src/components/xt-card/index.vue +3 -3
- package/src/components/xt-card-item/index.vue +2 -2
- package/src/components/xt-chart/XtMulti.vue +8 -18
- package/src/components/xt-chart/XtPie.vue +1 -0
- package/src/components/xt-chart/utils.js +84 -50
- package/src/components/xt-config-provider/index.vue +56 -54
- package/src/components/xt-date-picker/component/Picker.vue +2 -46
- package/src/components/xt-date-picker/component/RangeDate.vue +4 -4
- package/src/components/xt-date-picker/index.js +1 -0
- package/src/components/xt-date-picker/index.vue +3 -23
- package/src/components/xt-date-picker/style/index.scss +62 -0
- package/src/components/xt-flow/flowable-parser.js +244 -0
- package/src/components/xt-flow/index.js +8 -0
- package/src/components/xt-flow/index.vue +226 -0
- package/src/components/xt-flow/style/index.scss +359 -0
- package/src/components/xt-input/style/index.scss +1 -1
- package/src/components/xt-tabs/index.vue +3 -174
- package/src/components/xt-tabs/style/index.scss +131 -121
- package/src/components/xt-text/index.vue +5 -2
- package/src/components/xt-text/style/index.scss +6 -6
- package/src/index.js +8 -13
- package/src/styles/css-variables.scss +73 -1
- package/src/styles/theme/index.scss +0 -1
- package/src/styles/theme/dark-variables.scss +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(("undefined"!==typeof self?self:this)["webpackJsonpxt_date_picker"]=("undefined"!==typeof self?self:this)["webpackJsonpxt_date_picker"]||[]).push([[2],{b0ea:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"date-picker"},["quarter"!==e.type?t("el-date-picker",e._g(e._b({attrs:{type:e.pickerType,"value-format":e.valueFormat,disabled:e.disabled,placeholder:e.placeholder,"popper-append-to-body":"","popper-class":"base-date-popper"},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}},"el-date-picker",e.$attrs,!1),e.$listeners)):t("el-popover",{attrs:{trigger:"manual",placement:"bottom-start",width:"240"},model:{value:e.quarterPopVisible,callback:function(t){e.quarterPopVisible=t},expression:"quarterPopVisible"}},[t("div",{staticClass:"quarter-panel"},[t("div",{staticClass:"quarter-header"},[t("el-button",{attrs:{icon:"el-icon-d-arrow-left"},on:{click:function(t){e.year--}}}),t("span",[e._v(e._s(e.year)+" 年")]),t("el-button",{attrs:{icon:"el-icon-d-arrow-right"},on:{click:function(t){e.year++}}})],1),t("div",{staticClass:"quarter-list"},e._l(4,(function(r){return t("div",{key:r,staticClass:"quarter-item",class:{active:e.quarterNum===r},on:{click:function(t){return e.selectQuarter(r)}}},[e._v(" Q"+e._s(r)+" ")])})),0)]),t("el-input",{ref:"quarterInput",attrs:{slot:"reference",size:"small",readonly:"",placeholder:e.placeholder,disabled:e.disabled,clearable:""},on:{clear:e.handleClearQuarter},slot:"reference",model:{value:e.quarterShowText,callback:function(t){e.quarterShowText=t},expression:"quarterShowText"}},[t("i",{staticClass:"el-icon-date",attrs:{slot:"affix"},slot:"affix"})])],1)],1)},l=[],i={name:"BaseDatePicker",inheritAttrs:!1,props:{value:{type:[String,null],default:null},type:{type:String,default:"date",validator:e=>["date","month","year","quarter","week"].includes(e)},disabled:{type:Boolean,default:!1}},data(){return{quarterPopVisible:!1,year:(new Date).getFullYear(),quarterNum:null}},computed:{pickerType(){return"quarter"===this.type?null:this.type},placeholder(){const e={date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"};return e[this.type]||"请选择日期"},valueFormat(){const e={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",quarter:"yyyy-Qq",week:"yyyy-WW"};return e[this.type]||"yyyy-MM-dd"},innerValue:{get(){return this.value},set(e){this.$emit("input",e)}},quarterShowText(){return this.value?`${this.year}-Q${this.quarterNum}`:""}},watch:{value:{handler(e){if("quarter"!==this.type||!e)return void(this.quarterNum=null);const[t,r]=e.split("-Q");this.year=Number(t),this.quarterNum=Number(r)},immediate:!0}},methods:{selectQuarter(e){this.quarterNum=e;const t=`${this.year}-Q${e}`;this.$emit("input",t),this.quarterPopVisible=!1},handleClearQuarter(){this.quarterNum=null,this.$emit("input",null)}},mounted(){"quarter"===this.type&&this.$refs.quarterInput&&this.$refs.quarterInput.$el.addEventListener("click",()=>{this.disabled||(this.quarterPopVisible=!0)})}},s=i,u=r("2877"),n=Object(u["a"])(s,a,l,!1,null,null,null);t["default"]=n.exports}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-date-picker"]=t():e["xt-date-picker"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s="fb15")}({"134c":function(e,t,a){"use strict";a("4fae")},"3d19":function(e,t,a){},"4fae":function(e,t,a){},"53d0":function(e,t,a){},"863a":function(e,t,a){"use strict";a("53d0")},b1e2:function(e,t,a){"use strict";a("3d19")},fb15:function(e,t,a){"use strict";if(a.r(t),a.d(t,"XtDatePicker",(function(){return P})),"undefined"!==typeof window){var r=window.document.currentScript,n=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(a.p=n[1])}var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-date-picker-container"},[e.showDimension?t("div",{staticClass:"xt-date-dimension"},[t("el-radio-group",{attrs:{size:"small"},model:{value:e.dimension,callback:function(t){e.dimension=t},expression:"dimension"}},[t("el-radio-button",{attrs:{label:"date"}},[e._v("日")]),t("el-radio-button",{attrs:{label:"month"}},[e._v("月")]),t("el-radio-button",{attrs:{label:"year"}},[e._v("年")]),t("el-radio-button",{attrs:{label:"daterange"}},[e._v("自定义")])],1)],1):e._e(),t("div",{staticClass:"xt-date-picker-wrapper"},[e.useRangeMode?t("RangeDate",{staticClass:"xt-date",class:{focus:e.isfocus},style:e.width?{width:e.width+"px"}:{},attrs:{type:e.rangeDateType,separator:e.separator,disabled:e.disabled},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.rangeValue,callback:function(t){e.rangeValue=t},expression:"rangeValue"}}):e._e(),e.useRangeMode||"quarter"===e.realDateType?e.useRangeMode||"quarter"!==e.realDateType?e._e():t("Picker",{attrs:{type:"quarter",size:"small",disabled:e.disabled,placeholder:e.innerPlaceholder},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.singleValue,callback:function(t){e.singleValue=t},expression:"singleValue"}}):t("el-date-picker",{ref:"singlePicker",attrs:{size:"small",disabled:e.disabled,"append-to-body":"",format:e.format,type:e.realDateType,placeholder:e.innerPlaceholder,clearable:""},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.singleValue,callback:function(t){e.singleValue=t},expression:"singleValue"}})],1)])},s=[],l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"range-wrap"},[t("Picker",{attrs:{type:e.type,size:"small",placeholder:e.startPlaceholder,disabled:e.disabled,"disabled-date":e.disabledStart},on:{change:e.handleChange},model:{value:e.startVal,callback:function(t){e.startVal=t},expression:"startVal"}}),t("span",{staticClass:"split"},[e._v(e._s(e.separator))]),t("Picker",{attrs:{type:e.type,size:"small",placeholder:e.endPlaceholder,disabled:e.disabled,"disabled-date":e.disabledEnd},on:{change:e.handleChange},model:{value:e.endVal,callback:function(t){e.endVal=t},expression:"endVal"}})],1)},o=[],d=function(){var e=this,t=e._self._c;return t("div",{staticClass:"base-date-root"},["quarter"!==e.type?t("el-date-picker",e._g(e._b({attrs:{type:e.pickerType,"value-format":e.valueFormat,disabled:e.disabled,placeholder:e.placeholder,"popper-append-to-body":"","popper-class":"base-date-popper"},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}},"el-date-picker",e.$attrs,!1),e.$listeners)):t("el-popover",{attrs:{trigger:"manual",placement:"bottom-start",width:"240"},model:{value:e.quarterPopVisible,callback:function(t){e.quarterPopVisible=t},expression:"quarterPopVisible"}},[t("div",{staticClass:"quarter-panel"},[t("div",{staticClass:"quarter-header"},[t("el-button",{attrs:{icon:"el-icon-d-arrow-left"},on:{click:function(t){e.year--}}}),t("span",[e._v(e._s(e.year)+" 年")]),t("el-button",{attrs:{icon:"el-icon-d-arrow-right"},on:{click:function(t){e.year++}}})],1),t("div",{staticClass:"quarter-list"},e._l(4,(function(a){return t("div",{key:a,staticClass:"quarter-item",class:{active:e.quarterNum===a},on:{click:function(t){return e.selectQuarter(a)}}},[e._v(" Q"+e._s(a)+" ")])})),0)]),t("el-input",{ref:"quarterInput",attrs:{slot:"reference",size:"small",readonly:"",placeholder:e.placeholder,disabled:e.disabled,clearable:""},on:{clear:e.handleClearQuarter},slot:"reference",model:{value:e.quarterShowText,callback:function(t){e.quarterShowText=t},expression:"quarterShowText"}},[t("i",{staticClass:"el-icon-date",attrs:{slot:"affix"},slot:"affix"})])],1)],1)},u=[],c={name:"BaseDatePicker",inheritAttrs:!1,props:{value:{type:[String,null],default:null},type:{type:String,default:"date",validator:e=>["date","month","year","quarter","week"].includes(e)},disabled:{type:Boolean,default:!1},placeholder:String,valueFormat:String},data(){return{quarterPopVisible:!1,year:(new Date).getFullYear(),quarterNum:null}},computed:{pickerType(){return"quarter"===this.type?null:this.type},placeholder(){if(this.$props.placeholder)return this.$props.placeholder;const e={date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"};return e[this.type]||"请选择日期"},valueFormat(){if(this.$props.valueFormat)return this.$props.valueFormat;const e={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",quarter:"yyyy-Qq",week:"yyyy-WW"};return e[this.type]||"yyyy-MM-dd"},innerValue:{get(){return this.value},set(e){this.$emit("input",e)}},quarterShowText(){return this.value?`${this.year}-Q${this.quarterNum}`:""}},watch:{value:{handler(e){if("quarter"!==this.type||!e)return void(this.quarterNum=null);const[t,a]=e.split("-Q");this.year=Number(t),this.quarterNum=Number(a)},immediate:!0}},methods:{selectQuarter(e){this.quarterNum=e;const t=`${this.year}-Q${e}`;this.$emit("input",t),this.quarterPopVisible=!1},handleClearQuarter(){this.quarterNum=null,this.$emit("input",null)}},mounted(){"quarter"===this.type&&this.$refs.quarterInput&&this.$refs.quarterInput.$el.addEventListener("click",()=>{this.disabled||(this.quarterPopVisible=!0)})}},p=c;a("134c");function h(e,t,a,r,n,i,s,l){var o,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=a,d._compiled=!0),r&&(d.functional=!0),i&&(d._scopeId="data-v-"+i),s?(o=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__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=o):n&&(o=l?function(){n.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:n),o)if(d.functional){d._injectStyles=o;var u=d.render;d.render=function(e,t){return o.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,o):[o]}return{exports:e,options:d}}var y=h(p,d,u,!1,null,"54a20a1c",null),f=y.exports,m={name:"RangeDate",components:{Picker:f},props:{value:{type:Array,default:()=>[null,null]},type:{type:String,default:"date"},separator:{type:String,default:"至"},disabled:{type:Boolean,default:!1}},data(){return{startVal:"",endVal:""}},watch:{value:{handler(e){const[t,a]=e||[];this.startVal=t||"",this.endVal=a||""},immediate:!0}},computed:{startDate(){return this.startVal?new Date(this.startVal):null},endDate(){return this.endVal?new Date(this.endVal):null},startPlaceholder(){const e={date:"开始日期",month:"开始月份",year:"开始年份",quarter:"开始季度",week:"开始周"};return e[this.type]||"开始日期"},endPlaceholder(){const e={date:"结束日期",month:"结束月份",year:"结束年份",quarter:"结束季度",week:"结束周"};return e[this.type]||"结束日期"}},methods:{disabledStart(e){return!!this.endDate&&e.getTime()>this.endDate.getTime()},disabledEnd(e){return!!this.startDate&&e.getTime()<this.startDate.getTime()},handleChange(){this.$emit("input",[this.startVal,this.endVal])}}},b=m,v=(a("863a"),h(b,l,o,!1,null,"373bd75c",null)),g=v.exports;const k={datetime:"yyyy-MM-dd HH:mm",month:"yyyy-MM",year:"yyyy",date:"yyyy-MM-dd",quarter:"yyyy-Qq",week:"yyyy-WW"},_={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",daterange:"yyyy-MM-dd"},q={date:"date",month:"month",year:"year",daterange:"date"},V={date:"date",month:"month",year:"year",quarter:"quarter",week:"week"};var w={name:"XtDatePicker",components:{RangeDate:g,Picker:f},model:{prop:"value",event:"change"},props:{value:{type:[String,Array,null],default:null},dateType:{type:String,default:"date",validator:e=>Object.keys(k).includes(e)},separator:{type:String,default:"至"},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},placeholder:String,width:{type:String,default:"100%"},rangeMode:{type:Boolean,default:!1},showDimension:{type:Boolean,default:!1},dimension:{type:String,default:"date",validator:e=>["date","month","year","daterange"].includes(e)}},data(){return{isfocus:!1}},computed:{realDateType(){return this.showDimension?this.dimension:this.dateType},useRangeMode(){return"daterange"===this.dimension||this.rangeMode},rangeDateType(){return this.showDimension?q[this.dimension]||"date":V[this.dateType]||"date"},format(){return this.showDimension?_[this.dimension]||k[this.dateType]:k[this.dateType]||"yyyy-MM-dd"},innerPlaceholder(){if(this.placeholder)return this.placeholder;const e={date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周",datetime:"请选择日期时间"};return e[this.realDateType]||"请选择"},singleValue:{get(){return this.value},set(e){this.$emit("update:value",e),this.$emit("change",e),this.$emit("dimension-change",{dimension:this.dimension,value:e})}},rangeValue:{get(){return this.value},set(e){this.$emit("update:value",e),this.$emit("change",e),this.$emit("dimension-change",{dimension:this.dimension,value:e})}}},watch:{dimension(e){this.closePickerPanels(),this.immediate&&this.$emit("dimension-change",{dimension:e,value:this.value})}},methods:{closePickerPanels(){this.$refs.singlePicker&&(this.$refs.singlePicker.pickerVisible=!1)}}},$=w,x=(a("b1e2"),h($,i,s,!1,null,"3d03fedb",null)),P=x.exports;P.install=function(e){e.component(P.name,P)};var M=P;t["default"]=M}})}));
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-date-picker"]=t():e["xt-date-picker"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){function t(t){for(var n,r,i=t[0],o=t[1],s=0,l=[];s<i.length;s++)r=i[s],Object.prototype.hasOwnProperty.call(a,r)&&a[r]&&l.push(a[r][0]),a[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);u&&u(t);while(l.length)l.shift()()}var n={},r={0:0},a={0:0};function i(e){return o.p+"xt-date-picker.umd.min."+({}[e]||e)+".js"}function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n={1:1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="css/"+({}[e]||e)+"."+{1:"87a493be",2:"31d6cfe0"}[e]+".css",i=o.p+a,s=document.getElementsByTagName("link"),l=0;l<s.length;l++){var d=s[l],u=d.getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(u===a||u===i))return t()}var c=document.getElementsByTagName("style");for(l=0;l<c.length;l++){d=c[l],u=d.getAttribute("data-href");if(u===a||u===i)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var a=t&&t.target&&t.target.src||i,o=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=a,delete r[e],f.parentNode.removeChild(f),n(o)},f.href=i;var p=document.getElementsByTagName("head")[0];p.appendChild(f)})).then((function(){r[e]=0})));var s=a[e];if(0!==s)if(s)t.push(s[2]);else{var l=new Promise((function(t,n){s=a[e]=[t,n]}));t.push(s[2]=l);var d,u=document.createElement("script");u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.src=i(e);var c=new Error;d=function(t){u.onerror=u.onload=null,clearTimeout(f);var n=a[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+i+")",c.name="ChunkLoadError",c.type=r,c.request=i,n[1](c)}a[e]=void 0}};var f=setTimeout((function(){d({type:"timeout",target:u})}),12e4);u.onerror=u.onload=d,document.head.appendChild(u)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=("undefined"!==typeof self?self:this)["webpackJsonpxt_date_picker"]=("undefined"!==typeof self?self:this)["webpackJsonpxt_date_picker"]||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var d=0;d<s.length;d++)t(s[d]);var u=l;return o(o.s="fb15")}({2877:function(e,t,n){"use strict";function r(e,t,n,r,a,i,o,s){var l,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),r&&(d.functional=!0),i&&(d._scopeId="data-v-"+i),o?(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__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=l):a&&(l=s?function(){a.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(d.functional){d._injectStyles=l;var u=d.render;d.render=function(e,t){return l.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:d}}n.d(t,"a",(function(){return r}))},c828:function(e,t,n){},fb15:function(e,t,n){"use strict";if(n.r(t),n.d(t,"XtDatePicker",(function(){return h})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}n("c828");var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-date-picker-container"},[e.showDimension?t("div",{staticClass:"xt-date-dimension"},[t("el-radio-group",{attrs:{size:"small"},model:{value:e.dimension,callback:function(t){e.dimension=t},expression:"dimension"}},[t("el-radio-button",{attrs:{label:"date"}},[e._v("日")]),t("el-radio-button",{attrs:{label:"month"}},[e._v("月")]),t("el-radio-button",{attrs:{label:"year"}},[e._v("年")]),t("el-radio-button",{attrs:{label:"daterange"}},[e._v("自定义")])],1)],1):e._e(),t("div",{staticClass:"xt-date-picker-wrapper"},[e.useRangeMode?t("RangeDate",{staticClass:"xt-date",class:{focus:e.isfocus},style:e.width?{width:e.width+"px"}:{},attrs:{type:e.rangeDateType,separator:e.separator,disabled:e.disabled},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.rangeValue,callback:function(t){e.rangeValue=t},expression:"rangeValue"}}):e._e(),e.useRangeMode||"quarter"===e.realDateType?e.useRangeMode||"quarter"!==e.realDateType?e._e():t("Picker",{staticClass:"xt-date",attrs:{type:"quarter",size:"small",disabled:e.disabled,placeholder:e.innerPlaceholder},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.singleValue,callback:function(t){e.singleValue=t},expression:"singleValue"}}):t("el-date-picker",{ref:"singlePicker",staticClass:"xt-date",attrs:{size:"small",disabled:e.disabled,"append-to-body":"",format:e.format,type:e.realDateType,placeholder:e.innerPlaceholder,clearable:""},on:{focus:function(t){e.isfocus=!0,e.$emit("focus")},blur:function(t){e.isfocus=!1,e.$emit("blur")}},model:{value:e.singleValue,callback:function(t){e.singleValue=t},expression:"singleValue"}})],1)])},o=[];const s={datetime:"yyyy-MM-dd HH:mm",month:"yyyy-MM",year:"yyyy",date:"yyyy-MM-dd",quarter:"yyyy-Qq",week:"yyyy-WW"},l={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",daterange:"yyyy-MM-dd"},d={date:"date",month:"month",year:"year",daterange:"date"},u={date:"date",month:"month",year:"year",quarter:"quarter",week:"week"};var c={name:"XtDatePicker",components:{RangeDate:()=>n.e(1).then(n.bind(null,"1db3")),Picker:()=>n.e(2).then(n.bind(null,"b0ea"))},model:{prop:"value",event:"change"},props:{value:{type:[String,Array,null],default:null},dateType:{type:String,default:"date",validator:e=>Object.keys(s).includes(e)},separator:{type:String,default:"至"},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},placeholder:String,width:{type:String,default:"100%"},rangeMode:{type:Boolean,default:!1},showDimension:{type:Boolean,default:!1},dimension:{type:String,default:"date",validator:e=>["date","month","year","daterange"].includes(e)}},data(){return{isfocus:!1}},computed:{realDateType(){return this.showDimension?this.dimension:this.dateType},useRangeMode(){return"daterange"===this.dimension||this.rangeMode},rangeDateType(){return this.showDimension?d[this.dimension]||"date":u[this.dateType]||"date"},format(){return this.showDimension?l[this.dimension]||s[this.dateType]:s[this.dateType]||"yyyy-MM-dd"},innerPlaceholder(){if(this.placeholder)return this.placeholder;const e={date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周",datetime:"请选择日期时间"};return e[this.realDateType]||"请选择"},singleValue:{get(){return this.value},set(e){this.$emit("update:value",e),this.$emit("change",e),this.$emit("dimension-change",{dimension:this.dimension,value:e})}},rangeValue:{get(){return this.value},set(e){this.$emit("update:value",e),this.$emit("change",e),this.$emit("dimension-change",{dimension:this.dimension,value:e})}}},watch:{dimension(e){this.closePickerPanels(),this.immediate&&this.$emit("dimension-change",{dimension:e,value:this.value})}},methods:{closePickerPanels(){this.$refs.singlePicker&&(this.$refs.singlePicker.pickerVisible=!1)}}},f=c,p=n("2877"),y=Object(p["a"])(f,i,o,!1,null,null,null),h=y.exports;h.install=function(e){e.component(h.name,h)};var m=h;t["default"]=m}})}));
|
|
@@ -123,7 +123,7 @@ if (typeof window !== 'undefined') {
|
|
|
123
123
|
// EXTERNAL MODULE: ./src/components/xt-flex-box/style/index.scss
|
|
124
124
|
var style = __webpack_require__("5820");
|
|
125
125
|
|
|
126
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
126
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d8e97dbc-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-flex-box/index.vue?vue&type=template&id=5dab0d2a
|
|
127
127
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-flex-box",class:_vm.classAttrs,style:(_vm.flexStyle)},[_vm._t("default")],2)
|
|
128
128
|
}
|
|
129
129
|
var staticRenderFns = []
|
|
@@ -132,7 +132,7 @@ if (typeof window !== 'undefined') {
|
|
|
132
132
|
// EXTERNAL MODULE: ./src/components/xt-flex-box/style/index.scss
|
|
133
133
|
var style = __webpack_require__("5820");
|
|
134
134
|
|
|
135
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d8e97dbc-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-flex-box/index.vue?vue&type=template&id=5dab0d2a
|
|
136
136
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-flex-box",class:_vm.classAttrs,style:(_vm.flexStyle)},[_vm._t("default")],2)
|
|
137
137
|
}
|
|
138
138
|
var staticRenderFns = []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./xt-flow.common.js');
|