vxe-pc-ui 3.14.33 → 3.14.34
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/es/cascader/src/cascader.js +8 -8
- package/es/select/src/select.js +10 -10
- package/es/tree-select/src/tree-select.js +10 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/cascader/src/cascader.js +9 -9
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/index.umd.js +33 -33
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +11 -11
- package/lib/select/src/select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +11 -11
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/cascader/src/cascader.ts +10 -10
- package/packages/select/src/select.ts +12 -12
- package/packages/tree-select/src/tree-select.ts +12 -12
- package/types/components/cascader.d.ts +4 -4
- package/types/components/select.d.ts +4 -4
- package/types/components/tree-select.d.ts +4 -4
- /package/es/icon/{iconfont.1780911676317.ttf → iconfont.1780986252009.ttf} +0 -0
- /package/es/icon/{iconfont.1780911676317.woff → iconfont.1780986252009.woff} +0 -0
- /package/es/icon/{iconfont.1780911676317.woff2 → iconfont.1780986252009.woff2} +0 -0
- /package/es/{iconfont.1780911676317.ttf → iconfont.1780986252009.ttf} +0 -0
- /package/es/{iconfont.1780911676317.woff → iconfont.1780986252009.woff} +0 -0
- /package/es/{iconfont.1780911676317.woff2 → iconfont.1780986252009.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1780911676317.ttf → iconfont.1780986252009.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1780911676317.woff → iconfont.1780986252009.woff} +0 -0
- /package/lib/icon/style/{iconfont.1780911676317.woff2 → iconfont.1780986252009.woff2} +0 -0
- /package/lib/{iconfont.1780911676317.ttf → iconfont.1780986252009.ttf} +0 -0
- /package/lib/{iconfont.1780911676317.woff → iconfont.1780986252009.woff} +0 -0
- /package/lib/{iconfont.1780911676317.woff2 → iconfont.1780986252009.woff2} +0 -0
package/lib/select/src/select.js
CHANGED
|
@@ -114,7 +114,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
114
114
|
showCheckbox: {
|
|
115
115
|
type: Boolean,
|
|
116
116
|
default: function _default() {
|
|
117
|
-
return (0, _ui.getConfig)().select.
|
|
117
|
+
return (0, _ui.getConfig)().select.showCheckedButton;
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
checkboxConfig: Object,
|
|
@@ -157,16 +157,16 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
157
157
|
return (0, _ui.getConfig)().select.showCloseButton;
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
|
|
160
|
+
showTotalButton: {
|
|
161
161
|
type: Boolean,
|
|
162
162
|
default: function _default() {
|
|
163
|
-
return (0, _ui.getConfig)().select.
|
|
163
|
+
return (0, _ui.getConfig)().select.showTotalButton;
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
|
-
|
|
166
|
+
showCheckedButton: {
|
|
167
167
|
type: Boolean,
|
|
168
168
|
default: function _default() {
|
|
169
|
-
return (0, _ui.getConfig)().select.
|
|
169
|
+
return (0, _ui.getConfig)().select.showCheckedButton;
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
showClearButton: {
|
|
@@ -1883,8 +1883,8 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1883
1883
|
multiple = props.multiple,
|
|
1884
1884
|
loading = props.loading,
|
|
1885
1885
|
filterable = props.filterable,
|
|
1886
|
-
|
|
1887
|
-
|
|
1886
|
+
showTotalButton = props.showTotalButton,
|
|
1887
|
+
showCheckedButton = props.showCheckedButton,
|
|
1888
1888
|
showClearButton = props.showClearButton,
|
|
1889
1889
|
showCloseButton = props.showCloseButton;
|
|
1890
1890
|
var initialized = reactData.initialized,
|
|
@@ -1989,13 +1989,13 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1989
1989
|
change: $xeSelect.triggerSearchEvent,
|
|
1990
1990
|
search: $xeSelect.triggerSearchEvent
|
|
1991
1991
|
}
|
|
1992
|
-
})]) : (0, _ui.renderEmptyElement)($xeSelect),
|
|
1992
|
+
})]) : (0, _ui.renderEmptyElement)($xeSelect), showCheckedButton && multiple || showClearButton || headerSlot ? h('div', {
|
|
1993
1993
|
class: 'vxe-select--panel-header'
|
|
1994
1994
|
}, headerSlot ? $xeSelect.callSlot(headerSlot, {}, h) : [h('div', {
|
|
1995
1995
|
class: 'vxe-tree-select--header-button'
|
|
1996
1996
|
}, [h('div', {
|
|
1997
1997
|
class: 'vxe-tree-select--header-btns'
|
|
1998
|
-
}, [
|
|
1998
|
+
}, [showCheckedButton && multiple ? h(_button.default, {
|
|
1999
1999
|
props: {
|
|
2000
2000
|
content: (0, _ui.getI18n)('vxe.select.allChecked'),
|
|
2001
2001
|
mode: 'text'
|
|
@@ -2030,11 +2030,11 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
2030
2030
|
style: {
|
|
2031
2031
|
transform: "translateY(".concat(topSpaceHeight, "px)")
|
|
2032
2032
|
}
|
|
2033
|
-
}, $xeSelect.renderOpts(h))])]), footerSlot ||
|
|
2033
|
+
}, $xeSelect.renderOpts(h))])]), footerSlot || showTotalButton || showCloseButton && multiple ? h('div', {
|
|
2034
2034
|
class: 'vxe-select--panel-footer'
|
|
2035
2035
|
}, footerSlot ? $xeSelect.callSlot(footerSlot, {}, h) : [h('div', {
|
|
2036
2036
|
class: 'vxe-select--footer-button'
|
|
2037
|
-
}, [
|
|
2037
|
+
}, [showTotalButton ? h('div', {
|
|
2038
2038
|
class: 'vxe-select--total-btns'
|
|
2039
2039
|
}, (0, _ui.getI18n)('vxe.select.total', [selectVals.length, optList.length])) : (0, _ui.renderEmptyElement)($xeSelect), showCloseButton && multiple ? h('div', {
|
|
2040
2040
|
class: 'vxe-select--oper-btns'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input/src/input")),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function isOptionVisible(e){return!1!==e.visible}function getOptUniqueId(){return _xeUtils.default.uniqueId("opt_")}function createInternalData(){return{synchData:[],fullData:[],afterVisibleList:[],optAddMaps:{},optGroupKeyMaps:{},optFullValMaps:{},remoteValMaps:{},lastScrollLeft:0,lastScrollTop:0,scrollYStore:{startIndex:0,endIndex:0,visibleSize:0,offsetSize:0,rowHeight:0},lastScrollTime:0,hpTimeout:void 0}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeSelect",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Boolean,Array],defaultConfig:Object,clearable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.clearable}},placeholder:String,readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},multiple:Boolean,multiCharOverflow:{type:[Number,String],default:function(){return(0,_ui.getConfig)().select.multiCharOverflow}},prefixIcon:String,allowCreate:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.allowCreate}},placement:String,lazyOptions:Array,options:Array,optionProps:Object,optionGroups:Array,optionGroupProps:Object,optionConfig:Object,className:[String,Function],popupClassName:[String,Function],max:{type:[String,Number],default:null},showRadio:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showRadio}},radioConfig:Object,showCheckbox:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCheckedButoon}},checkboxConfig:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().select.size||(0,_ui.getConfig)().size}},filterable:Boolean,filterMethod:Function,filterConfig:Object,remote:Boolean,remoteConfig:Object,emptyText:String,checkedClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.checkedClosable}},clearClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.clearClosable}},showCloseButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCloseButton}},showTotalButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showTotalButoon}},showCheckedButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCheckedButoon}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showClearButton}},transfer:{type:Boolean,default:null},popupConfig:Object,virtualYConfig:Object,scrollY:Object,remoteMethod:Function,optionId:{type:String,default:function(){return(0,_ui.getConfig)().select.optionId}},optionKey:Boolean},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null},formItemInfo:{from:"xeFormItemInfo",default:null}},provide:function(){return{$xeSelect:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,scrollYLoad:!1,bodyHeight:0,topSpaceHeight:0,optList:[],staticOptions:[],reactFlag:1,currentOption:null,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1},internalData:createInternalData()}},computed:Object.assign(Object.assign({},{}),{computeFormReadonly:function(){var e=this.$xeForm,t=this.readonly;return null===t?!!e&&e.readonly:t},computeIsDisabled:function(){var e=this.$xeForm,t=this.disabled;return null===t?!!e&&e.disabled:t},computeBtnTransfer:function(){var e=this,t=e.$xeTable,n=e.$xeModal,i=e.$xeDrawer,l=e.$xeForm,o=e.transfer,e=e.computePopupOpts;if(_xeUtils.default.isBoolean(e.transfer))return e.transfer;if(null===o){e=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(e))return e;if(t||n||i||l)return!0}return o},computeInpPlaceholder:function(){var e=this.placeholder;return(e=e||(0,_ui.getConfig)().select.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseSelect")},computeDefaultOpts:function(){return Object.assign({},this.defaultConfig)},computePropsOpts:function(){return Object.assign({},this.optionProps)},computeGroupPropsOpts:function(){return Object.assign({},this.optionGroupProps)},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeGroupLabelField:function(){return this.computeGroupPropsOpts.label||"label"},computeGroupOptionsField:function(){return this.computeGroupPropsOpts.options||"options"},computeIsMaximize:function(){var e=this.computeSelectVals;return this.checkMaxLimit(e)},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.popupConfig,this.popupConfig)},computeVirtualYOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.virtualYConfig||(0,_ui.getConfig)().select.scrollY,this.virtualYConfig||this.scrollY)},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.filterConfig,this.filterConfig)},computeOptionOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.optionConfig,this.optionConfig)},computeRadioOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.radioConfig,this.radioConfig)},computeCheckboxOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.checkboxConfig,this.checkboxConfig)},computeIsGroup:function(){return this.reactData.fullGroupList.some(function(e){return e.options&&e.options.length})},computeMultiMaxCharNum:function(){return _xeUtils.default.toNumber(this.multiCharOverflow)},computePopupWrapperStyle:function(){var e=this.computePopupOpts,t=e.height,e=e.width,n={};return e&&(n.width=(0,_dom.toCssUnit)(e)),t&&(n.height=(0,_dom.toCssUnit)(t),n.maxHeight=(0,_dom.toCssUnit)(t)),n},computeSelectVals:function(){var e=this.value,t=this.multiple,n=[];return _xeUtils.default.isArray(e)?n=e:t?(0,_utils.eqEmptyValue)(e)||(n=-1<"".concat(e).indexOf(",")?"".concat(e).split(","):[e]):n=null==e?[]:[e],n},computeFullLabel:function(){var t=this,e=t.reactData,n=t.remote,e=e.reactFlag,i=t.computeSelectVals;return(n&&e?i.map(function(e){return t.getRemoteSelectLabel(e)}):i.map(function(e){return t.getSelectLabel(e)})).join(", ")},computeSelectLabel:function(){var t=this,e=t.reactData,n=t.remote,i=t.multiple,e=e.reactFlag,l=t.computeMultiMaxCharNum,o=t.computeSelectVals;return n&&e?o.map(function(e){return t.getRemoteSelectLabel(e)}).join(", "):(n=o.map(function(e){return t.getSelectLabel(e)}),i&&0<l&&n.length>l?"".concat(n.slice(0,l),"..."):n.join(", "))}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$select:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},emitDefaultValue:function(e){this.emitModel(e),this.dispatchEvent("default-change",{value:e},null)},isPanelVisible:function(){return this.reactData.visiblePanel},togglePanel:function(){return this.reactData.visiblePanel?this.hideOptionPanel():this.showOptionPanel(),this.$nextTick()},hidePanel:function(){return this.reactData.visiblePanel&&this.hideOptionPanel(),this.$nextTick()},showPanel:function(){return this.reactData.visiblePanel||this.showOptionPanel(),this.$nextTick()},focus:function(){var e=this.reactData,t=this.$refs.refInput;return t&&t.blur(),e.isActivated=!0,this.$nextTick()},blur:function(){var e=this.reactData,t=this.$refs.refInput;return t&&t.blur(),e.isActivated=!1,this.$nextTick()},callSlot:function(e,t,n){var i=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=i[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,n)):[]},getOptKey:function(){return this.computeOptionOpts.keyField||this.optionId||"_X_OPTION_KEY"},getOptId:function(e){e=e[this.getOptKey()];return e?encodeURIComponent(e):""},checkMaxLimit:function(e){var t=this.multiple,n=this.max;return!(!t||!n)&&e.length>=_xeUtils.default.toNumber(n)},getRemoteSelectLabel:function(t){var e=this.internalData,n=this.lazyOptions,i=e.remoteValMaps,l=this.computeValueField,o=this.computeLabelField,i=i[t]||e.optFullValMaps[t],e=i?i.item:null;if(e)return _xeUtils.default.toValueString(e[o]);if(n){i=n.find(function(e){return e[l]===t});if(i)return i[o]}return t},getSelectLabel:function(t){var e=this,n=e.reactData,i=e.lazyOptions,l=e.internalData.optFullValMaps,o=e.computeValueField,e=e.computeLabelField,n=n.reactFlag?l[t]:null;if(n)return n.item[e];if(i){l=i.find(function(e){return e[o]===t});if(l)return l[e]}return t},getOptkey:function(){return this.computeOptionOpts.keyField||this.optionId||"_X_OPTION_KEY"},getOptid:function(e){e=e[this.getOptkey()];return e?encodeURIComponent(e):""},handleOption:function(){var t=this,e=t.reactData,n=t.internalData,i=t.remote,l=t.value,o=t.filterable,a=e.searchValue,e=n.fullData,r=n.optFullValMaps,s=t.computeLabelField,c=t.computeValueField,u=t.computeFilterOpts.filterMethod||t.filterMethod,p="".concat(a||"").toLowerCase(),f=[];return(f=i?e.filter(isOptionVisible):o&&u?e.filter(function(e){return isOptionVisible(e)&&u({$select:t,group:null,option:e,searchValue:a,value:l})}):o?e.filter(function(e){return isOptionVisible(e)&&(!p||-1<"".concat(e[s]||e[c]).toLowerCase().indexOf(p))}):e.filter(isOptionVisible)).forEach(function(e,t){e=r[e[c]];e&&(e._index=t)}),n.afterVisibleList=f,t.$nextTick()},refreshOption:function(){return this.handleOption(),this.updateYData(),this.$nextTick()},cacheItemMap:function(e){function t(e){u.push(e);var t=n.getOptId(e);t||(t=getOptUniqueId(),e[r]=t),c[e[a]]={key:t,item:e,_index:-1}}var n=this,i=n.reactData,l=n.internalData,o=n.computeGroupOptionsField,a=n.computeValueField,r=n.getOptKey(),s={},c={},u=[];e.forEach(function(e){t(e),e[o]&&(s[e[r]]=e)[o].forEach(t)}),l.fullData=u,l.optGroupKeyMaps=s,l.optFullValMaps=c,i.reactFlag++,n.handleOption()},setCurrentOption:function(e){var t=this.reactData;e&&(t.currentOption=e)},scrollToOption:function(i,l){var o=this;return o.$nextTick().then(function(){var e,t,n;i&&(e=o.$refs.refOptionWrapper,t=o.$refs.refOptionPanel.querySelector("[optid='".concat(o.getOptid(i),"']")),e)&&t&&(n=e.offsetHeight,l?t.offsetTop+t.offsetHeight-e.scrollTop>n&&(e.scrollTop=t.offsetTop+t.offsetHeight-n):(t.offsetTop+5<e.scrollTop||t.offsetTop+5>e.scrollTop+e.clientHeight)&&(e.scrollTop=t.offsetTop-5))})},updateZindex:function(){var e=this.reactData,t=this.computePopupOpts.zIndex||this.zIndex;t?e.panelIndex=_xeUtils.default.toNumber(t):e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updateZIndex:function(){var e=this.reactData;e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,a,{placement:s.placement||i,defaultPlacement:s.defaultPlacement,teleportTo:r}),t=Object.assign(e.style,{zIndex:l});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,i=t.placement,l=n.panelIndex,o=t.$refs.refElem,a=t.$refs.refOptionPanel,r=t.computeBtnTransfer,s=t.computePopupOpts;return e(),t.$nextTick().then(e)},handleScrollSelect:function(){var l=this,o=l.reactData,a=l.internalData;l.$nextTick(function(){var e=o.isAniVisible,t=o.visiblePanel,n=a.optFullValMaps,i=l.computeSelectVals;i.length&&e&&t&&(e=o.reactFlag?n["".concat(i[0])]:null)&&(o.currentOption=e.item,l.handleScrollToOption(e.item))})},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,i=e.loading,l=e.filterable,o=e.remote,a=n.fullData,r=n.hpTimeout,s=e.computeRemoteOpts,c=e.computeSelectVals;i||e.computeIsDisabled||(r&&(clearTimeout(r),n.hpTimeout=void 0),t.initialized||(t.initialized=!0,i=e.computeBtnTransfer,r=e.$refs.refOptionPanel,i&&r&&document.body.appendChild(r)),t.isActivated=!0,t.isAniVisible=!0,l&&(o&&s.enabled&&(s.autoLoad&&!a.length||a.length&&s.clearOnClose)?e.handleSearchEvent():(e.handleOption(),e.updateYData())),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch(),e.recalculate().then(function(){c&&c.length?e.handleScrollSelect():e.refreshScroll()}),e.updatePlacement()},10),setTimeout(function(){e.recalculate().then(function(){return e.refreshScroll()})},100),e.updateZIndex(),e.updatePlacement(),e.dispatchEvent("visible-change",{visible:!0},null))},hideOptionPanel:function(e){var t=this,n=t.reactData,i=t.internalData,l=t.filterable,o=t.computeFilterOpts;t.remote?t.computeRemoteOpts.clearOnClose&&(n.searchValue=""):l&&!o.clearOnClose||(n.searchValue=""),n.searchLoading=!1,n.visiblePanel=!1,i.hpTimeout=setTimeout(function(){n.isAniVisible=!1},350),t.dispatchEvent("visible-change",{visible:!1},e||null)},changeEvent:function(e,t,n){var i=this,l=i,o=i.$xeForm,a=i.formItemInfo;i.emitModel(t),t!==l.value&&(i.dispatchEvent("change",{value:t,option:n},e),o)&&a&&o.triggerItemEvent(e,a.itemConfig.field,t)},clearValueEvent:function(e,t){this.internalData.remoteValMaps={},this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e){e=e.$event;this.clearValueEvent(e,null),this.hideOptionPanel(e)},allCheckedPanelEvent:function(e){var n=this,t=n.reactData,e=e.$event,i=n.multiple,l=n.max,o=n.checkedClosable,a=t.optList,r=n.computeValueField;if(i){for(var s=n.computeSelectVals.slice(0),c=0;c<a.length&&!(()=>{var t=a[c][r];if(n.checkMaxLimit(s))return _ui.VxeUI&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.select.overSizeErr",[l]),status:"warning"}),1;s.some(function(e){return e===t})||s.push(t)})();c++);n.changeEvent(e,s,a[0]),o&&n.hideOptionPanel(e),n.dispatchEvent("all-change",{value:s},e)}},clearCheckedPanelEvent:function(e){var t=this.clearClosable,e=e.$event;this.clearValueEvent(e,null),t&&this.hideOptionPanel(e)},closePanelEvent:function(e){e=e.$event;this.hideOptionPanel(e)},changeOptionEvent:function(e,t){var n=this,i=n.reactData,l=n.multiple,o=n.internalData.remoteValMaps,a=t[n.computeValueField],r=o[a];i.visiblePanel&&(r?r.item=t:o[a]={key:n.getOptId(t),item:t,_index:-1},l?(r=[],o=n.computeSelectVals,r=-1===_xeUtils.default.findIndexOf(o,function(e){return e===a})?o.concat([a]):o.filter(function(e){return e!==a}),n.changeEvent(e,r,t)):(n.changeEvent(e,a,t),n.hideOptionPanel(e)),i.reactFlag++)},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData.visiblePanel;t.computeIsDisabled||n&&(n=t.$refs.refOptionPanel,(0,_dom.getEventTargetNode)(e,n).flag?t.updatePlacement():t.hideOptionPanel(e))},handleGlobalMousedownEvent:function(e){var t,n,i=this,l=i.reactData,o=l.visiblePanel,a=i.computePopupOpts.trigger;i.computeIsDisabled||(t=i.$refs.refElem,n=i.$refs.refOptionPanel,l.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!l.isActivated&&"manual"!==a&&i.hideOptionPanel(e))},validOffsetOption:function(e){var t=e.disabled,e=this.getOptId(e);return!t&&!this.hasOptGroupById(e)},findOffsetOption:function(e,t){var n=this,i=n.reactData,l=n.internalData,o=n.allowCreate,i=i.optList,a=l.optFullValMaps,r=l.optAddMaps,s=n.computeValueField,c=l.afterVisibleList,l=0;if(o&&i.length&&(o=i[0],r[i=n.getOptId(o)])&&(l=1,c=[r[i]].concat(c)),!e)if(t)for(var u=0;u<c.length;u++){var p=c[u];if(n.validOffsetOption(p))return p}else for(var f=c.length-1;0<=f;f--){var d=c[f];if(n.validOffsetOption(d))return d}o=0,r=e?a[e[s]]:null;if(-1<(o=r?r._index+l:o))if(t)for(var h=o+1;h<=c.length-1;h++){var v=c[h];if(n.validOffsetOption(v))return v}else if(0<o)for(var m=o-1;0<=m;m--){var g=c[m];if(n.validOffsetOption(g))return g}return null},handleGlobalKeydownEvent:function(e){var t,n,i,l,o,a,r=this,s=r.reactData,c=r.clearable,u=s.visiblePanel,p=s.currentOption,f=r.computePopupOpts.trigger;r.computeIsDisabled||(t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.TAB),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ENTER),i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),l=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),o=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.DELETE),t&&(s.isActivated=!1),u?i||t?"manual"!==f&&r.hideOptionPanel(e):n?p&&(e.preventDefault(),e.stopPropagation(),r.changeOptionEvent(e,p)):(l||o)&&(e.preventDefault(),u=(u=r.findOffsetOption(p,o))||r.findOffsetOption(null,o))&&(r.setCurrentOption(u),r.handleScrollToOption(u,o)):(l||o||n)&&s.isActivated&&(e.preventDefault(),r.showOptionPanel()),s.isActivated&&a&&c&&r.clearValueEvent(e,null))},handleGlobalBlurEvent:function(e){var t=this.reactData,n=t.visiblePanel,i=t.isActivated,l=this.computePopupOpts.trigger;n&&"manual"!==l&&this.hideOptionPanel(e),i&&(t.isActivated=!1),(n||i)&&(l=this.$refs.refInput)&&l.blur()},handleGlobalResizeEvent:function(){this.reactData.visiblePanel&&this.updatePlacement()},handleFocusSearch:function(){var t=this;t.filterable&&t.$nextTick(function(){var e=t.$refs.refInpSearch;e&&e.focus()})},focusEvent:function(e){var t=this,n=t.reactData,i=t.computePopupOpts.trigger;t.computeIsDisabled||n.visiblePanel||i&&"default"!==i||(n.triggerFocusPanel=!0,t.showOptionPanel(),setTimeout(function(){n.triggerFocusPanel=!1},500)),t.dispatchEvent("focus",{},e)},clickEvent:function(e){var t=this.reactData,n=this.computePopupOpts.trigger;n&&"default"!==n||this.togglePanelEvent(e),this.dispatchEvent("click",{triggerButton:!1,visible:t.visiblePanel},e)},blurEvent:function(e){this.reactData.isActivated=!1,this.dispatchEvent("blur",{},e)},suffixClickEvent:function(e){var t=this.reactData,n=this.computePopupOpts.trigger;n&&"default"!==n&&"icon"!==n||this.togglePanelEvent(e),this.dispatchEvent("click",{triggerButton:!0,visible:t.visiblePanel},e)},modelSearchEvent:function(e){this.reactData.searchValue=e},focusSearchEvent:function(){this.reactData.isActivated=!0},handleSearchEvent:function(){var e=this,t=e.reactData,n=e.value,i=t.searchValue,l=e.computeRemoteOpts,o=l.queryMethod||e.remoteMethod;e.remote&&o&&l.enabled?(t.searchLoading=!0,Promise.resolve(o({$select:e,searchValue:i,value:n})).then(function(){return e.$nextTick()}).catch(function(){return e.$nextTick()}).finally(function(){t.searchLoading=!1,e.handleOption(),e.updateYData()})):(e.handleOption(),e.updateYData())},triggerSearchEvent:_xeUtils.default.debounce(function(){this.handleSearchEvent()},350,{trailing:!0}),togglePanelEvent:function(e){var t=this.reactData,e=e.$event;e.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel(e):this.showOptionPanel()},checkOptionDisabled:function(e,t){return!!t.disabled||!(!this.computeIsMaximize||e)},updateYSpace:function(){var e=this.reactData,t=this.internalData,n=e.scrollYLoad,i=t.scrollYStore;e.bodyHeight=n?t.afterVisibleList.length*i.rowHeight:0,e.topSpaceHeight=n?Math.max(i.startIndex*i.rowHeight,0):0},handleData:function(){var e=this,t=e.reactData,n=e.internalData,i=e.filterable,l=e.allowCreate,o=t.scrollYLoad,a=t.searchValue,r=n.optAddMaps,s=n.scrollYStore,n=n.afterVisibleList,c=e.computeLabelField,u=e.computeValueField,o=o?n.slice(s.startIndex,s.endIndex):n.slice(0);return i&&l&&a&&(o.some(function(e){return e[c]===a})||(s=r[a]||_defineProperty(_defineProperty(_defineProperty({},e.getOptKey(),a),c,a),u,a),r[a]=s,o.unshift(s))),t.optList=o,e.$nextTick()},updateYData:function(){this.handleData(),this.updateYSpace()},computeScrollLoad:function(){var a=this,r=a.reactData,s=a.internalData;return a.$nextTick().then(function(){var e,t=r.scrollYLoad,n=s.scrollYStore,i=a.$refs.refVirtualBody,l=a.computeVirtualYOpts,o=0;(e=i?e||i.children[0]:e)&&(o=e.offsetHeight),o=Math.max(20,o),n.rowHeight=o,t?(i=a.$refs.refVirtualWrapper,e=Math.max(8,i?Math.ceil(i.clientHeight/o):0),t=Math.max(0,Math.min(2,_xeUtils.default.toNumber(l.oSize))),n.offsetSize=t,n.visibleSize=e,n.endIndex=Math.max(n.startIndex,e+t,n.endIndex),a.updateYData()):a.updateYSpace()})},handleScrollToOption:function(e,t){var n,i,l=this.internalData,o=l.optFullValMaps,l=l.scrollYStore,o=o[e[this.computeValueField]];o&&(e=o.key,-1<(o=o._index))&&(n=this.$refs.refVirtualWrapper,e=this.$refs.refOptionPanel.querySelector("[optid='".concat(e,"']")),n)&&(e?(i=n.offsetHeight,t?Math.ceil(e.offsetTop+e.offsetHeight-n.scrollTop)>=i?n.scrollTop=e.offsetTop+e.offsetHeight-i:(e.offsetTop+1<n.scrollTop||e.offsetTop+1>n.scrollTop+n.clientHeight)&&(n.scrollTop=e.offsetTop-1):e.offsetTop+1<n.scrollTop||e.offsetTop+1>n.scrollTop+n.clientHeight?n.scrollTop=e.offsetTop-1:e.offsetTop+e.offsetHeight-n.scrollTop>i&&(n.scrollTop=e.offsetTop+e.offsetHeight-i)):n.scrollTop=t?o*l.rowHeight-n.clientHeight+l.rowHeight:o*l.rowHeight)},scrollTo:function(e,t){var n=this,i=n.reactData,l=n.$refs.refVirtualWrapper;return l&&(_xeUtils.default.isNumber(e)&&(l.scrollLeft=e),_xeUtils.default.isNumber(t))&&(l.scrollTop=t),i.scrollYLoad?new Promise(function(e){setTimeout(function(){n.$nextTick(function(){e()})},50)}):n.$nextTick()},refreshScroll:function(){var e=this,t=e.internalData,n=t.lastScrollLeft,i=t.lastScrollTop;return e.clearScroll().then(function(){if(n||i)return t.lastScrollLeft=0,t.lastScrollTop=0,e.scrollTo(n,i)})},recalculate:function(){var e=this.$refs.refElem;return e&&e.clientWidth&&e.clientHeight?this.computeScrollLoad():Promise.resolve()},loadYData:function(e){var t=this.internalData.scrollYStore,n=t.startIndex,i=t.endIndex,l=t.visibleSize,o=t.offsetSize,e=e.target.scrollTop,e=Math.floor(e/t.rowHeight),a=Math.max(0,e-1-o),o=e+l+o;!(e<=n||i-l-1<=e)||n===a&&i===o||(t.startIndex=a,t.endIndex=o,this.updateYData())},isVMScrollProcess:function(){var e=this.internalData.lastScrollTime;return!!(e&&Date.now()<e+250)},scrollEvent:function(e){var t=this.reactData,n=this.internalData,i=e.target,l=i.scrollTop,i=i.scrollLeft,o=i!==n.lastScrollLeft,a=l!==n.lastScrollTop;n.lastScrollTop=l,n.lastScrollLeft=i,t.scrollYLoad&&this.loadYData(e),n.lastScrollTime=Date.now(),this.dispatchEvent("scroll",{scrollLeft:i,scrollTop:l,isX:o,isY:a},e)},loadData:function(e){var t,n=this,i=n,l=n.reactData,o=n.internalData,a=(n.cacheItemMap(e||[]),i.multiple),r=o.isLoaded,s=o.fullData,c=o.scrollYStore,u=n.computeDefaultOpts,p=n.computeVirtualYOpts,f=n.computeValueField;return Object.assign(c,{startIndex:0,endIndex:1,visibleSize:0}),o.synchData=e||[],l.scrollYLoad=!!p.enabled&&-1<p.gt&&(0===p.gt||p.gt<=s.length),n.handleData(),r||(c=u.selectMode,0<e.length&&_xeUtils.default.eqNull(i.value)&&("all"===c?a?n.$nextTick(function(){n.emitDefaultValue(e.map(function(e){return e[f]}))}):(0,_log.errLog)("vxe.error.notConflictProp",["default-config.selectMode=all","multiple=true"]):"first"!==c&&"last"!==c||(t=_xeUtils.default[c](e))&&n.$nextTick(function(){_xeUtils.default.eqNull(i.value)&&n.emitDefaultValue(t[f])}),o.isLoaded=!0)),n.computeScrollLoad().then(function(){n.refreshScroll()})},reloadData:function(e){return this.internalData.isLoaded=!1,this.clearScroll(),this.loadData(e)},clearScroll:function(){var e=this.internalData,t=this.$refs.refVirtualWrapper;return t&&(t.scrollTop=0,t.scrollLeft=0),e.lastScrollTop=0,e.lastScrollLeft=0,this.$nextTick()},hasOptGroupById:function(e){return!!this.internalData.optGroupKeyMaps[e]},renderRadio:function(e,t,n,i,l){var o=this,a=o.computeRadioOpts,r=a.showIcon,a=a.trigger;return n||!1===r?(0,_ui.renderEmptyElement)(o):(r={},a&&"default"!==a||(r.click=function(e){l||n||o.changeOptionEvent(e,t)}),e("div",{key:2,class:["vxe-select-option--radio",{"is--checked":i,"is--disabled":l}],on:r},[e("span",{class:["vxe-radio--icon",i?(0,_ui.getIcon)().RADIO_CHECKED:(0,_ui.getIcon)().RADIO_UNCHECKED]})]))},renderCheckbox:function(e,t,n,i,l){var o=this,a=o.computeCheckboxOpts,r=a.showIcon,a=a.trigger;return n||!1===r?(0,_ui.renderEmptyElement)(o):(r={},a&&"default"!==a||(r.click=function(e){l||n||o.changeOptionEvent(e,t)}),e("div",{key:3,class:["vxe-select-option--checkbox",{"is--checked":i,"is--disabled":l}],on:r},[e("span",{class:["vxe-checkbox--icon",i?(0,_ui.getIcon)().CHECKBOX_CHECKED:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})]))},renderOption:function(v,e){var m=this,t=m.$scopedSlots,g=m.allowCreate,b=m.optionKey,n=m.multiple,O=m.reactData.currentOption,x=m.internalData.optAddMaps,i=m.computeOptionOpts,_=m.computeLabelField,E=m.computeValueField,y=m.computeGroupLabelField,D=m.computeSelectVals,S=m.computeRadioOpts,P=m.computeCheckboxOpts,C=i.useKey,T=i.height,I=t.option,V=m.showCheckbox&&n,L=m.showRadio&&!n;return e.map(function(t,e){var n=t.slots,i=t.className,l=m.getOptId(t),o=t[E],a=m.hasOptGroupById(l),r=!(!g||!x[l]),s=!r&&-1<D.indexOf(o),c=r||!a||isOptionVisible(t),u=!r&&m.checkOptionDisabled(s,t),n=(n?n.default:null)||I,p={option:t,group:a?t:null,$select:m},f="",d=[],h=(V?d.push(m.renderCheckbox(v,t,a,s,u)):L&&d.push(m.renderRadio(v,t,a,s,u)),[]),h=n?m.callSlot(n,p,v):[f=(0,_utils.getFuncText)(t[a?y:_]||o)],n=(d.push(v("div",{key:1,class:"vxe-select-option--label"},h)),{mousedown:function(e){0===e.button&&e.stopPropagation()},mouseenter:function(){u||a||m.isVMScrollProcess()||m.setCurrentOption(t)}});return(V?"option"!==P.trigger:L&&"option"!==S.trigger)||(n.click=function(e){u||a||m.changeOptionEvent(e,t)}),c?v("div",{key:C||b?l:e,class:["vxe-select-option",i?_xeUtils.default.isFunction(i)?i(p):i:"",{"vxe-select-optgroup":a,"is--disabled":u,"is--selected":s,"is--add":r,"is--hover":O&&m.getOptId(O)===l}],attrs:{optid:l,title:f||null},style:T?{height:(0,_dom.toCssUnit)(T)}:void 0,on:n},g?[v("span",{key:1,class:"vxe-select-option--add-label"},d),r?v("span",{key:2,class:"vxe-select-option--add-icon"},[v("i",{class:(0,_ui.getIcon)().SELECT_ADD_OPTION})]):(0,_ui.renderEmptyElement)(m)]:d):(0,_ui.renderEmptyElement)(m)})},renderOpts:function(e){var t=this.reactData,n=t.optList;return t.searchLoading?[e("div",{class:"vxe-select--search-loading"},[e("i",{class:["vxe-select--search-icon",(0,_ui.getIcon)().SELECT_LOADED]}),e("span",{class:"vxe-select--search-text"},(0,_ui.getI18n)("vxe.select.loadingText"))])]:n.length?this.renderOption(e,n):[e("div",{class:"vxe-select--empty-placeholder"},this.emptyText||(0,_ui.getI18n)("vxe.select.emptyText"))]},renderVN:function(e){var t,n=this,i=n,l=n.$scopedSlots,o=n.reactData,a=i.className,r=i.multiple,s=i.loading,c=i.filterable,u=i.showTotalButoon,p=i.showCheckedButoon,f=i.showClearButton,d=i.showCloseButton,h=o.initialized,v=o.isActivated,m=o.isAniVisible,g=o.optList,b=o.visiblePanel,O=o.bodyHeight,x=o.topSpaceHeight,_=n.computeSize,E=n.computeIsDisabled,y=n.computeSelectLabel,D=n.computeFullLabel,S=n.computeBtnTransfer,P=n.computeInpPlaceholder,C=n.computePopupWrapperStyle,T=l.default,I=l.header,V=l.footer,L=l.prefix,l=n.computePopupOpts.className||i.popupClassName;return n.computeFormReadonly?e("div",{ref:"refElem",class:["vxe-select--readonly",a]},[e("div",{class:"vxe-select-slots",ref:"hideOption"},T?n.callSlot(T,{},e):[]),e("span",{class:"vxe-select-label",attrs:{fullLabel:D}},y)]):(t=n.computeSelectVals,e("div",{ref:"refElem",class:["vxe-select",a?_xeUtils.default.isFunction(a)?a({$select:n}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(_),_),"is--visible",b),"is--disabled",E),"is--filter",c),"is--loading",s),"is--active",v)]},[e("div",{class:"vxe-select-slots",ref:"hideOption"},T?T.call(n,{}):[]),e(_input.default,{ref:"refInput",props:{clearable:i.clearable,placeholder:P,editable:!1,disabled:E,type:"text",prefixIcon:i.prefixIcon,suffixIcon:s?(0,_ui.getIcon)().SELECT_LOADED:b?(0,_ui.getIcon)().SELECT_OPEN:(0,_ui.getIcon)().SELECT_CLOSE,autoFocus:!1,title:D,value:y},on:{clear:n.clearEvent,click:n.clickEvent,focus:n.focusEvent,blur:n.blurEvent,"suffix-click":n.suffixClickEvent},scopedSlots:L?{prefix:function(){return L({})}}:{}}),e("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-select--panel",l?_xeUtils.default.isFunction(l)?l({$select:n}):l:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(_),_),"is--transfer",S),"ani--leave",!s&&m),"ani--enter",!s&&b)],attrs:{placement:o.panelPlacement},style:o.panelStyle},h&&(b||m)?[e("div",{class:"vxe-select--panel-wrapper",style:C},[c?e("div",{class:"vxe-select--panel-search"},[e(_input.default,{ref:"refInpSearch",class:"vxe-select-search--input",props:{value:o.searchValue,type:"text",clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.select.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":n.modelSearchEvent,focus:n.focusSearchEvent,change:n.triggerSearchEvent,search:n.triggerSearchEvent}})]):(0,_ui.renderEmptyElement)(n),p&&r||f||I?e("div",{class:"vxe-select--panel-header"},I?n.callSlot(I,{},e):[e("div",{class:"vxe-tree-select--header-button"},[e("div",{class:"vxe-tree-select--header-btns"},[p&&r?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.allChecked"),mode:"text"},on:{click:n.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(n),f?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.clear"),mode:"text"},on:{click:n.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(n)])])]):(0,_ui.renderEmptyElement)(n),e("div",{class:"vxe-select--panel-body"},[e("div",{ref:"refVirtualWrapper",class:"vxe-select-option--wrapper",on:{scroll:n.scrollEvent}},[e("div",{class:"vxe-select--y-space",style:{height:O?"".concat(O,"px"):""}}),e("div",{ref:"refVirtualBody",class:"vxe-select--body",style:{transform:"translateY(".concat(x,"px)")}},n.renderOpts(e))])]),V||u||d&&r?e("div",{class:"vxe-select--panel-footer"},V?n.callSlot(V,{},e):[e("div",{class:"vxe-select--footer-button"},[u?e("div",{class:"vxe-select--total-btns"},(0,_ui.getI18n)("vxe.select.total",[t.length,g.length])):(0,_ui.renderEmptyElement)(n),d&&r?e("div",{class:"vxe-select--oper-btns"},[e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.close"),mode:"text"},on:{click:n.closePanelEvent}})]):(0,_ui.renderEmptyElement)(n)])]):(0,_ui.renderEmptyElement)(n)])]:[])]))}},watch:{"reactData.staticOptions":function(e){this.loadData(e)},options:function(e){this.loadData(e)},optionGroups:function(e){this.loadData(e)}},mounted:function(){var n=this,i=n;n.$nextTick(function(){var e=i.options,t=i.optionGroups;t?n.loadData(t):e&&n.loadData(e)}),_ui.globalEvents.on(n,"mousewheel",n.handleGlobalMousewheelEvent),_ui.globalEvents.on(n,"mousedown",n.handleGlobalMousedownEvent),_ui.globalEvents.on(n,"keydown",n.handleGlobalKeydownEvent),_ui.globalEvents.on(n,"blur",n.handleGlobalBlurEvent),_ui.globalEvents.on(n,"resize",n.handleGlobalResizeEvent)},beforeDestroy:function(){var e=this,t=e.$refs.refOptionPanel;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_ui.globalEvents.off(e,"keydown"),_ui.globalEvents.off(e,"blur"),_ui.globalEvents.off(e,"resize")},destroyed:function(){var e=this.internalData;_xeUtils.default.assign(e,createInternalData())},render:function(e){return this.renderVN(e)}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input/src/input")),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function isOptionVisible(e){return!1!==e.visible}function getOptUniqueId(){return _xeUtils.default.uniqueId("opt_")}function createInternalData(){return{synchData:[],fullData:[],afterVisibleList:[],optAddMaps:{},optGroupKeyMaps:{},optFullValMaps:{},remoteValMaps:{},lastScrollLeft:0,lastScrollTop:0,scrollYStore:{startIndex:0,endIndex:0,visibleSize:0,offsetSize:0,rowHeight:0},lastScrollTime:0,hpTimeout:void 0}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeSelect",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Boolean,Array],defaultConfig:Object,clearable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.clearable}},placeholder:String,readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},multiple:Boolean,multiCharOverflow:{type:[Number,String],default:function(){return(0,_ui.getConfig)().select.multiCharOverflow}},prefixIcon:String,allowCreate:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.allowCreate}},placement:String,lazyOptions:Array,options:Array,optionProps:Object,optionGroups:Array,optionGroupProps:Object,optionConfig:Object,className:[String,Function],popupClassName:[String,Function],max:{type:[String,Number],default:null},showRadio:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showRadio}},radioConfig:Object,showCheckbox:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCheckedButton}},checkboxConfig:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().select.size||(0,_ui.getConfig)().size}},filterable:Boolean,filterMethod:Function,filterConfig:Object,remote:Boolean,remoteConfig:Object,emptyText:String,checkedClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.checkedClosable}},clearClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.clearClosable}},showCloseButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCloseButton}},showTotalButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showTotalButton}},showCheckedButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showCheckedButton}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().select.showClearButton}},transfer:{type:Boolean,default:null},popupConfig:Object,virtualYConfig:Object,scrollY:Object,remoteMethod:Function,optionId:{type:String,default:function(){return(0,_ui.getConfig)().select.optionId}},optionKey:Boolean},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null},formItemInfo:{from:"xeFormItemInfo",default:null}},provide:function(){return{$xeSelect:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,scrollYLoad:!1,bodyHeight:0,topSpaceHeight:0,optList:[],staticOptions:[],reactFlag:1,currentOption:null,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1},internalData:createInternalData()}},computed:Object.assign(Object.assign({},{}),{computeFormReadonly:function(){var e=this.$xeForm,t=this.readonly;return null===t?!!e&&e.readonly:t},computeIsDisabled:function(){var e=this.$xeForm,t=this.disabled;return null===t?!!e&&e.disabled:t},computeBtnTransfer:function(){var e=this,t=e.$xeTable,n=e.$xeModal,i=e.$xeDrawer,l=e.$xeForm,o=e.transfer,e=e.computePopupOpts;if(_xeUtils.default.isBoolean(e.transfer))return e.transfer;if(null===o){e=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(e))return e;if(t||n||i||l)return!0}return o},computeInpPlaceholder:function(){var e=this.placeholder;return(e=e||(0,_ui.getConfig)().select.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseSelect")},computeDefaultOpts:function(){return Object.assign({},this.defaultConfig)},computePropsOpts:function(){return Object.assign({},this.optionProps)},computeGroupPropsOpts:function(){return Object.assign({},this.optionGroupProps)},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeGroupLabelField:function(){return this.computeGroupPropsOpts.label||"label"},computeGroupOptionsField:function(){return this.computeGroupPropsOpts.options||"options"},computeIsMaximize:function(){var e=this.computeSelectVals;return this.checkMaxLimit(e)},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.popupConfig,this.popupConfig)},computeVirtualYOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.virtualYConfig||(0,_ui.getConfig)().select.scrollY,this.virtualYConfig||this.scrollY)},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.filterConfig,this.filterConfig)},computeOptionOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.optionConfig,this.optionConfig)},computeRadioOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.radioConfig,this.radioConfig)},computeCheckboxOpts:function(){return Object.assign({},(0,_ui.getConfig)().select.checkboxConfig,this.checkboxConfig)},computeIsGroup:function(){return this.reactData.fullGroupList.some(function(e){return e.options&&e.options.length})},computeMultiMaxCharNum:function(){return _xeUtils.default.toNumber(this.multiCharOverflow)},computePopupWrapperStyle:function(){var e=this.computePopupOpts,t=e.height,e=e.width,n={};return e&&(n.width=(0,_dom.toCssUnit)(e)),t&&(n.height=(0,_dom.toCssUnit)(t),n.maxHeight=(0,_dom.toCssUnit)(t)),n},computeSelectVals:function(){var e=this.value,t=this.multiple,n=[];return _xeUtils.default.isArray(e)?n=e:t?(0,_utils.eqEmptyValue)(e)||(n=-1<"".concat(e).indexOf(",")?"".concat(e).split(","):[e]):n=null==e?[]:[e],n},computeFullLabel:function(){var t=this,e=t.reactData,n=t.remote,e=e.reactFlag,i=t.computeSelectVals;return(n&&e?i.map(function(e){return t.getRemoteSelectLabel(e)}):i.map(function(e){return t.getSelectLabel(e)})).join(", ")},computeSelectLabel:function(){var t=this,e=t.reactData,n=t.remote,i=t.multiple,e=e.reactFlag,l=t.computeMultiMaxCharNum,o=t.computeSelectVals;return n&&e?o.map(function(e){return t.getRemoteSelectLabel(e)}).join(", "):(n=o.map(function(e){return t.getSelectLabel(e)}),i&&0<l&&n.length>l?"".concat(n.slice(0,l),"..."):n.join(", "))}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$select:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},emitDefaultValue:function(e){this.emitModel(e),this.dispatchEvent("default-change",{value:e},null)},isPanelVisible:function(){return this.reactData.visiblePanel},togglePanel:function(){return this.reactData.visiblePanel?this.hideOptionPanel():this.showOptionPanel(),this.$nextTick()},hidePanel:function(){return this.reactData.visiblePanel&&this.hideOptionPanel(),this.$nextTick()},showPanel:function(){return this.reactData.visiblePanel||this.showOptionPanel(),this.$nextTick()},focus:function(){var e=this.reactData,t=this.$refs.refInput;return t&&t.blur(),e.isActivated=!0,this.$nextTick()},blur:function(){var e=this.reactData,t=this.$refs.refInput;return t&&t.blur(),e.isActivated=!1,this.$nextTick()},callSlot:function(e,t,n){var i=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=i[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,n)):[]},getOptKey:function(){return this.computeOptionOpts.keyField||this.optionId||"_X_OPTION_KEY"},getOptId:function(e){e=e[this.getOptKey()];return e?encodeURIComponent(e):""},checkMaxLimit:function(e){var t=this.multiple,n=this.max;return!(!t||!n)&&e.length>=_xeUtils.default.toNumber(n)},getRemoteSelectLabel:function(t){var e=this.internalData,n=this.lazyOptions,i=e.remoteValMaps,l=this.computeValueField,o=this.computeLabelField,i=i[t]||e.optFullValMaps[t],e=i?i.item:null;if(e)return _xeUtils.default.toValueString(e[o]);if(n){i=n.find(function(e){return e[l]===t});if(i)return i[o]}return t},getSelectLabel:function(t){var e=this,n=e.reactData,i=e.lazyOptions,l=e.internalData.optFullValMaps,o=e.computeValueField,e=e.computeLabelField,n=n.reactFlag?l[t]:null;if(n)return n.item[e];if(i){l=i.find(function(e){return e[o]===t});if(l)return l[e]}return t},getOptkey:function(){return this.computeOptionOpts.keyField||this.optionId||"_X_OPTION_KEY"},getOptid:function(e){e=e[this.getOptkey()];return e?encodeURIComponent(e):""},handleOption:function(){var t=this,e=t.reactData,n=t.internalData,i=t.remote,l=t.value,o=t.filterable,a=e.searchValue,e=n.fullData,r=n.optFullValMaps,s=t.computeLabelField,c=t.computeValueField,u=t.computeFilterOpts.filterMethod||t.filterMethod,p="".concat(a||"").toLowerCase(),f=[];return(f=i?e.filter(isOptionVisible):o&&u?e.filter(function(e){return isOptionVisible(e)&&u({$select:t,group:null,option:e,searchValue:a,value:l})}):o?e.filter(function(e){return isOptionVisible(e)&&(!p||-1<"".concat(e[s]||e[c]).toLowerCase().indexOf(p))}):e.filter(isOptionVisible)).forEach(function(e,t){e=r[e[c]];e&&(e._index=t)}),n.afterVisibleList=f,t.$nextTick()},refreshOption:function(){return this.handleOption(),this.updateYData(),this.$nextTick()},cacheItemMap:function(e){function t(e){u.push(e);var t=n.getOptId(e);t||(t=getOptUniqueId(),e[r]=t),c[e[a]]={key:t,item:e,_index:-1}}var n=this,i=n.reactData,l=n.internalData,o=n.computeGroupOptionsField,a=n.computeValueField,r=n.getOptKey(),s={},c={},u=[];e.forEach(function(e){t(e),e[o]&&(s[e[r]]=e)[o].forEach(t)}),l.fullData=u,l.optGroupKeyMaps=s,l.optFullValMaps=c,i.reactFlag++,n.handleOption()},setCurrentOption:function(e){var t=this.reactData;e&&(t.currentOption=e)},scrollToOption:function(i,l){var o=this;return o.$nextTick().then(function(){var e,t,n;i&&(e=o.$refs.refOptionWrapper,t=o.$refs.refOptionPanel.querySelector("[optid='".concat(o.getOptid(i),"']")),e)&&t&&(n=e.offsetHeight,l?t.offsetTop+t.offsetHeight-e.scrollTop>n&&(e.scrollTop=t.offsetTop+t.offsetHeight-n):(t.offsetTop+5<e.scrollTop||t.offsetTop+5>e.scrollTop+e.clientHeight)&&(e.scrollTop=t.offsetTop-5))})},updateZindex:function(){var e=this.reactData,t=this.computePopupOpts.zIndex||this.zIndex;t?e.panelIndex=_xeUtils.default.toNumber(t):e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updateZIndex:function(){var e=this.reactData;e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,a,{placement:s.placement||i,defaultPlacement:s.defaultPlacement,teleportTo:r}),t=Object.assign(e.style,{zIndex:l});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,i=t.placement,l=n.panelIndex,o=t.$refs.refElem,a=t.$refs.refOptionPanel,r=t.computeBtnTransfer,s=t.computePopupOpts;return e(),t.$nextTick().then(e)},handleScrollSelect:function(){var l=this,o=l.reactData,a=l.internalData;l.$nextTick(function(){var e=o.isAniVisible,t=o.visiblePanel,n=a.optFullValMaps,i=l.computeSelectVals;i.length&&e&&t&&(e=o.reactFlag?n["".concat(i[0])]:null)&&(o.currentOption=e.item,l.handleScrollToOption(e.item))})},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,i=e.loading,l=e.filterable,o=e.remote,a=n.fullData,r=n.hpTimeout,s=e.computeRemoteOpts,c=e.computeSelectVals;i||e.computeIsDisabled||(r&&(clearTimeout(r),n.hpTimeout=void 0),t.initialized||(t.initialized=!0,i=e.computeBtnTransfer,r=e.$refs.refOptionPanel,i&&r&&document.body.appendChild(r)),t.isActivated=!0,t.isAniVisible=!0,l&&(o&&s.enabled&&(s.autoLoad&&!a.length||a.length&&s.clearOnClose)?e.handleSearchEvent():(e.handleOption(),e.updateYData())),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch(),e.recalculate().then(function(){c&&c.length?e.handleScrollSelect():e.refreshScroll()}),e.updatePlacement()},10),setTimeout(function(){e.recalculate().then(function(){return e.refreshScroll()})},100),e.updateZIndex(),e.updatePlacement(),e.dispatchEvent("visible-change",{visible:!0},null))},hideOptionPanel:function(e){var t=this,n=t.reactData,i=t.internalData,l=t.filterable,o=t.computeFilterOpts;t.remote?t.computeRemoteOpts.clearOnClose&&(n.searchValue=""):l&&!o.clearOnClose||(n.searchValue=""),n.searchLoading=!1,n.visiblePanel=!1,i.hpTimeout=setTimeout(function(){n.isAniVisible=!1},350),t.dispatchEvent("visible-change",{visible:!1},e||null)},changeEvent:function(e,t,n){var i=this,l=i,o=i.$xeForm,a=i.formItemInfo;i.emitModel(t),t!==l.value&&(i.dispatchEvent("change",{value:t,option:n},e),o)&&a&&o.triggerItemEvent(e,a.itemConfig.field,t)},clearValueEvent:function(e,t){this.internalData.remoteValMaps={},this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e){e=e.$event;this.clearValueEvent(e,null),this.hideOptionPanel(e)},allCheckedPanelEvent:function(e){var n=this,t=n.reactData,e=e.$event,i=n.multiple,l=n.max,o=n.checkedClosable,a=t.optList,r=n.computeValueField;if(i){for(var s=n.computeSelectVals.slice(0),c=0;c<a.length&&!(()=>{var t=a[c][r];if(n.checkMaxLimit(s))return _ui.VxeUI&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.select.overSizeErr",[l]),status:"warning"}),1;s.some(function(e){return e===t})||s.push(t)})();c++);n.changeEvent(e,s,a[0]),o&&n.hideOptionPanel(e),n.dispatchEvent("all-change",{value:s},e)}},clearCheckedPanelEvent:function(e){var t=this.clearClosable,e=e.$event;this.clearValueEvent(e,null),t&&this.hideOptionPanel(e)},closePanelEvent:function(e){e=e.$event;this.hideOptionPanel(e)},changeOptionEvent:function(e,t){var n=this,i=n.reactData,l=n.multiple,o=n.internalData.remoteValMaps,a=t[n.computeValueField],r=o[a];i.visiblePanel&&(r?r.item=t:o[a]={key:n.getOptId(t),item:t,_index:-1},l?(r=[],o=n.computeSelectVals,r=-1===_xeUtils.default.findIndexOf(o,function(e){return e===a})?o.concat([a]):o.filter(function(e){return e!==a}),n.changeEvent(e,r,t)):(n.changeEvent(e,a,t),n.hideOptionPanel(e)),i.reactFlag++)},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData.visiblePanel;t.computeIsDisabled||n&&(n=t.$refs.refOptionPanel,(0,_dom.getEventTargetNode)(e,n).flag?t.updatePlacement():t.hideOptionPanel(e))},handleGlobalMousedownEvent:function(e){var t,n,i=this,l=i.reactData,o=l.visiblePanel,a=i.computePopupOpts.trigger;i.computeIsDisabled||(t=i.$refs.refElem,n=i.$refs.refOptionPanel,l.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!l.isActivated&&"manual"!==a&&i.hideOptionPanel(e))},validOffsetOption:function(e){var t=e.disabled,e=this.getOptId(e);return!t&&!this.hasOptGroupById(e)},findOffsetOption:function(e,t){var n=this,i=n.reactData,l=n.internalData,o=n.allowCreate,i=i.optList,a=l.optFullValMaps,r=l.optAddMaps,s=n.computeValueField,c=l.afterVisibleList,l=0;if(o&&i.length&&(o=i[0],r[i=n.getOptId(o)])&&(l=1,c=[r[i]].concat(c)),!e)if(t)for(var u=0;u<c.length;u++){var p=c[u];if(n.validOffsetOption(p))return p}else for(var f=c.length-1;0<=f;f--){var d=c[f];if(n.validOffsetOption(d))return d}o=0,r=e?a[e[s]]:null;if(-1<(o=r?r._index+l:o))if(t)for(var h=o+1;h<=c.length-1;h++){var v=c[h];if(n.validOffsetOption(v))return v}else if(0<o)for(var m=o-1;0<=m;m--){var g=c[m];if(n.validOffsetOption(g))return g}return null},handleGlobalKeydownEvent:function(e){var t,n,i,l,o,a,r=this,s=r.reactData,c=r.clearable,u=s.visiblePanel,p=s.currentOption,f=r.computePopupOpts.trigger;r.computeIsDisabled||(t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.TAB),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ENTER),i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),l=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),o=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.DELETE),t&&(s.isActivated=!1),u?i||t?"manual"!==f&&r.hideOptionPanel(e):n?p&&(e.preventDefault(),e.stopPropagation(),r.changeOptionEvent(e,p)):(l||o)&&(e.preventDefault(),u=(u=r.findOffsetOption(p,o))||r.findOffsetOption(null,o))&&(r.setCurrentOption(u),r.handleScrollToOption(u,o)):(l||o||n)&&s.isActivated&&(e.preventDefault(),r.showOptionPanel()),s.isActivated&&a&&c&&r.clearValueEvent(e,null))},handleGlobalBlurEvent:function(e){var t=this.reactData,n=t.visiblePanel,i=t.isActivated,l=this.computePopupOpts.trigger;n&&"manual"!==l&&this.hideOptionPanel(e),i&&(t.isActivated=!1),(n||i)&&(l=this.$refs.refInput)&&l.blur()},handleGlobalResizeEvent:function(){this.reactData.visiblePanel&&this.updatePlacement()},handleFocusSearch:function(){var t=this;t.filterable&&t.$nextTick(function(){var e=t.$refs.refInpSearch;e&&e.focus()})},focusEvent:function(e){var t=this,n=t.reactData,i=t.computePopupOpts.trigger;t.computeIsDisabled||n.visiblePanel||i&&"default"!==i||(n.triggerFocusPanel=!0,t.showOptionPanel(),setTimeout(function(){n.triggerFocusPanel=!1},500)),t.dispatchEvent("focus",{},e)},clickEvent:function(e){var t=this.reactData,n=this.computePopupOpts.trigger;n&&"default"!==n||this.togglePanelEvent(e),this.dispatchEvent("click",{triggerButton:!1,visible:t.visiblePanel},e)},blurEvent:function(e){this.reactData.isActivated=!1,this.dispatchEvent("blur",{},e)},suffixClickEvent:function(e){var t=this.reactData,n=this.computePopupOpts.trigger;n&&"default"!==n&&"icon"!==n||this.togglePanelEvent(e),this.dispatchEvent("click",{triggerButton:!0,visible:t.visiblePanel},e)},modelSearchEvent:function(e){this.reactData.searchValue=e},focusSearchEvent:function(){this.reactData.isActivated=!0},handleSearchEvent:function(){var e=this,t=e.reactData,n=e.value,i=t.searchValue,l=e.computeRemoteOpts,o=l.queryMethod||e.remoteMethod;e.remote&&o&&l.enabled?(t.searchLoading=!0,Promise.resolve(o({$select:e,searchValue:i,value:n})).then(function(){return e.$nextTick()}).catch(function(){return e.$nextTick()}).finally(function(){t.searchLoading=!1,e.handleOption(),e.updateYData()})):(e.handleOption(),e.updateYData())},triggerSearchEvent:_xeUtils.default.debounce(function(){this.handleSearchEvent()},350,{trailing:!0}),togglePanelEvent:function(e){var t=this.reactData,e=e.$event;e.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel(e):this.showOptionPanel()},checkOptionDisabled:function(e,t){return!!t.disabled||!(!this.computeIsMaximize||e)},updateYSpace:function(){var e=this.reactData,t=this.internalData,n=e.scrollYLoad,i=t.scrollYStore;e.bodyHeight=n?t.afterVisibleList.length*i.rowHeight:0,e.topSpaceHeight=n?Math.max(i.startIndex*i.rowHeight,0):0},handleData:function(){var e=this,t=e.reactData,n=e.internalData,i=e.filterable,l=e.allowCreate,o=t.scrollYLoad,a=t.searchValue,r=n.optAddMaps,s=n.scrollYStore,n=n.afterVisibleList,c=e.computeLabelField,u=e.computeValueField,o=o?n.slice(s.startIndex,s.endIndex):n.slice(0);return i&&l&&a&&(o.some(function(e){return e[c]===a})||(s=r[a]||_defineProperty(_defineProperty(_defineProperty({},e.getOptKey(),a),c,a),u,a),r[a]=s,o.unshift(s))),t.optList=o,e.$nextTick()},updateYData:function(){this.handleData(),this.updateYSpace()},computeScrollLoad:function(){var a=this,r=a.reactData,s=a.internalData;return a.$nextTick().then(function(){var e,t=r.scrollYLoad,n=s.scrollYStore,i=a.$refs.refVirtualBody,l=a.computeVirtualYOpts,o=0;(e=i?e||i.children[0]:e)&&(o=e.offsetHeight),o=Math.max(20,o),n.rowHeight=o,t?(i=a.$refs.refVirtualWrapper,e=Math.max(8,i?Math.ceil(i.clientHeight/o):0),t=Math.max(0,Math.min(2,_xeUtils.default.toNumber(l.oSize))),n.offsetSize=t,n.visibleSize=e,n.endIndex=Math.max(n.startIndex,e+t,n.endIndex),a.updateYData()):a.updateYSpace()})},handleScrollToOption:function(e,t){var n,i,l=this.internalData,o=l.optFullValMaps,l=l.scrollYStore,o=o[e[this.computeValueField]];o&&(e=o.key,-1<(o=o._index))&&(n=this.$refs.refVirtualWrapper,e=this.$refs.refOptionPanel.querySelector("[optid='".concat(e,"']")),n)&&(e?(i=n.offsetHeight,t?Math.ceil(e.offsetTop+e.offsetHeight-n.scrollTop)>=i?n.scrollTop=e.offsetTop+e.offsetHeight-i:(e.offsetTop+1<n.scrollTop||e.offsetTop+1>n.scrollTop+n.clientHeight)&&(n.scrollTop=e.offsetTop-1):e.offsetTop+1<n.scrollTop||e.offsetTop+1>n.scrollTop+n.clientHeight?n.scrollTop=e.offsetTop-1:e.offsetTop+e.offsetHeight-n.scrollTop>i&&(n.scrollTop=e.offsetTop+e.offsetHeight-i)):n.scrollTop=t?o*l.rowHeight-n.clientHeight+l.rowHeight:o*l.rowHeight)},scrollTo:function(e,t){var n=this,i=n.reactData,l=n.$refs.refVirtualWrapper;return l&&(_xeUtils.default.isNumber(e)&&(l.scrollLeft=e),_xeUtils.default.isNumber(t))&&(l.scrollTop=t),i.scrollYLoad?new Promise(function(e){setTimeout(function(){n.$nextTick(function(){e()})},50)}):n.$nextTick()},refreshScroll:function(){var e=this,t=e.internalData,n=t.lastScrollLeft,i=t.lastScrollTop;return e.clearScroll().then(function(){if(n||i)return t.lastScrollLeft=0,t.lastScrollTop=0,e.scrollTo(n,i)})},recalculate:function(){var e=this.$refs.refElem;return e&&e.clientWidth&&e.clientHeight?this.computeScrollLoad():Promise.resolve()},loadYData:function(e){var t=this.internalData.scrollYStore,n=t.startIndex,i=t.endIndex,l=t.visibleSize,o=t.offsetSize,e=e.target.scrollTop,e=Math.floor(e/t.rowHeight),a=Math.max(0,e-1-o),o=e+l+o;!(e<=n||i-l-1<=e)||n===a&&i===o||(t.startIndex=a,t.endIndex=o,this.updateYData())},isVMScrollProcess:function(){var e=this.internalData.lastScrollTime;return!!(e&&Date.now()<e+250)},scrollEvent:function(e){var t=this.reactData,n=this.internalData,i=e.target,l=i.scrollTop,i=i.scrollLeft,o=i!==n.lastScrollLeft,a=l!==n.lastScrollTop;n.lastScrollTop=l,n.lastScrollLeft=i,t.scrollYLoad&&this.loadYData(e),n.lastScrollTime=Date.now(),this.dispatchEvent("scroll",{scrollLeft:i,scrollTop:l,isX:o,isY:a},e)},loadData:function(e){var t,n=this,i=n,l=n.reactData,o=n.internalData,a=(n.cacheItemMap(e||[]),i.multiple),r=o.isLoaded,s=o.fullData,c=o.scrollYStore,u=n.computeDefaultOpts,p=n.computeVirtualYOpts,f=n.computeValueField;return Object.assign(c,{startIndex:0,endIndex:1,visibleSize:0}),o.synchData=e||[],l.scrollYLoad=!!p.enabled&&-1<p.gt&&(0===p.gt||p.gt<=s.length),n.handleData(),r||(c=u.selectMode,0<e.length&&_xeUtils.default.eqNull(i.value)&&("all"===c?a?n.$nextTick(function(){n.emitDefaultValue(e.map(function(e){return e[f]}))}):(0,_log.errLog)("vxe.error.notConflictProp",["default-config.selectMode=all","multiple=true"]):"first"!==c&&"last"!==c||(t=_xeUtils.default[c](e))&&n.$nextTick(function(){_xeUtils.default.eqNull(i.value)&&n.emitDefaultValue(t[f])}),o.isLoaded=!0)),n.computeScrollLoad().then(function(){n.refreshScroll()})},reloadData:function(e){return this.internalData.isLoaded=!1,this.clearScroll(),this.loadData(e)},clearScroll:function(){var e=this.internalData,t=this.$refs.refVirtualWrapper;return t&&(t.scrollTop=0,t.scrollLeft=0),e.lastScrollTop=0,e.lastScrollLeft=0,this.$nextTick()},hasOptGroupById:function(e){return!!this.internalData.optGroupKeyMaps[e]},renderRadio:function(e,t,n,i,l){var o=this,a=o.computeRadioOpts,r=a.showIcon,a=a.trigger;return n||!1===r?(0,_ui.renderEmptyElement)(o):(r={},a&&"default"!==a||(r.click=function(e){l||n||o.changeOptionEvent(e,t)}),e("div",{key:2,class:["vxe-select-option--radio",{"is--checked":i,"is--disabled":l}],on:r},[e("span",{class:["vxe-radio--icon",i?(0,_ui.getIcon)().RADIO_CHECKED:(0,_ui.getIcon)().RADIO_UNCHECKED]})]))},renderCheckbox:function(e,t,n,i,l){var o=this,a=o.computeCheckboxOpts,r=a.showIcon,a=a.trigger;return n||!1===r?(0,_ui.renderEmptyElement)(o):(r={},a&&"default"!==a||(r.click=function(e){l||n||o.changeOptionEvent(e,t)}),e("div",{key:3,class:["vxe-select-option--checkbox",{"is--checked":i,"is--disabled":l}],on:r},[e("span",{class:["vxe-checkbox--icon",i?(0,_ui.getIcon)().CHECKBOX_CHECKED:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})]))},renderOption:function(v,e){var m=this,t=m.$scopedSlots,g=m.allowCreate,b=m.optionKey,n=m.multiple,O=m.reactData.currentOption,x=m.internalData.optAddMaps,i=m.computeOptionOpts,_=m.computeLabelField,E=m.computeValueField,y=m.computeGroupLabelField,D=m.computeSelectVals,S=m.computeRadioOpts,P=m.computeCheckboxOpts,C=i.useKey,T=i.height,I=t.option,V=m.showCheckbox&&n,L=m.showRadio&&!n;return e.map(function(t,e){var n=t.slots,i=t.className,l=m.getOptId(t),o=t[E],a=m.hasOptGroupById(l),r=!(!g||!x[l]),s=!r&&-1<D.indexOf(o),c=r||!a||isOptionVisible(t),u=!r&&m.checkOptionDisabled(s,t),n=(n?n.default:null)||I,p={option:t,group:a?t:null,$select:m},f="",d=[],h=(V?d.push(m.renderCheckbox(v,t,a,s,u)):L&&d.push(m.renderRadio(v,t,a,s,u)),[]),h=n?m.callSlot(n,p,v):[f=(0,_utils.getFuncText)(t[a?y:_]||o)],n=(d.push(v("div",{key:1,class:"vxe-select-option--label"},h)),{mousedown:function(e){0===e.button&&e.stopPropagation()},mouseenter:function(){u||a||m.isVMScrollProcess()||m.setCurrentOption(t)}});return(V?"option"!==P.trigger:L&&"option"!==S.trigger)||(n.click=function(e){u||a||m.changeOptionEvent(e,t)}),c?v("div",{key:C||b?l:e,class:["vxe-select-option",i?_xeUtils.default.isFunction(i)?i(p):i:"",{"vxe-select-optgroup":a,"is--disabled":u,"is--selected":s,"is--add":r,"is--hover":O&&m.getOptId(O)===l}],attrs:{optid:l,title:f||null},style:T?{height:(0,_dom.toCssUnit)(T)}:void 0,on:n},g?[v("span",{key:1,class:"vxe-select-option--add-label"},d),r?v("span",{key:2,class:"vxe-select-option--add-icon"},[v("i",{class:(0,_ui.getIcon)().SELECT_ADD_OPTION})]):(0,_ui.renderEmptyElement)(m)]:d):(0,_ui.renderEmptyElement)(m)})},renderOpts:function(e){var t=this.reactData,n=t.optList;return t.searchLoading?[e("div",{class:"vxe-select--search-loading"},[e("i",{class:["vxe-select--search-icon",(0,_ui.getIcon)().SELECT_LOADED]}),e("span",{class:"vxe-select--search-text"},(0,_ui.getI18n)("vxe.select.loadingText"))])]:n.length?this.renderOption(e,n):[e("div",{class:"vxe-select--empty-placeholder"},this.emptyText||(0,_ui.getI18n)("vxe.select.emptyText"))]},renderVN:function(e){var t,n=this,i=n,l=n.$scopedSlots,o=n.reactData,a=i.className,r=i.multiple,s=i.loading,c=i.filterable,u=i.showTotalButton,p=i.showCheckedButton,f=i.showClearButton,d=i.showCloseButton,h=o.initialized,v=o.isActivated,m=o.isAniVisible,g=o.optList,b=o.visiblePanel,O=o.bodyHeight,x=o.topSpaceHeight,_=n.computeSize,E=n.computeIsDisabled,y=n.computeSelectLabel,D=n.computeFullLabel,S=n.computeBtnTransfer,P=n.computeInpPlaceholder,C=n.computePopupWrapperStyle,T=l.default,I=l.header,V=l.footer,L=l.prefix,l=n.computePopupOpts.className||i.popupClassName;return n.computeFormReadonly?e("div",{ref:"refElem",class:["vxe-select--readonly",a]},[e("div",{class:"vxe-select-slots",ref:"hideOption"},T?n.callSlot(T,{},e):[]),e("span",{class:"vxe-select-label",attrs:{fullLabel:D}},y)]):(t=n.computeSelectVals,e("div",{ref:"refElem",class:["vxe-select",a?_xeUtils.default.isFunction(a)?a({$select:n}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(_),_),"is--visible",b),"is--disabled",E),"is--filter",c),"is--loading",s),"is--active",v)]},[e("div",{class:"vxe-select-slots",ref:"hideOption"},T?T.call(n,{}):[]),e(_input.default,{ref:"refInput",props:{clearable:i.clearable,placeholder:P,editable:!1,disabled:E,type:"text",prefixIcon:i.prefixIcon,suffixIcon:s?(0,_ui.getIcon)().SELECT_LOADED:b?(0,_ui.getIcon)().SELECT_OPEN:(0,_ui.getIcon)().SELECT_CLOSE,autoFocus:!1,title:D,value:y},on:{clear:n.clearEvent,click:n.clickEvent,focus:n.focusEvent,blur:n.blurEvent,"suffix-click":n.suffixClickEvent},scopedSlots:L?{prefix:function(){return L({})}}:{}}),e("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-select--panel",l?_xeUtils.default.isFunction(l)?l({$select:n}):l:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(_),_),"is--transfer",S),"ani--leave",!s&&m),"ani--enter",!s&&b)],attrs:{placement:o.panelPlacement},style:o.panelStyle},h&&(b||m)?[e("div",{class:"vxe-select--panel-wrapper",style:C},[c?e("div",{class:"vxe-select--panel-search"},[e(_input.default,{ref:"refInpSearch",class:"vxe-select-search--input",props:{value:o.searchValue,type:"text",clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.select.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":n.modelSearchEvent,focus:n.focusSearchEvent,change:n.triggerSearchEvent,search:n.triggerSearchEvent}})]):(0,_ui.renderEmptyElement)(n),p&&r||f||I?e("div",{class:"vxe-select--panel-header"},I?n.callSlot(I,{},e):[e("div",{class:"vxe-tree-select--header-button"},[e("div",{class:"vxe-tree-select--header-btns"},[p&&r?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.allChecked"),mode:"text"},on:{click:n.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(n),f?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.clear"),mode:"text"},on:{click:n.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(n)])])]):(0,_ui.renderEmptyElement)(n),e("div",{class:"vxe-select--panel-body"},[e("div",{ref:"refVirtualWrapper",class:"vxe-select-option--wrapper",on:{scroll:n.scrollEvent}},[e("div",{class:"vxe-select--y-space",style:{height:O?"".concat(O,"px"):""}}),e("div",{ref:"refVirtualBody",class:"vxe-select--body",style:{transform:"translateY(".concat(x,"px)")}},n.renderOpts(e))])]),V||u||d&&r?e("div",{class:"vxe-select--panel-footer"},V?n.callSlot(V,{},e):[e("div",{class:"vxe-select--footer-button"},[u?e("div",{class:"vxe-select--total-btns"},(0,_ui.getI18n)("vxe.select.total",[t.length,g.length])):(0,_ui.renderEmptyElement)(n),d&&r?e("div",{class:"vxe-select--oper-btns"},[e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.close"),mode:"text"},on:{click:n.closePanelEvent}})]):(0,_ui.renderEmptyElement)(n)])]):(0,_ui.renderEmptyElement)(n)])]:[])]))}},watch:{"reactData.staticOptions":function(e){this.loadData(e)},options:function(e){this.loadData(e)},optionGroups:function(e){this.loadData(e)}},mounted:function(){var n=this,i=n;n.$nextTick(function(){var e=i.options,t=i.optionGroups;t?n.loadData(t):e&&n.loadData(e)}),_ui.globalEvents.on(n,"mousewheel",n.handleGlobalMousewheelEvent),_ui.globalEvents.on(n,"mousedown",n.handleGlobalMousedownEvent),_ui.globalEvents.on(n,"keydown",n.handleGlobalKeydownEvent),_ui.globalEvents.on(n,"blur",n.handleGlobalBlurEvent),_ui.globalEvents.on(n,"resize",n.handleGlobalResizeEvent)},beforeDestroy:function(){var e=this,t=e.$refs.refOptionPanel;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_ui.globalEvents.off(e,"keydown"),_ui.globalEvents.off(e,"blur"),_ui.globalEvents.off(e,"resize")},destroyed:function(){var e=this.internalData;_xeUtils.default.assign(e,createInternalData())},render:function(e){return this.renderVN(e)}});
|
|
@@ -142,16 +142,16 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
142
142
|
return (0, _ui.getConfig)().treeSelect.showCloseButton;
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
|
|
145
|
+
showTotalButton: {
|
|
146
146
|
type: Boolean,
|
|
147
147
|
default: function _default() {
|
|
148
|
-
return (0, _ui.getConfig)().treeSelect.
|
|
148
|
+
return (0, _ui.getConfig)().treeSelect.showTotalButton;
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
|
|
151
|
+
showCheckedButton: {
|
|
152
152
|
type: Boolean,
|
|
153
153
|
default: function _default() {
|
|
154
|
-
return (0, _ui.getConfig)().treeSelect.
|
|
154
|
+
return (0, _ui.getConfig)().treeSelect.showCheckedButton;
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
showClearButton: {
|
|
@@ -886,8 +886,8 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
886
886
|
loading = props.loading,
|
|
887
887
|
menuConfig = props.menuConfig,
|
|
888
888
|
filterable = props.filterable,
|
|
889
|
-
|
|
890
|
-
|
|
889
|
+
showTotalButton = props.showTotalButton,
|
|
890
|
+
showCheckedButton = props.showCheckedButton,
|
|
891
891
|
showClearButton = props.showClearButton,
|
|
892
892
|
showExpandButton = props.showExpandButton,
|
|
893
893
|
showCloseButton = props.showCloseButton;
|
|
@@ -1009,13 +1009,13 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1009
1009
|
on: {
|
|
1010
1010
|
'model-value': $xeTreeSelect.modelSearchEvent
|
|
1011
1011
|
}
|
|
1012
|
-
})]) : (0, _ui.renderEmptyElement)($xeTreeSelect),
|
|
1012
|
+
})]) : (0, _ui.renderEmptyElement)($xeTreeSelect), showCheckedButton && multiple || showClearButton || showExpandButton || headerSlot ? h('div', {
|
|
1013
1013
|
class: 'vxe-tree-select--panel-header'
|
|
1014
1014
|
}, headerSlot ? headerSlot({}) : [h('div', {
|
|
1015
1015
|
class: 'vxe-tree-select--header-button'
|
|
1016
|
-
}, [
|
|
1016
|
+
}, [showCheckedButton && showClearButton ? h('div', {
|
|
1017
1017
|
class: 'vxe-tree-select--selected-btns'
|
|
1018
|
-
}, [
|
|
1018
|
+
}, [showCheckedButton && multiple ? h(_button.default, {
|
|
1019
1019
|
props: {
|
|
1020
1020
|
content: (0, _ui.getI18n)('vxe.treeSelect.allChecked'),
|
|
1021
1021
|
mode: 'text'
|
|
@@ -1106,11 +1106,11 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1106
1106
|
'load-success': $xeTreeSelect.loadSuccessEvent
|
|
1107
1107
|
},
|
|
1108
1108
|
scopedSlots: treeScopedSlots
|
|
1109
|
-
})])]), footerSlot ||
|
|
1109
|
+
})])]), footerSlot || showTotalButton || showCloseButton && multiple ? h('div', {
|
|
1110
1110
|
class: 'vxe-tree-select--panel-footer'
|
|
1111
1111
|
}, footerSlot ? footerSlot({}) : [h('div', {
|
|
1112
1112
|
class: 'vxe-tree-select--footer-button'
|
|
1113
|
-
}, [
|
|
1113
|
+
}, [showTotalButton ? h('div', {
|
|
1114
1114
|
class: 'vxe-tree-select--total-btns'
|
|
1115
1115
|
}, (0, _ui.getI18n)('vxe.treeSelect.total', [selectVals.length])) : (0, _ui.renderEmptyElement)($xeTreeSelect), showCloseButton && multiple ? h('div', {
|
|
1116
1116
|
class: 'vxe-tree-select--oper-btns'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_util=require("../../tree/src/util"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input")),_button=_interopRequireDefault(require("../../button")),_tree=_interopRequireDefault(require("../../tree")),_vn=require("../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createReactData(){return{initialized:!1,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1,fullOptFlag:1,lazyOptFlag:1}}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{},lazyNodeMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTreeSelect",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Array],clearable:{type:Boolean,default:(0,_ui.getConfig)().treeSelect.clearable},placeholder:{type:String,default:function(){return _xeUtils.default.eqNull((0,_ui.getConfig)().treeSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().treeSelect.placeholder}},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},showFullLabel:{type:Boolean,default:(0,_ui.getConfig)().treeSelect.showFullLabel},separator:{type:String,default:(0,_ui.getConfig)().treeSelect.separator},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],popupClassName:[String,Function],prefixIcon:String,placement:String,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().treeSelect.size||(0,_ui.getConfig)().size}},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,menuConfig:Object,virtualYConfig:Object,autoClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.autoClose}},checkedClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.checkedClosable}},clearClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.clearClosable}},showCloseButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showCloseButton}},showTotalButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showTotalButoon}},showCheckedButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showCheckedButoon}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showClearButton}},showExpandButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showExpandButton}},transfer:{type:Boolean,default:null},remoteMethod:Function},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null},formItemInfo:{from:"xeFormItemInfo",default:null}},provide:function(){return{$xeTreeSelect:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:createReactData(),internalData:createInternalData()}},computed:Object.assign(Object.assign({},{}),{computeFormReadonly:function(){var e=this.$xeForm,t=this.readonly;return null===t?!!e&&e.readonly:t},computeIsDisabled:function(){var e=this.$xeForm,t=this.disabled;return null===t?!!e&&e.disabled:t},computeBtnTransfer:function(){var e=this,t=e.$xeTable,n=e.$xeModal,l=e.$xeDrawer,i=e.$xeForm,o=e.transfer,e=e.computePopupOpts;if(_xeUtils.default.isBoolean(e.transfer))return e.transfer;if(null===o){e=(0,_ui.getConfig)().treeSelect.transfer;if(_xeUtils.default.isBoolean(e))return e;if(t||n||l||i)return!0}return o},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.popupConfig,this.popupConfig)},computeTreeOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.treeConfig,this.treeConfig)},computeMenuOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.menuConfig,this.menuConfig)},computeTreeNodeOpts:function(){var e=this.computeTreeOpts;return Object.assign({isHover:!0},e.nodeConfig)},computeTreeCheckboxOpts:function(){var e=this.computeTreeOpts;return Object.assign({showIcon:!!e.showCheckbox},e.checkboxConfig,{trigger:"node"})},computeTreeRadioOpts:function(){var e=this.computeTreeOpts;return Object.assign({showIcon:!!e.showRadio},e.radioConfig,{trigger:"node"})},computePropsOpts:function(){return Object.assign({},this.optionProps)},computeNodeKeyField:function(){return this.computeTreeOpts.keyField||"id"},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeChildrenField:function(){return this.computePropsOpts.children||"children"},computeNodeParentField:function(){var e=this.computePropsOpts,t=this.computeTreeOpts;return e.parent||t.parentField||"parentId"},computeHasChildField:function(){return this.computePropsOpts.hasChild||"hasChild"},computeVirtualYOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.virtualYConfig,this.virtualYConfig)},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){var e=this.computeTreeOpts;return Object.assign({},e.filterConfig,this.filterConfig)},computeSelectLabel:function(){var e=this.reactData,t=this.internalData,n=this.value,l=this.showFullLabel,i=e.fullOptFlag,o=e.lazyOptFlag,a=t.fullNodeMaps,r=t.lazyNodeMaps,u=this.computeLabelField;return(_xeUtils.default.eqNull(n)?[]:_xeUtils.default.isArray(n)?n:[n]).map(function(e){var t=a[e];if(i&&t)return l?t.fullLabel:t.item[u];if(o){t=r[e];if(t)return l?t.fullLabel:t.item[u]}return e}).join(", ")},computePopupWrapperStyle:function(){var e=this.computePopupOpts,t=e.height,e=e.width,n={};return e&&(n.width=(0,_dom.toCssUnit)(e)),t&&(n.height=(0,_dom.toCssUnit)(t),n.maxHeight=(0,_dom.toCssUnit)(t)),n}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$treeSelect:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},callSlot:function(e,t,n){var l=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=l[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,n)):[]},getNodeid:function(e){e=e[this.computeNodeKeyField];return e?encodeURIComponent(e):""},handleCacheMap:function(e){function t(e,t,n,l,i,o){var a=(a=r.getNodeid(e))||getOptUniqueId(),a=(f[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(c),a]),f[a]=!0,e[s]);p[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(s),a]),p[a]={item:e,index:t,items:n,parent:i,nodes:o,fullLabel:o.map(function(e){return e[d]}).join((u||"/")+" ")}}var r=this,u=r.separator,n=r.computeTreeOpts,c=r.computeNodeKeyField,l=r.computeChildrenField,s=r.computeValueField,d=r.computeLabelField,i=n.transform,p={},f={};return e&&(i?(i=_xeUtils.default.toArrayTree(e,{key:c,parentKey:r.computeNodeParentField,mapChildren:l,rootParentValue:n.rootParentValue,rootValues:n.rootValues}),_xeUtils.default.eachTree(i,t,{children:l})):_xeUtils.default.eachTree(e,t,{children:l})),p},cacheDataMap:function(){var e=this.reactData,t=this.internalData,n=this.options;t.fullNodeMaps=this.handleCacheMap(n||[]),t.fullOptionList=n||[],e.fullOptFlag++},cacheLazyDataMap:function(){var e=this.reactData,t=this.internalData,n=this.lazyOptions;t.lazyNodeMaps=this.handleCacheMap(n||[]),e.lazyOptFlag++},updateZindex:function(){var e=this.reactData,t=this.computePopupOpts.zIndex||this.zIndex;t?e.panelIndex=_xeUtils.default.toNumber(t):e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,a,{placement:u.placement||l,defaultPlacement:u.defaultPlacement,teleportTo:r}),t=Object.assign(e.style,{zIndex:i});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,l=t.placement,i=n.panelIndex,o=t.$refs.refElem,a=t.$refs.refOptionPanel,r=t.computeBtnTransfer,u=t.computePopupOpts;return e(),t.$nextTick().then(e)},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,l=e.loading,i=e.remote,o=e.filterable,a=n.fullOptionList,r=e.computeRemoteOpts;l||e.computeIsDisabled||(n.hpTimeout&&clearTimeout(n.hpTimeout),t.initialized||(t.initialized=!0,l=e.computeBtnTransfer,n=e.$refs.refOptionPanel,l&&n&&document.body.appendChild(n)),t.isActivated=!0,t.isAniVisible=!0,o&&i&&r.enabled&&r.autoLoad&&!a.length&&e.handleSearchEvent(),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch(),e.updatePlacement()},10),e.updateZindex(),e.updatePlacement(),e.dispatchEvent("visible-change",{visible:!0},null))},hideOptionPanel:function(e){var t=this.reactData,n=this.internalData;t.visiblePanel=!1,n.hpTimeout=setTimeout(function(){t.isAniVisible=!1},350),this.dispatchEvent("visible-change",{visible:!1},e||null)},changeEvent:function(e,t,n){var l=this,i=l,o=l.$xeForm,a=l.formItemInfo,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);l.emitModel(t),t!==i.value&&(l.dispatchEvent("change",{value:t,node:n,option:n},e),o)&&a&&o.triggerItemEvent(e,a.itemConfig.field,t)},clearValueEvent:function(e,t){this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e){e=e.$event;this.clearValueEvent(e,null),this.hideOptionPanel(e)},allCheckedPanelEvent:function(e){var n=this,l=e.$event,e=n.multiple,i=n.autoClose,o=n.checkedClosable,t=n.$refs.refTree;e&&t&&t.setAllCheckboxNode(!0).then(function(e){var t=e.checkNodeKeys;n.changeEvent(l,t,e.checkNodes[0]),n.dispatchEvent("all-change",{value:t},l),(_xeUtils.default.isBoolean(i)?i:o)&&n.hideOptionPanel(l)})},clearCheckedPanelEvent:function(e){var t=this,n=e.$event,e=t.multiple,l=t.autoClose,i=t.clearClosable,o=t.$refs.refTree;o&&(e=e?[]:null,o.clearCheckboxNode().then(function(){(_xeUtils.default.isBoolean(l)?l:i)&&t.hideOptionPanel(n)}),t.changeEvent(n,e,null),t.dispatchEvent("clear",{value:e},n))},closePanelEvent:function(e){e=e.$event;this.hideOptionPanel(e)},allExpandPanelEvent:function(){var e=this.$refs.refTree;e&&e.setAllExpandNode(!0)},clearExpandPanelEvent:function(){var e=this.$refs.refTree;e&&e.clearAllExpandNode()},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData.visiblePanel;t.computeIsDisabled||n&&(n=t.$refs.refOptionPanel,(0,_dom.getEventTargetNode)(e,n).flag?t.updatePlacement():t.hideOptionPanel(e))},handleGlobalMousedownEvent:function(e){var t,n,l=this,i=l.reactData,o=i.visiblePanel;l.computeIsDisabled||(t=l.$refs.refElem,n=l.$refs.refOptionPanel,i.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!i.isActivated&&l.hideOptionPanel(e))},handleGlobalBlurEvent:function(e){var t=this.reactData,n=t.visiblePanel,l=t.isActivated;n&&this.hideOptionPanel(e),l&&(t.isActivated=!1),(n||l)&&(e=this.$refs.refInput)&&e.blur()},handleGlobalResizeEvent:function(){this.reactData.visiblePanel&&this.updatePlacement()},handleFocusSearch:function(){var t=this;t.filterable&&t.$nextTick(function(){var e=t.$refs.refInpSearch;e&&e.focus()})},focusEvent:function(e){var t=this.reactData;this.computeIsDisabled||t.visiblePanel||(t.triggerFocusPanel=!0,this.showOptionPanel(),setTimeout(function(){t.triggerFocusPanel=!1},150)),this.dispatchEvent("focus",{},e)},clickEvent:function(e){this.togglePanelEvent(e),this.dispatchEvent("click",{},e)},blurEvent:function(e){this.reactData.isActivated=!1,this.dispatchEvent("blur",{},e)},modelSearchEvent:function(e){this.reactData.searchValue=e},handleSearchEvent:function(){var e=this,t=e.reactData,n=e.value,l=t.searchValue,i=e.computeRemoteOpts,o=i.queryMethod||e.remoteMethod;e.remote&&o&&i.enabled&&(t.searchLoading=!0,Promise.resolve(o({$treeSelect:e,searchValue:l,value:n})).then(function(){return e.$nextTick()}).catch(function(){return e.$nextTick()}).finally(function(){t.searchLoading=!1}))},togglePanelEvent:function(e){var t=this.reactData,e=e.$event;e.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel(e):this.showOptionPanel()},nodeExpandEvent:function(){this.updatePlacement()},nodeClickEvent:function(e){var t=e.$event;this.dispatchEvent("node-click",e,t)},radioChangeEvent:function(e){var t=e.value,n=e.$event;this.changeEvent(n,t,e.node),this.hideOptionPanel(n)},checkboxChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node)},loadSuccessEvent:function(){this.cacheDataMap()},renderVN:function(t){var e,n,l,i,o,a,r,u,c,s,d,p,f,h,M,m,v,g,b,_=this,x=_,E=_.$scopedSlots,y=_.reactData,C=x.className,P=x.value,O=x.multiple,L=x.options,S=x.loading,V=x.menuConfig,z=x.filterable,U=x.showTotalButoon,F=x.showCheckedButoon,I=x.showClearButton,T=x.showExpandButton,j=x.showCloseButton,A=y.initialized,R=y.isActivated,q=y.isAniVisible,D=y.visiblePanel,K=y.searchValue,N=_.computeSize,H=_.computeIsDisabled,w=_.computeSelectLabel,G=_.computeBtnTransfer,Y=_.computePopupWrapperStyle,k=E.header,$=E.footer,Z=E.prefix,E=_.computePopupOpts,B=E.className||x.popupClassName;return _.computeFormReadonly?t("div",{ref:"refElem",class:["vxe-tree-select--readonly",C]},[t("span",{class:"vxe-tree-select-label"},w)]):(n=_.computeMenuOpts,l=_.computeTreeNodeOpts,i=_.computeTreeCheckboxOpts,o=_.computeTreeRadioOpts,a=_.computeNodeKeyField,r=_.computeLabelField,u=_.computeValueField,c=_.computeChildrenField,s=_.computeNodeParentField,d=_.computeHasChildField,p=_.computeVirtualYOpts,f=_.computeFilterOpts,h=(e=_.computeTreeOpts).slots,M=_xeUtils.default.eqNull(P)?[]:_xeUtils.default.isArray(P)?P:[P],m={},h&&(v=h.icon,g=h.title,b=h.extra,v&&(m.icon=function(e){return _.callSlot(v,e,t)}),g&&(m.title=function(e){return _.callSlot(g,e,t)}),b)&&(m.extra=function(e){return _.callSlot(b,e,t)}),t("div",{ref:"refElem",class:["vxe-tree-select",C?_xeUtils.default.isFunction(C)?C({$treeSelect:_}):C:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(N),N),"is--filterable",z),"is--visible",D),"is--disabled",H),"is--loading",S),"is--active",R)]},[t(_input.default,{ref:"refInput",props:{clearable:x.clearable,placeholder:x.placeholder,editable:!1,disabled:H,type:"text",prefixIcon:x.prefixIcon,suffixIcon:S?(0,_ui.getIcon)().TREE_SELECT_LOADED:D?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,value:S?(0,_ui.getI18n)("vxe.select.loadingText"):w,title:w},on:{clear:_.clearEvent,click:_.clickEvent,focus:_.focusEvent,blur:_.blurEvent,"suffix-click":_.togglePanelEvent},scopedSlots:Z?{prefix:function(){return Z({})}}:{}}),t("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-tree-select--panel",B?_xeUtils.default.isFunction(B)?B({$treeSelect:_}):B:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(N),N),"is--transfer",G),"ani--leave",!S&&q),"ani--enter",!S&&D)],attrs:{placement:y.panelPlacement},style:y.panelStyle},A?[t("div",{class:"vxe-tree-select--panel-wrapper"},[z?t("div",{class:"vxe-tree-select--panel-search"},[t(_input.default,{ref:"refInpSearch",class:"vxe-tree-select-search--input",props:{value:K,title:w,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.treeSelect.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":_.modelSearchEvent}})]):(0,_ui.renderEmptyElement)(_),F&&O||I||T||k?t("div",{class:"vxe-tree-select--panel-header"},k?k({}):[t("div",{class:"vxe-tree-select--header-button"},[F&&I?t("div",{class:"vxe-tree-select--selected-btns"},[F&&O?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.allChecked"),mode:"text"},on:{click:_.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(_),I?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.clearChecked"),mode:"text"},on:{click:_.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(_)]):(0,_ui.renderEmptyElement)(_),T?t("div",{class:"vxe-tree-select--expand-btns"},[T?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.allExpand"),mode:"text"},on:{click:_.allExpandPanelEvent}}):(0,_ui.renderEmptyElement)(_),T?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.clearExpand"),mode:"text"},on:{click:_.clearExpandPanelEvent}}):(0,_ui.renderEmptyElement)(_)]):(0,_ui.renderEmptyElement)(_)])]):(0,_ui.renderEmptyElement)(_),t("div",{class:"vxe-tree-select--panel-body"},[t("div",{ref:"refTreeWrapper",class:"vxe-tree-select-tree--wrapper",style:Y},[t(_tree.default,{ref:"refTree",class:"vxe-tree-select--tree",props:{data:L,height:E.height?"100%":e.height,minHeight:e.minHeight,maxHeight:E.height?"":e.maxHeight,autoResize:!0,indent:e.indent,showRadio:!O,radioConfig:o,checkNodeKey:O?null:P,showCheckbox:!!O,checkNodeKeys:O?P:null,checkboxConfig:i,titleField:r,valueField:u,keyField:a,childrenField:e.childrenField||c,parentField:s,hasChildField:e.hasChildField||d,accordion:e.accordion,expandAll:e.expandAll,expandNodeKeys:e.expandNodeKeys,nodeConfig:l,lazy:e.lazy,loadMethod:e.loadMethod,toggleMethod:e.toggleMethod,transform:e.transform,rootParentValue:e.rootParentValue,rootValues:e.rootValues,trigger:e.trigger,showIcon:e.showIcon,showLine:e.showLine,iconOpen:e.iconOpen,iconLoaded:e.iconLoaded,iconClose:e.iconClose,filterValue:K,filterConfig:f,menuConfig:V?n:void 0,virtualYConfig:p},on:{"node-expand":_.nodeExpandEvent,"node-click":_.nodeClickEvent,"radio-change":_.radioChangeEvent,"checkbox-change":_.checkboxChangeEvent,"load-success":_.loadSuccessEvent},scopedSlots:m})])]),$||U||j&&O?t("div",{class:"vxe-tree-select--panel-footer"},$?$({}):[t("div",{class:"vxe-tree-select--footer-button"},[U?t("div",{class:"vxe-tree-select--total-btns"},(0,_ui.getI18n)("vxe.treeSelect.total",[M.length])):(0,_ui.renderEmptyElement)(_),j&&O?t("div",{class:"vxe-tree-select--oper-btns"},[t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.close"),mode:"text"},on:{click:_.closePanelEvent}})]):(0,_ui.renderEmptyElement)(_)])]):(0,_ui.renderEmptyElement)(_)])]:[])]))}},watch:{options:function(){this.cacheDataMap()},lazyOptions:function(){this.cacheLazyDataMap()}},created:function(){this.cacheDataMap(),this.cacheLazyDataMap()},mounted:function(){var e=this;_xeUtils.default.isBoolean(e.autoClose)&&(0,_log.warnLog)("vxe.error.delProp",["auto-close","checked-closable | clear-closable"]),_ui.globalEvents.on(e,"mousewheel",e.handleGlobalMousewheelEvent),_ui.globalEvents.on(e,"mousedown",e.handleGlobalMousedownEvent),_ui.globalEvents.on(e,"blur",e.handleGlobalBlurEvent),_ui.globalEvents.on(e,"resize",e.handleGlobalResizeEvent)},beforeDestroy:function(){var e=this,t=e.reactData,n=e.internalData,l=e.$refs.refOptionPanel;l&&l.parentNode&&l.parentNode.removeChild(l),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_ui.globalEvents.off(e,"blur"),_ui.globalEvents.off(e,"resize"),_xeUtils.default.assign(t,createReactData()),_xeUtils.default.assign(n,createInternalData())},render:function(e){return this.renderVN(e)}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_util=require("../../tree/src/util"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input")),_button=_interopRequireDefault(require("../../button")),_tree=_interopRequireDefault(require("../../tree")),_vn=require("../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createReactData(){return{initialized:!1,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1,fullOptFlag:1,lazyOptFlag:1}}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{},lazyNodeMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTreeSelect",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Array],clearable:{type:Boolean,default:(0,_ui.getConfig)().treeSelect.clearable},placeholder:{type:String,default:function(){return _xeUtils.default.eqNull((0,_ui.getConfig)().treeSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().treeSelect.placeholder}},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},showFullLabel:{type:Boolean,default:(0,_ui.getConfig)().treeSelect.showFullLabel},separator:{type:String,default:(0,_ui.getConfig)().treeSelect.separator},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],popupClassName:[String,Function],prefixIcon:String,placement:String,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().treeSelect.size||(0,_ui.getConfig)().size}},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,menuConfig:Object,virtualYConfig:Object,autoClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.autoClose}},checkedClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.checkedClosable}},clearClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.clearClosable}},showCloseButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showCloseButton}},showTotalButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showTotalButton}},showCheckedButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showCheckedButton}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showClearButton}},showExpandButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().treeSelect.showExpandButton}},transfer:{type:Boolean,default:null},remoteMethod:Function},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null},formItemInfo:{from:"xeFormItemInfo",default:null}},provide:function(){return{$xeTreeSelect:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:createReactData(),internalData:createInternalData()}},computed:Object.assign(Object.assign({},{}),{computeFormReadonly:function(){var e=this.$xeForm,t=this.readonly;return null===t?!!e&&e.readonly:t},computeIsDisabled:function(){var e=this.$xeForm,t=this.disabled;return null===t?!!e&&e.disabled:t},computeBtnTransfer:function(){var e=this,t=e.$xeTable,n=e.$xeModal,l=e.$xeDrawer,i=e.$xeForm,o=e.transfer,e=e.computePopupOpts;if(_xeUtils.default.isBoolean(e.transfer))return e.transfer;if(null===o){e=(0,_ui.getConfig)().treeSelect.transfer;if(_xeUtils.default.isBoolean(e))return e;if(t||n||l||i)return!0}return o},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.popupConfig,this.popupConfig)},computeTreeOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.treeConfig,this.treeConfig)},computeMenuOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.menuConfig,this.menuConfig)},computeTreeNodeOpts:function(){var e=this.computeTreeOpts;return Object.assign({isHover:!0},e.nodeConfig)},computeTreeCheckboxOpts:function(){var e=this.computeTreeOpts;return Object.assign({showIcon:!!e.showCheckbox},e.checkboxConfig,{trigger:"node"})},computeTreeRadioOpts:function(){var e=this.computeTreeOpts;return Object.assign({showIcon:!!e.showRadio},e.radioConfig,{trigger:"node"})},computePropsOpts:function(){return Object.assign({},this.optionProps)},computeNodeKeyField:function(){return this.computeTreeOpts.keyField||"id"},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeChildrenField:function(){return this.computePropsOpts.children||"children"},computeNodeParentField:function(){var e=this.computePropsOpts,t=this.computeTreeOpts;return e.parent||t.parentField||"parentId"},computeHasChildField:function(){return this.computePropsOpts.hasChild||"hasChild"},computeVirtualYOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.virtualYConfig,this.virtualYConfig)},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().treeSelect.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){var e=this.computeTreeOpts;return Object.assign({},e.filterConfig,this.filterConfig)},computeSelectLabel:function(){var e=this.reactData,t=this.internalData,n=this.value,l=this.showFullLabel,i=e.fullOptFlag,o=e.lazyOptFlag,a=t.fullNodeMaps,r=t.lazyNodeMaps,u=this.computeLabelField;return(_xeUtils.default.eqNull(n)?[]:_xeUtils.default.isArray(n)?n:[n]).map(function(e){var t=a[e];if(i&&t)return l?t.fullLabel:t.item[u];if(o){t=r[e];if(t)return l?t.fullLabel:t.item[u]}return e}).join(", ")},computePopupWrapperStyle:function(){var e=this.computePopupOpts,t=e.height,e=e.width,n={};return e&&(n.width=(0,_dom.toCssUnit)(e)),t&&(n.height=(0,_dom.toCssUnit)(t),n.maxHeight=(0,_dom.toCssUnit)(t)),n}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$treeSelect:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},callSlot:function(e,t,n){var l=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=l[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,n)):[]},getNodeid:function(e){e=e[this.computeNodeKeyField];return e?encodeURIComponent(e):""},handleCacheMap:function(e){function t(e,t,n,l,i,o){var a=(a=r.getNodeid(e))||getOptUniqueId(),a=(f[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(c),a]),f[a]=!0,e[s]);p[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(s),a]),p[a]={item:e,index:t,items:n,parent:i,nodes:o,fullLabel:o.map(function(e){return e[d]}).join((u||"/")+" ")}}var r=this,u=r.separator,n=r.computeTreeOpts,c=r.computeNodeKeyField,l=r.computeChildrenField,s=r.computeValueField,d=r.computeLabelField,i=n.transform,p={},f={};return e&&(i?(i=_xeUtils.default.toArrayTree(e,{key:c,parentKey:r.computeNodeParentField,mapChildren:l,rootParentValue:n.rootParentValue,rootValues:n.rootValues}),_xeUtils.default.eachTree(i,t,{children:l})):_xeUtils.default.eachTree(e,t,{children:l})),p},cacheDataMap:function(){var e=this.reactData,t=this.internalData,n=this.options;t.fullNodeMaps=this.handleCacheMap(n||[]),t.fullOptionList=n||[],e.fullOptFlag++},cacheLazyDataMap:function(){var e=this.reactData,t=this.internalData,n=this.lazyOptions;t.lazyNodeMaps=this.handleCacheMap(n||[]),e.lazyOptFlag++},updateZindex:function(){var e=this.reactData,t=this.computePopupOpts.zIndex||this.zIndex;t?e.panelIndex=_xeUtils.default.toNumber(t):e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,a,{placement:u.placement||l,defaultPlacement:u.defaultPlacement,teleportTo:r}),t=Object.assign(e.style,{zIndex:i});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,l=t.placement,i=n.panelIndex,o=t.$refs.refElem,a=t.$refs.refOptionPanel,r=t.computeBtnTransfer,u=t.computePopupOpts;return e(),t.$nextTick().then(e)},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,l=e.loading,i=e.remote,o=e.filterable,a=n.fullOptionList,r=e.computeRemoteOpts;l||e.computeIsDisabled||(n.hpTimeout&&clearTimeout(n.hpTimeout),t.initialized||(t.initialized=!0,l=e.computeBtnTransfer,n=e.$refs.refOptionPanel,l&&n&&document.body.appendChild(n)),t.isActivated=!0,t.isAniVisible=!0,o&&i&&r.enabled&&r.autoLoad&&!a.length&&e.handleSearchEvent(),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch(),e.updatePlacement()},10),e.updateZindex(),e.updatePlacement(),e.dispatchEvent("visible-change",{visible:!0},null))},hideOptionPanel:function(e){var t=this.reactData,n=this.internalData;t.visiblePanel=!1,n.hpTimeout=setTimeout(function(){t.isAniVisible=!1},350),this.dispatchEvent("visible-change",{visible:!1},e||null)},changeEvent:function(e,t,n){var l=this,i=l,o=l.$xeForm,a=l.formItemInfo,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);l.emitModel(t),t!==i.value&&(l.dispatchEvent("change",{value:t,node:n,option:n},e),o)&&a&&o.triggerItemEvent(e,a.itemConfig.field,t)},clearValueEvent:function(e,t){this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e){e=e.$event;this.clearValueEvent(e,null),this.hideOptionPanel(e)},allCheckedPanelEvent:function(e){var n=this,l=e.$event,e=n.multiple,i=n.autoClose,o=n.checkedClosable,t=n.$refs.refTree;e&&t&&t.setAllCheckboxNode(!0).then(function(e){var t=e.checkNodeKeys;n.changeEvent(l,t,e.checkNodes[0]),n.dispatchEvent("all-change",{value:t},l),(_xeUtils.default.isBoolean(i)?i:o)&&n.hideOptionPanel(l)})},clearCheckedPanelEvent:function(e){var t=this,n=e.$event,e=t.multiple,l=t.autoClose,i=t.clearClosable,o=t.$refs.refTree;o&&(e=e?[]:null,o.clearCheckboxNode().then(function(){(_xeUtils.default.isBoolean(l)?l:i)&&t.hideOptionPanel(n)}),t.changeEvent(n,e,null),t.dispatchEvent("clear",{value:e},n))},closePanelEvent:function(e){e=e.$event;this.hideOptionPanel(e)},allExpandPanelEvent:function(){var e=this.$refs.refTree;e&&e.setAllExpandNode(!0)},clearExpandPanelEvent:function(){var e=this.$refs.refTree;e&&e.clearAllExpandNode()},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData.visiblePanel;t.computeIsDisabled||n&&(n=t.$refs.refOptionPanel,(0,_dom.getEventTargetNode)(e,n).flag?t.updatePlacement():t.hideOptionPanel(e))},handleGlobalMousedownEvent:function(e){var t,n,l=this,i=l.reactData,o=i.visiblePanel;l.computeIsDisabled||(t=l.$refs.refElem,n=l.$refs.refOptionPanel,i.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!i.isActivated&&l.hideOptionPanel(e))},handleGlobalBlurEvent:function(e){var t=this.reactData,n=t.visiblePanel,l=t.isActivated;n&&this.hideOptionPanel(e),l&&(t.isActivated=!1),(n||l)&&(e=this.$refs.refInput)&&e.blur()},handleGlobalResizeEvent:function(){this.reactData.visiblePanel&&this.updatePlacement()},handleFocusSearch:function(){var t=this;t.filterable&&t.$nextTick(function(){var e=t.$refs.refInpSearch;e&&e.focus()})},focusEvent:function(e){var t=this.reactData;this.computeIsDisabled||t.visiblePanel||(t.triggerFocusPanel=!0,this.showOptionPanel(),setTimeout(function(){t.triggerFocusPanel=!1},150)),this.dispatchEvent("focus",{},e)},clickEvent:function(e){this.togglePanelEvent(e),this.dispatchEvent("click",{},e)},blurEvent:function(e){this.reactData.isActivated=!1,this.dispatchEvent("blur",{},e)},modelSearchEvent:function(e){this.reactData.searchValue=e},handleSearchEvent:function(){var e=this,t=e.reactData,n=e.value,l=t.searchValue,i=e.computeRemoteOpts,o=i.queryMethod||e.remoteMethod;e.remote&&o&&i.enabled&&(t.searchLoading=!0,Promise.resolve(o({$treeSelect:e,searchValue:l,value:n})).then(function(){return e.$nextTick()}).catch(function(){return e.$nextTick()}).finally(function(){t.searchLoading=!1}))},togglePanelEvent:function(e){var t=this.reactData,e=e.$event;e.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel(e):this.showOptionPanel()},nodeExpandEvent:function(){this.updatePlacement()},nodeClickEvent:function(e){var t=e.$event;this.dispatchEvent("node-click",e,t)},radioChangeEvent:function(e){var t=e.value,n=e.$event;this.changeEvent(n,t,e.node),this.hideOptionPanel(n)},checkboxChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node)},loadSuccessEvent:function(){this.cacheDataMap()},renderVN:function(t){var e,n,l,i,o,a,r,u,c,s,d,p,f,h,M,m,v,g,b,_=this,x=_,E=_.$scopedSlots,y=_.reactData,C=x.className,P=x.value,O=x.multiple,L=x.options,S=x.loading,V=x.menuConfig,z=x.filterable,U=x.showTotalButton,F=x.showCheckedButton,I=x.showClearButton,T=x.showExpandButton,j=x.showCloseButton,A=y.initialized,R=y.isActivated,q=y.isAniVisible,D=y.visiblePanel,K=y.searchValue,N=_.computeSize,H=_.computeIsDisabled,w=_.computeSelectLabel,G=_.computeBtnTransfer,Y=_.computePopupWrapperStyle,k=E.header,$=E.footer,Z=E.prefix,E=_.computePopupOpts,B=E.className||x.popupClassName;return _.computeFormReadonly?t("div",{ref:"refElem",class:["vxe-tree-select--readonly",C]},[t("span",{class:"vxe-tree-select-label"},w)]):(n=_.computeMenuOpts,l=_.computeTreeNodeOpts,i=_.computeTreeCheckboxOpts,o=_.computeTreeRadioOpts,a=_.computeNodeKeyField,r=_.computeLabelField,u=_.computeValueField,c=_.computeChildrenField,s=_.computeNodeParentField,d=_.computeHasChildField,p=_.computeVirtualYOpts,f=_.computeFilterOpts,h=(e=_.computeTreeOpts).slots,M=_xeUtils.default.eqNull(P)?[]:_xeUtils.default.isArray(P)?P:[P],m={},h&&(v=h.icon,g=h.title,b=h.extra,v&&(m.icon=function(e){return _.callSlot(v,e,t)}),g&&(m.title=function(e){return _.callSlot(g,e,t)}),b)&&(m.extra=function(e){return _.callSlot(b,e,t)}),t("div",{ref:"refElem",class:["vxe-tree-select",C?_xeUtils.default.isFunction(C)?C({$treeSelect:_}):C:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(N),N),"is--filterable",z),"is--visible",D),"is--disabled",H),"is--loading",S),"is--active",R)]},[t(_input.default,{ref:"refInput",props:{clearable:x.clearable,placeholder:x.placeholder,editable:!1,disabled:H,type:"text",prefixIcon:x.prefixIcon,suffixIcon:S?(0,_ui.getIcon)().TREE_SELECT_LOADED:D?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,value:S?(0,_ui.getI18n)("vxe.select.loadingText"):w,title:w},on:{clear:_.clearEvent,click:_.clickEvent,focus:_.focusEvent,blur:_.blurEvent,"suffix-click":_.togglePanelEvent},scopedSlots:Z?{prefix:function(){return Z({})}}:{}}),t("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-tree-select--panel",B?_xeUtils.default.isFunction(B)?B({$treeSelect:_}):B:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(N),N),"is--transfer",G),"ani--leave",!S&&q),"ani--enter",!S&&D)],attrs:{placement:y.panelPlacement},style:y.panelStyle},A?[t("div",{class:"vxe-tree-select--panel-wrapper"},[z?t("div",{class:"vxe-tree-select--panel-search"},[t(_input.default,{ref:"refInpSearch",class:"vxe-tree-select-search--input",props:{value:K,title:w,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.treeSelect.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":_.modelSearchEvent}})]):(0,_ui.renderEmptyElement)(_),F&&O||I||T||k?t("div",{class:"vxe-tree-select--panel-header"},k?k({}):[t("div",{class:"vxe-tree-select--header-button"},[F&&I?t("div",{class:"vxe-tree-select--selected-btns"},[F&&O?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.allChecked"),mode:"text"},on:{click:_.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(_),I?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.clearChecked"),mode:"text"},on:{click:_.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(_)]):(0,_ui.renderEmptyElement)(_),T?t("div",{class:"vxe-tree-select--expand-btns"},[T?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.allExpand"),mode:"text"},on:{click:_.allExpandPanelEvent}}):(0,_ui.renderEmptyElement)(_),T?t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.treeSelect.clearExpand"),mode:"text"},on:{click:_.clearExpandPanelEvent}}):(0,_ui.renderEmptyElement)(_)]):(0,_ui.renderEmptyElement)(_)])]):(0,_ui.renderEmptyElement)(_),t("div",{class:"vxe-tree-select--panel-body"},[t("div",{ref:"refTreeWrapper",class:"vxe-tree-select-tree--wrapper",style:Y},[t(_tree.default,{ref:"refTree",class:"vxe-tree-select--tree",props:{data:L,height:E.height?"100%":e.height,minHeight:e.minHeight,maxHeight:E.height?"":e.maxHeight,autoResize:!0,indent:e.indent,showRadio:!O,radioConfig:o,checkNodeKey:O?null:P,showCheckbox:!!O,checkNodeKeys:O?P:null,checkboxConfig:i,titleField:r,valueField:u,keyField:a,childrenField:e.childrenField||c,parentField:s,hasChildField:e.hasChildField||d,accordion:e.accordion,expandAll:e.expandAll,expandNodeKeys:e.expandNodeKeys,nodeConfig:l,lazy:e.lazy,loadMethod:e.loadMethod,toggleMethod:e.toggleMethod,transform:e.transform,rootParentValue:e.rootParentValue,rootValues:e.rootValues,trigger:e.trigger,showIcon:e.showIcon,showLine:e.showLine,iconOpen:e.iconOpen,iconLoaded:e.iconLoaded,iconClose:e.iconClose,filterValue:K,filterConfig:f,menuConfig:V?n:void 0,virtualYConfig:p},on:{"node-expand":_.nodeExpandEvent,"node-click":_.nodeClickEvent,"radio-change":_.radioChangeEvent,"checkbox-change":_.checkboxChangeEvent,"load-success":_.loadSuccessEvent},scopedSlots:m})])]),$||U||j&&O?t("div",{class:"vxe-tree-select--panel-footer"},$?$({}):[t("div",{class:"vxe-tree-select--footer-button"},[U?t("div",{class:"vxe-tree-select--total-btns"},(0,_ui.getI18n)("vxe.treeSelect.total",[M.length])):(0,_ui.renderEmptyElement)(_),j&&O?t("div",{class:"vxe-tree-select--oper-btns"},[t(_button.default,{props:{content:(0,_ui.getI18n)("vxe.select.close"),mode:"text"},on:{click:_.closePanelEvent}})]):(0,_ui.renderEmptyElement)(_)])]):(0,_ui.renderEmptyElement)(_)])]:[])]))}},watch:{options:function(){this.cacheDataMap()},lazyOptions:function(){this.cacheLazyDataMap()}},created:function(){this.cacheDataMap(),this.cacheLazyDataMap()},mounted:function(){var e=this;_xeUtils.default.isBoolean(e.autoClose)&&(0,_log.warnLog)("vxe.error.delProp",["auto-close","checked-closable | clear-closable"]),_ui.globalEvents.on(e,"mousewheel",e.handleGlobalMousewheelEvent),_ui.globalEvents.on(e,"mousedown",e.handleGlobalMousedownEvent),_ui.globalEvents.on(e,"blur",e.handleGlobalBlurEvent),_ui.globalEvents.on(e,"resize",e.handleGlobalResizeEvent)},beforeDestroy:function(){var e=this,t=e.reactData,n=e.internalData,l=e.$refs.refOptionPanel;l&&l.parentNode&&l.parentNode.removeChild(l),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_ui.globalEvents.off(e,"blur"),_ui.globalEvents.off(e,"resize"),_xeUtils.default.assign(t,createReactData()),_xeUtils.default.assign(n,createInternalData())},render:function(e){return this.renderVN(e)}});
|
package/lib/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
var _dynamics = require("../dynamics");
|
|
28
28
|
var _log = require("./src/log");
|
|
29
|
-
var version = exports.version = "3.14.
|
|
29
|
+
var version = exports.version = "3.14.34";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.33";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:null,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),exports.default=_core.VxeUI);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.34";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:null,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),exports.default=_core.VxeUI);
|
package/lib/ui/src/log.js
CHANGED
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
|
-
var version = "ui v".concat("3.14.
|
|
8
|
+
var version = "ui v".concat("3.14.34");
|
|
9
9
|
var warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
var errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.34"),warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -72,13 +72,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
72
72
|
type: Boolean as PropType<VxeCascaderPropTypes.AutoClose>,
|
|
73
73
|
default: () => getConfig().cascader.autoClose
|
|
74
74
|
},
|
|
75
|
-
|
|
76
|
-
type: Boolean as PropType<VxeCascaderPropTypes.
|
|
77
|
-
default: () => getConfig().cascader.
|
|
75
|
+
showTotalButton: {
|
|
76
|
+
type: Boolean as PropType<VxeCascaderPropTypes.ShowTotalButton>,
|
|
77
|
+
default: () => getConfig().cascader.showTotalButton
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
type: Boolean as PropType<VxeCascaderPropTypes.
|
|
81
|
-
default: () => getConfig().cascader.
|
|
79
|
+
showCheckedButton: {
|
|
80
|
+
type: Boolean as PropType<VxeCascaderPropTypes.ShowCheckedButton>,
|
|
81
|
+
default: () => getConfig().cascader.showCheckedButton
|
|
82
82
|
},
|
|
83
83
|
showClearButton: {
|
|
84
84
|
type: Boolean as PropType<VxeCascaderPropTypes.ShowClearButton>,
|
|
@@ -735,7 +735,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
735
735
|
const slots = $xeCascader.$scopedSlots
|
|
736
736
|
const reactData = $xeCascader.reactData
|
|
737
737
|
|
|
738
|
-
const { className, value: modelValue, multiple, loading, filterable,
|
|
738
|
+
const { className, value: modelValue, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton } = props
|
|
739
739
|
const { initialized, isActivated, isAniVisible, visiblePanel, searchValue } = reactData
|
|
740
740
|
const vSize = $xeCascader.computeSize
|
|
741
741
|
const isDisabled = $xeCascader.computeIsDisabled
|
|
@@ -836,7 +836,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
836
836
|
})
|
|
837
837
|
])
|
|
838
838
|
: renderEmptyElement($xeCascader),
|
|
839
|
-
|
|
839
|
+
showTotalButton || (showCheckedButton && multiple) || showClearButton || headerSlot
|
|
840
840
|
? h('div', {
|
|
841
841
|
class: 'vxe-cascader--panel-header'
|
|
842
842
|
}, headerSlot
|
|
@@ -845,7 +845,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
845
845
|
h('div', {
|
|
846
846
|
class: 'vxe-cascader--header-button'
|
|
847
847
|
}, [
|
|
848
|
-
|
|
848
|
+
showTotalButton
|
|
849
849
|
? h('div', {
|
|
850
850
|
class: 'vxe-cascader--header-total'
|
|
851
851
|
}, getI18n('vxe.cascader.total', [selectVals.length]))
|
|
@@ -853,7 +853,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
853
853
|
h('div', {
|
|
854
854
|
class: 'vxe-cascader--header-btns'
|
|
855
855
|
}, [
|
|
856
|
-
(
|
|
856
|
+
(showCheckedButton && multiple)
|
|
857
857
|
? h(VxeButtonComponent, {
|
|
858
858
|
props: {
|
|
859
859
|
content: getI18n('vxe.cascader.allChecked'),
|