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
|
@@ -65,13 +65,13 @@ export default {
|
|
|
65
65
|
type: Boolean,
|
|
66
66
|
default: () => getConfig().cascader.autoClose
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
showTotalButton: {
|
|
69
69
|
type: Boolean,
|
|
70
|
-
default: () => getConfig().cascader.
|
|
70
|
+
default: () => getConfig().cascader.showTotalButton
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
showCheckedButton: {
|
|
73
73
|
type: Boolean,
|
|
74
|
-
default: () => getConfig().cascader.
|
|
74
|
+
default: () => getConfig().cascader.showCheckedButton
|
|
75
75
|
},
|
|
76
76
|
showClearButton: {
|
|
77
77
|
type: Boolean,
|
|
@@ -664,7 +664,7 @@ export default {
|
|
|
664
664
|
const props = $xeCascader;
|
|
665
665
|
const slots = $xeCascader.$scopedSlots;
|
|
666
666
|
const reactData = $xeCascader.reactData;
|
|
667
|
-
const { className, value: modelValue, multiple, loading, filterable,
|
|
667
|
+
const { className, value: modelValue, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton } = props;
|
|
668
668
|
const { initialized, isActivated, isAniVisible, visiblePanel, searchValue } = reactData;
|
|
669
669
|
const vSize = $xeCascader.computeSize;
|
|
670
670
|
const isDisabled = $xeCascader.computeIsDisabled;
|
|
@@ -764,7 +764,7 @@ export default {
|
|
|
764
764
|
})
|
|
765
765
|
])
|
|
766
766
|
: renderEmptyElement($xeCascader),
|
|
767
|
-
|
|
767
|
+
showTotalButton || (showCheckedButton && multiple) || showClearButton || headerSlot
|
|
768
768
|
? h('div', {
|
|
769
769
|
class: 'vxe-cascader--panel-header'
|
|
770
770
|
}, headerSlot
|
|
@@ -773,7 +773,7 @@ export default {
|
|
|
773
773
|
h('div', {
|
|
774
774
|
class: 'vxe-cascader--header-button'
|
|
775
775
|
}, [
|
|
776
|
-
|
|
776
|
+
showTotalButton
|
|
777
777
|
? h('div', {
|
|
778
778
|
class: 'vxe-cascader--header-total'
|
|
779
779
|
}, getI18n('vxe.cascader.total', [selectVals.length]))
|
|
@@ -781,7 +781,7 @@ export default {
|
|
|
781
781
|
h('div', {
|
|
782
782
|
class: 'vxe-cascader--header-btns'
|
|
783
783
|
}, [
|
|
784
|
-
(
|
|
784
|
+
(showCheckedButton && multiple)
|
|
785
785
|
? h(VxeButtonComponent, {
|
|
786
786
|
props: {
|
|
787
787
|
content: getI18n('vxe.cascader.allChecked'),
|
package/es/select/src/select.js
CHANGED
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
radioConfig: Object,
|
|
97
97
|
showCheckbox: {
|
|
98
98
|
type: Boolean,
|
|
99
|
-
default: () => getConfig().select.
|
|
99
|
+
default: () => getConfig().select.showCheckedButton
|
|
100
100
|
},
|
|
101
101
|
checkboxConfig: Object,
|
|
102
102
|
/**
|
|
@@ -130,13 +130,13 @@ export default {
|
|
|
130
130
|
type: Boolean,
|
|
131
131
|
default: () => getConfig().select.showCloseButton
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
showTotalButton: {
|
|
134
134
|
type: Boolean,
|
|
135
|
-
default: () => getConfig().select.
|
|
135
|
+
default: () => getConfig().select.showTotalButton
|
|
136
136
|
},
|
|
137
|
-
|
|
137
|
+
showCheckedButton: {
|
|
138
138
|
type: Boolean,
|
|
139
|
-
default: () => getConfig().select.
|
|
139
|
+
default: () => getConfig().select.showCheckedButton
|
|
140
140
|
},
|
|
141
141
|
showClearButton: {
|
|
142
142
|
type: Boolean,
|
|
@@ -1786,7 +1786,7 @@ export default {
|
|
|
1786
1786
|
const props = $xeSelect;
|
|
1787
1787
|
const slots = $xeSelect.$scopedSlots;
|
|
1788
1788
|
const reactData = $xeSelect.reactData;
|
|
1789
|
-
const { className, multiple, loading, filterable,
|
|
1789
|
+
const { className, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton, showCloseButton } = props;
|
|
1790
1790
|
const { initialized, isActivated, isAniVisible, optList, visiblePanel, bodyHeight, topSpaceHeight } = reactData;
|
|
1791
1791
|
const vSize = $xeSelect.computeSize;
|
|
1792
1792
|
const isDisabled = $xeSelect.computeIsDisabled;
|
|
@@ -1905,7 +1905,7 @@ export default {
|
|
|
1905
1905
|
})
|
|
1906
1906
|
])
|
|
1907
1907
|
: renderEmptyElement($xeSelect),
|
|
1908
|
-
(
|
|
1908
|
+
(showCheckedButton && multiple) || showClearButton || headerSlot
|
|
1909
1909
|
? h('div', {
|
|
1910
1910
|
class: 'vxe-select--panel-header'
|
|
1911
1911
|
}, headerSlot
|
|
@@ -1917,7 +1917,7 @@ export default {
|
|
|
1917
1917
|
h('div', {
|
|
1918
1918
|
class: 'vxe-tree-select--header-btns'
|
|
1919
1919
|
}, [
|
|
1920
|
-
(
|
|
1920
|
+
(showCheckedButton && multiple)
|
|
1921
1921
|
? h(VxeButtonComponent, {
|
|
1922
1922
|
props: {
|
|
1923
1923
|
content: getI18n('vxe.select.allChecked'),
|
|
@@ -1968,7 +1968,7 @@ export default {
|
|
|
1968
1968
|
}, $xeSelect.renderOpts(h))
|
|
1969
1969
|
])
|
|
1970
1970
|
]),
|
|
1971
|
-
footerSlot ||
|
|
1971
|
+
footerSlot || showTotalButton || (showCloseButton && multiple)
|
|
1972
1972
|
? h('div', {
|
|
1973
1973
|
class: 'vxe-select--panel-footer'
|
|
1974
1974
|
}, footerSlot
|
|
@@ -1977,7 +1977,7 @@ export default {
|
|
|
1977
1977
|
h('div', {
|
|
1978
1978
|
class: 'vxe-select--footer-button'
|
|
1979
1979
|
}, [
|
|
1980
|
-
|
|
1980
|
+
showTotalButton
|
|
1981
1981
|
? h('div', {
|
|
1982
1982
|
class: 'vxe-select--total-btns'
|
|
1983
1983
|
}, getI18n('vxe.select.total', [selectVals.length, optList.length]))
|
|
@@ -121,13 +121,13 @@ export default {
|
|
|
121
121
|
type: Boolean,
|
|
122
122
|
default: () => getConfig().treeSelect.showCloseButton
|
|
123
123
|
},
|
|
124
|
-
|
|
124
|
+
showTotalButton: {
|
|
125
125
|
type: Boolean,
|
|
126
|
-
default: () => getConfig().treeSelect.
|
|
126
|
+
default: () => getConfig().treeSelect.showTotalButton
|
|
127
127
|
},
|
|
128
|
-
|
|
128
|
+
showCheckedButton: {
|
|
129
129
|
type: Boolean,
|
|
130
|
-
default: () => getConfig().treeSelect.
|
|
130
|
+
default: () => getConfig().treeSelect.showCheckedButton
|
|
131
131
|
},
|
|
132
132
|
showClearButton: {
|
|
133
133
|
type: Boolean,
|
|
@@ -805,7 +805,7 @@ export default {
|
|
|
805
805
|
const props = $xeTreeSelect;
|
|
806
806
|
const slots = $xeTreeSelect.$scopedSlots;
|
|
807
807
|
const reactData = $xeTreeSelect.reactData;
|
|
808
|
-
const { className, value: modelValue, multiple, options, loading, menuConfig, filterable,
|
|
808
|
+
const { className, value: modelValue, multiple, options, loading, menuConfig, filterable, showTotalButton, showCheckedButton, showClearButton, showExpandButton, showCloseButton } = props;
|
|
809
809
|
const { initialized, isActivated, isAniVisible, visiblePanel, searchValue } = reactData;
|
|
810
810
|
const vSize = $xeTreeSelect.computeSize;
|
|
811
811
|
const isDisabled = $xeTreeSelect.computeIsDisabled;
|
|
@@ -932,7 +932,7 @@ export default {
|
|
|
932
932
|
})
|
|
933
933
|
])
|
|
934
934
|
: renderEmptyElement($xeTreeSelect),
|
|
935
|
-
(
|
|
935
|
+
(showCheckedButton && multiple) || showClearButton || showExpandButton || headerSlot
|
|
936
936
|
? h('div', {
|
|
937
937
|
class: 'vxe-tree-select--panel-header'
|
|
938
938
|
}, headerSlot
|
|
@@ -941,11 +941,11 @@ export default {
|
|
|
941
941
|
h('div', {
|
|
942
942
|
class: 'vxe-tree-select--header-button'
|
|
943
943
|
}, [
|
|
944
|
-
|
|
944
|
+
showCheckedButton && showClearButton
|
|
945
945
|
? h('div', {
|
|
946
946
|
class: 'vxe-tree-select--selected-btns'
|
|
947
947
|
}, [
|
|
948
|
-
(
|
|
948
|
+
(showCheckedButton && multiple)
|
|
949
949
|
? h(VxeButtonComponent, {
|
|
950
950
|
props: {
|
|
951
951
|
content: getI18n('vxe.treeSelect.allChecked'),
|
|
@@ -1062,7 +1062,7 @@ export default {
|
|
|
1062
1062
|
})
|
|
1063
1063
|
])
|
|
1064
1064
|
]),
|
|
1065
|
-
footerSlot ||
|
|
1065
|
+
footerSlot || showTotalButton || (showCloseButton && multiple)
|
|
1066
1066
|
? h('div', {
|
|
1067
1067
|
class: 'vxe-tree-select--panel-footer'
|
|
1068
1068
|
}, footerSlot
|
|
@@ -1071,7 +1071,7 @@ export default {
|
|
|
1071
1071
|
h('div', {
|
|
1072
1072
|
class: 'vxe-tree-select--footer-button'
|
|
1073
1073
|
}, [
|
|
1074
|
-
|
|
1074
|
+
showTotalButton
|
|
1075
1075
|
? h('div', {
|
|
1076
1076
|
class: 'vxe-tree-select--total-btns'
|
|
1077
1077
|
}, getI18n('vxe.treeSelect.total', [selectVals.length]))
|
package/es/ui/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VxeUI, setConfig, setIcon } from '@vxe-ui/core';
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
import { warnLog } from './src/log';
|
|
4
|
-
export const version = "3.14.
|
|
4
|
+
export const version = "3.14.34";
|
|
5
5
|
VxeUI.uiVersion = version;
|
|
6
6
|
VxeUI.dynamicApp = dynamicApp;
|
|
7
7
|
export function config(options) {
|
package/es/ui/src/log.js
CHANGED
|
@@ -80,16 +80,16 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
80
80
|
return (0, _ui.getConfig)().cascader.autoClose;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
showTotalButton: {
|
|
84
84
|
type: Boolean,
|
|
85
85
|
default: function _default() {
|
|
86
|
-
return (0, _ui.getConfig)().cascader.
|
|
86
|
+
return (0, _ui.getConfig)().cascader.showTotalButton;
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
-
|
|
89
|
+
showCheckedButton: {
|
|
90
90
|
type: Boolean,
|
|
91
91
|
default: function _default() {
|
|
92
|
-
return (0, _ui.getConfig)().cascader.
|
|
92
|
+
return (0, _ui.getConfig)().cascader.showCheckedButton;
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
showClearButton: {
|
|
@@ -732,8 +732,8 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
732
732
|
multiple = props.multiple,
|
|
733
733
|
loading = props.loading,
|
|
734
734
|
filterable = props.filterable,
|
|
735
|
-
|
|
736
|
-
|
|
735
|
+
showTotalButton = props.showTotalButton,
|
|
736
|
+
showCheckedButton = props.showCheckedButton,
|
|
737
737
|
showClearButton = props.showClearButton;
|
|
738
738
|
var initialized = reactData.initialized,
|
|
739
739
|
isActivated = reactData.isActivated,
|
|
@@ -818,15 +818,15 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
818
818
|
on: {
|
|
819
819
|
'model-value': $xeCascader.modelSearchEvent
|
|
820
820
|
}
|
|
821
|
-
})]) : (0, _ui.renderEmptyElement)($xeCascader),
|
|
821
|
+
})]) : (0, _ui.renderEmptyElement)($xeCascader), showTotalButton || showCheckedButton && multiple || showClearButton || headerSlot ? h('div', {
|
|
822
822
|
class: 'vxe-cascader--panel-header'
|
|
823
823
|
}, headerSlot ? headerSlot({}) : [h('div', {
|
|
824
824
|
class: 'vxe-cascader--header-button'
|
|
825
|
-
}, [
|
|
825
|
+
}, [showTotalButton ? h('div', {
|
|
826
826
|
class: 'vxe-cascader--header-total'
|
|
827
827
|
}, (0, _ui.getI18n)('vxe.cascader.total', [selectVals.length])) : (0, _ui.renderEmptyElement)($xeCascader), h('div', {
|
|
828
828
|
class: 'vxe-cascader--header-btns'
|
|
829
|
-
}, [
|
|
829
|
+
}, [showCheckedButton && multiple ? h(_button.default, {
|
|
830
830
|
props: {
|
|
831
831
|
content: (0, _ui.getI18n)('vxe.cascader.allChecked'),
|
|
832
832
|
mode: 'text'
|
|
@@ -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/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 getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeCascader",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Array],clearable:Boolean,placeholder:{type:String,default:function(){return _xeUtils.default.eqNull((0,_ui.getConfig)().cascader.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().cascader.placeholder}},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],prefixIcon:String,placement:String,transform:Boolean,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().cascader.size||(0,_ui.getConfig)().size}},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,autoClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.autoClose}},showTotalButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showTotalButoon}},showCheckedButoon:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showCheckedButoon}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showClearButton}},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{$xeCascader:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,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,a=e.$xeDrawer,i=e.$xeForm,e=e.transfer;if(null===e){var o=(0,_ui.getConfig)().cascader.transfer;if(_xeUtils.default.isBoolean(o))return o;if(t||n||a||i)return!0}return e},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.popupConfig,this.popupConfig)},computeTreeOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.treeConfig,this.treeConfig)},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.computeValueField},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeChildrenField:function(){return this.computePropsOpts.children||"children"},computeParentField:function(){return this.computePropsOpts.parent||"parentField"},computeHasChildField:function(){return this.computePropsOpts.hasChild||"hasChild"},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){var e=this.computeTreeOpts;return Object.assign({},e.filterConfig,this.filterConfig)},computeSelectLabel:function(){var e=this.internalData,t=this.value,n=this.lazyOptions,a=e.fullNodeMaps,i=this.computeValueField,o=this.computeLabelField;return(_xeUtils.default.eqNull(t)?[]:_xeUtils.default.isArray(t)?t:[t]).map(function(t){var e=a[t];if(e)return e.item[o];if(n){e=n.find(function(e){return e[i]===t});if(e)return e[o]}return t}).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,{$cascader:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},getNodeid:function(e){e=e[this.computeNodeKeyField];return e?encodeURIComponent(e):""},cacheDataMap:function(){var l=this,e=l.internalData,t=l.options,u=l.computeNodeKeyField,c=l.computeValueField,s={},d={};_xeUtils.default.eachTree(t,function(e,t,n,a,i,o){var r=(r=l.getNodeid(e))||getOptUniqueId(),r=(d[r]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(u),r]),d[r]=!0,e[c]);s[r]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(c),r]),s[r]={item:e,index:t,items:n,parent:i,nodes:o}},{children:l.computeChildrenField}),e.fullOptionList=t||[],e.fullNodeMaps=s},updateZindex:function(){var e=this.reactData,t=this.zIndex;t?e.panelIndex=t:e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,r,{placement:u.placement||a,defaultPlacement:u.defaultPlacement,teleportTo:l}),t=Object.assign(e.style,{zIndex:i});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,a=t.placement,i=n.panelIndex,o=t.$refs.refElem,r=t.$refs.refOptionPanel,l=t.computeBtnTransfer,u=t.computePopupOpts;return e(),t.$nextTick().then(e)},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,a=e.loading,i=e.remote,o=e.filterable,r=n.fullOptionList,l=e.computeRemoteOpts;a||e.computeIsDisabled||(n.hpTimeout&&clearTimeout(n.hpTimeout),t.initialized||(t.initialized=!0,a=e.computeBtnTransfer,n=e.$refs.refOptionPanel,a&&n&&document.body.appendChild(n)),t.isActivated=!0,t.isAniVisible=!0,o&&i&&l.enabled&&l.autoLoad&&!r.length&&e.handleSearchEvent(),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch()},10),e.updateZindex(),e.updatePlacement())},hideOptionPanel:function(){var e=this.reactData,t=this.internalData;e.visiblePanel=!1,t.hpTimeout=setTimeout(function(){e.isAniVisible=!1},350)},changeEvent:function(e,t,n){var a=this,i=a,o=a.$xeForm,r=a.formItemInfo,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);a.emitModel(t),t!==i.value&&(a.dispatchEvent("change",{value:t,node:n,option:n},e),o)&&r&&o.triggerItemEvent(e,r.itemConfig.field,t)},clearValueEvent:function(e,t){this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e,t){this.clearValueEvent(t,null),this.hideOptionPanel()},allCheckedPanelEvent:function(e){var n=this,a=e.$event,e=n.multiple,i=n.autoClose,t=n.$refs.refTree;e&&t&&t.setAllCheckboxNode(!0).then(function(e){var t=e.checkNodeKeys;n.changeEvent(a,t,e.checkNodes[0]),n.dispatchEvent("all-change",{value:t},a),i&&n.hideOptionPanel()})},clearCheckedPanelEvent:function(e){var t=this,e=e.$event,n=t.multiple,a=t.autoClose,i=t.$refs.refTree;i&&(n=n?[]:null,i.clearCheckboxNode().then(function(){a&&t.hideOptionPanel()}),t.changeEvent(e,n,null),t.dispatchEvent("clear",{value:n},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())},handleGlobalMousedownEvent:function(e){var t,n,a=this,i=a.reactData,o=i.visiblePanel;a.computeIsDisabled||(t=a.$refs.refElem,n=a.$refs.refOptionPanel,i.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!i.isActivated&&a.hideOptionPanel())},handleGlobalBlurEvent:function(){var e=this.reactData,t=e.visiblePanel,n=e.isActivated;t&&this.hideOptionPanel(),n&&(e.isActivated=!1),(t||n)&&(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,a=t.searchValue,i=e.computeRemoteOpts,o=i.queryMethod||e.remoteMethod;e.remote&&o&&i.enabled&&(t.searchLoading=!0,Promise.resolve(o({$cascader:e,searchValue:a,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.$event.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel():this.showOptionPanel()},nodeClickEvent:function(e){var t=e.$event;this.dispatchEvent("node-click",e,t)},radioChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node),this.hideOptionPanel()},checkboxChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node)},loadSuccessEvent:function(){this.cacheDataMap()},renderVN:function(e){var t=this,n=t,a=t.$scopedSlots,i=t.reactData,o=n.className,r=n.value,l=n.multiple,u=n.loading,c=n.filterable,s=n.showTotalButoon,d=n.showCheckedButoon,p=n.showClearButton,f=i.initialized,h=i.isActivated,v=i.isAniVisible,m=i.visiblePanel,g=i.searchValue,b=t.computeSize,_=t.computeIsDisabled,x=t.computeSelectLabel,E=t.computeBtnTransfer,P=t.computePopupWrapperStyle,y=a.header,C=a.footer,O=a.prefix,a=t.computePopupOpts.className;return t.computeFormReadonly?e("div",{ref:"refElem",class:["vxe-cascader--readonly",o]},[e("span",{class:"vxe-cascader-label"},x)]):(r=_xeUtils.default.eqNull(r)?[]:_xeUtils.default.isArray(r)?r:[r],e("div",{ref:"refElem",class:["vxe-cascader",o?_xeUtils.default.isFunction(o)?o({$cascader:t}):o:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(b),b),"is--filterable",c),"is--visible",m),"is--disabled",_),"is--loading",u),"is--active",h)]},[e(_input.default,{ref:"refInput",props:{clearable:n.clearable,placeholder:n.placeholder,editable:!1,disabled:_,type:"text",prefixIcon:n.prefixIcon,suffixIcon:u?(0,_ui.getIcon)().TREE_SELECT_LOADED:m?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,value:u?(0,_ui.getI18n)("vxe.select.loadingText"):x,title:x},on:{clear:t.clearEvent,click:t.clickEvent,focus:t.focusEvent,blur:t.blurEvent,"suffix-click":t.togglePanelEvent},scopedSlots:O?{prefix:function(){return O({})}}:{}}),e("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-cascader--panel",a?_xeUtils.default.isFunction(a)?a({$cascader:t}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(b),b),"is--transfer",E),"ani--leave",!u&&v),"ani--enter",!u&&m)],attrs:{placement:i.panelPlacement},style:i.panelStyle},f?[e("div",{class:"vxe-cascader--panel-wrapper"},[c?e("div",{class:"vxe-cascader--panel-search"},[e(_input.default,{ref:"refInpSearch",class:"vxe-cascader-search--input",props:{value:g,title:x,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.cascader.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":t.modelSearchEvent}})]):(0,_ui.renderEmptyElement)(t),s||d&&l||p||y?e("div",{class:"vxe-cascader--panel-header"},y?y({}):[e("div",{class:"vxe-cascader--header-button"},[s?e("div",{class:"vxe-cascader--header-total"},(0,_ui.getI18n)("vxe.cascader.total",[r.length])):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-cascader--header-btns"},[d&&l?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.cascader.allChecked"),mode:"text"},on:{click:t.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(t),p?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.cascader.clearChecked"),mode:"text"},on:{click:t.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(t)])])]):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-cascader--panel-body"},[e("div",{ref:"refTreeWrapper",class:"vxe-cascader-tree--wrapper",style:P},[])]),C?e("div",{class:"vxe-cascader--panel-footer"},C({})):(0,_ui.renderEmptyElement)(t)])]:[])]))}},watch:{options:function(){this.cacheDataMap()}},created:function(){this.cacheDataMap()},mounted:function(){var e=this;_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.$refs.refOptionPanel;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_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"),_util=require("../../tree/src/util"),_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 getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeCascader",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Array],clearable:Boolean,placeholder:{type:String,default:function(){return _xeUtils.default.eqNull((0,_ui.getConfig)().cascader.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().cascader.placeholder}},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],prefixIcon:String,placement:String,transform:Boolean,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:function(){return(0,_ui.getConfig)().cascader.size||(0,_ui.getConfig)().size}},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,autoClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.autoClose}},showTotalButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showTotalButton}},showCheckedButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showCheckedButton}},showClearButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().cascader.showClearButton}},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{$xeCascader:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,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,a=e.$xeDrawer,i=e.$xeForm,e=e.transfer;if(null===e){var o=(0,_ui.getConfig)().cascader.transfer;if(_xeUtils.default.isBoolean(o))return o;if(t||n||a||i)return!0}return e},computePopupOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.popupConfig,this.popupConfig)},computeTreeOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.treeConfig,this.treeConfig)},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.computeValueField},computeLabelField:function(){return this.computePropsOpts.label||"label"},computeValueField:function(){return this.computePropsOpts.value||"value"},computeChildrenField:function(){return this.computePropsOpts.children||"children"},computeParentField:function(){return this.computePropsOpts.parent||"parentField"},computeHasChildField:function(){return this.computePropsOpts.hasChild||"hasChild"},computeRemoteOpts:function(){return Object.assign({},(0,_ui.getConfig)().cascader.remoteConfig,this.remoteConfig)},computeFilterOpts:function(){var e=this.computeTreeOpts;return Object.assign({},e.filterConfig,this.filterConfig)},computeSelectLabel:function(){var e=this.internalData,t=this.value,n=this.lazyOptions,a=e.fullNodeMaps,i=this.computeValueField,o=this.computeLabelField;return(_xeUtils.default.eqNull(t)?[]:_xeUtils.default.isArray(t)?t:[t]).map(function(t){var e=a[t];if(e)return e.item[o];if(n){e=n.find(function(e){return e[i]===t});if(e)return e[o]}return t}).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,{$cascader:this},t))},emitModel:function(e){var t=this._events;t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},getNodeid:function(e){e=e[this.computeNodeKeyField];return e?encodeURIComponent(e):""},cacheDataMap:function(){var l=this,e=l.internalData,t=l.options,u=l.computeNodeKeyField,c=l.computeValueField,s={},d={};_xeUtils.default.eachTree(t,function(e,t,n,a,i,o){var r=(r=l.getNodeid(e))||getOptUniqueId(),r=(d[r]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(u),r]),d[r]=!0,e[c]);s[r]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] ".concat(c),r]),s[r]={item:e,index:t,items:n,parent:i,nodes:o}},{children:l.computeChildrenField}),e.fullOptionList=t||[],e.fullNodeMaps=s},updateZindex:function(){var e=this.reactData,t=this.zIndex;t?e.panelIndex=t:e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){function e(){var e=(0,_dom.updatePanelPlacement)(o,r,{placement:u.placement||a,defaultPlacement:u.defaultPlacement,teleportTo:l}),t=Object.assign(e.style,{zIndex:i});n.panelStyle=t,n.panelPlacement=e.placement}var t=this,n=t.reactData,a=t.placement,i=n.panelIndex,o=t.$refs.refElem,r=t.$refs.refOptionPanel,l=t.computeBtnTransfer,u=t.computePopupOpts;return e(),t.$nextTick().then(e)},showOptionPanel:function(){var e=this,t=e.reactData,n=e.internalData,a=e.loading,i=e.remote,o=e.filterable,r=n.fullOptionList,l=e.computeRemoteOpts;a||e.computeIsDisabled||(n.hpTimeout&&clearTimeout(n.hpTimeout),t.initialized||(t.initialized=!0,a=e.computeBtnTransfer,n=e.$refs.refOptionPanel,a&&n&&document.body.appendChild(n)),t.isActivated=!0,t.isAniVisible=!0,o&&i&&l.enabled&&l.autoLoad&&!r.length&&e.handleSearchEvent(),setTimeout(function(){t.visiblePanel=!0,e.handleFocusSearch()},10),e.updateZindex(),e.updatePlacement())},hideOptionPanel:function(){var e=this.reactData,t=this.internalData;e.visiblePanel=!1,t.hpTimeout=setTimeout(function(){e.isAniVisible=!1},350)},changeEvent:function(e,t,n){var a=this,i=a,o=a.$xeForm,r=a.formItemInfo,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);a.emitModel(t),t!==i.value&&(a.dispatchEvent("change",{value:t,node:n,option:n},e),o)&&r&&o.triggerItemEvent(e,r.itemConfig.field,t)},clearValueEvent:function(e,t){this.changeEvent(e,t,null),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e,t){this.clearValueEvent(t,null),this.hideOptionPanel()},allCheckedPanelEvent:function(e){var n=this,a=e.$event,e=n.multiple,i=n.autoClose,t=n.$refs.refTree;e&&t&&t.setAllCheckboxNode(!0).then(function(e){var t=e.checkNodeKeys;n.changeEvent(a,t,e.checkNodes[0]),n.dispatchEvent("all-change",{value:t},a),i&&n.hideOptionPanel()})},clearCheckedPanelEvent:function(e){var t=this,e=e.$event,n=t.multiple,a=t.autoClose,i=t.$refs.refTree;i&&(n=n?[]:null,i.clearCheckboxNode().then(function(){a&&t.hideOptionPanel()}),t.changeEvent(e,n,null),t.dispatchEvent("clear",{value:n},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())},handleGlobalMousedownEvent:function(e){var t,n,a=this,i=a.reactData,o=i.visiblePanel;a.computeIsDisabled||(t=a.$refs.refElem,n=a.$refs.refOptionPanel,i.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,o&&!i.isActivated&&a.hideOptionPanel())},handleGlobalBlurEvent:function(){var e=this.reactData,t=e.visiblePanel,n=e.isActivated;t&&this.hideOptionPanel(),n&&(e.isActivated=!1),(t||n)&&(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,a=t.searchValue,i=e.computeRemoteOpts,o=i.queryMethod||e.remoteMethod;e.remote&&o&&i.enabled&&(t.searchLoading=!0,Promise.resolve(o({$cascader:e,searchValue:a,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.$event.preventDefault(),t.triggerFocusPanel?t.triggerFocusPanel=!1:t.visiblePanel?this.hideOptionPanel():this.showOptionPanel()},nodeClickEvent:function(e){var t=e.$event;this.dispatchEvent("node-click",e,t)},radioChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node),this.hideOptionPanel()},checkboxChangeEvent:function(e){var t=e.value;this.changeEvent(e.$event,t,e.node)},loadSuccessEvent:function(){this.cacheDataMap()},renderVN:function(e){var t=this,n=t,a=t.$scopedSlots,i=t.reactData,o=n.className,r=n.value,l=n.multiple,u=n.loading,c=n.filterable,s=n.showTotalButton,d=n.showCheckedButton,p=n.showClearButton,f=i.initialized,h=i.isActivated,v=i.isAniVisible,m=i.visiblePanel,g=i.searchValue,b=t.computeSize,_=t.computeIsDisabled,x=t.computeSelectLabel,E=t.computeBtnTransfer,P=t.computePopupWrapperStyle,y=a.header,C=a.footer,O=a.prefix,a=t.computePopupOpts.className;return t.computeFormReadonly?e("div",{ref:"refElem",class:["vxe-cascader--readonly",o]},[e("span",{class:"vxe-cascader-label"},x)]):(r=_xeUtils.default.eqNull(r)?[]:_xeUtils.default.isArray(r)?r:[r],e("div",{ref:"refElem",class:["vxe-cascader",o?_xeUtils.default.isFunction(o)?o({$cascader:t}):o:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(b),b),"is--filterable",c),"is--visible",m),"is--disabled",_),"is--loading",u),"is--active",h)]},[e(_input.default,{ref:"refInput",props:{clearable:n.clearable,placeholder:n.placeholder,editable:!1,disabled:_,type:"text",prefixIcon:n.prefixIcon,suffixIcon:u?(0,_ui.getIcon)().TREE_SELECT_LOADED:m?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,value:u?(0,_ui.getI18n)("vxe.select.loadingText"):x,title:x},on:{clear:t.clearEvent,click:t.clickEvent,focus:t.focusEvent,blur:t.blurEvent,"suffix-click":t.togglePanelEvent},scopedSlots:O?{prefix:function(){return O({})}}:{}}),e("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-cascader--panel",a?_xeUtils.default.isFunction(a)?a({$cascader:t}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(b),b),"is--transfer",E),"ani--leave",!u&&v),"ani--enter",!u&&m)],attrs:{placement:i.panelPlacement},style:i.panelStyle},f?[e("div",{class:"vxe-cascader--panel-wrapper"},[c?e("div",{class:"vxe-cascader--panel-search"},[e(_input.default,{ref:"refInpSearch",class:"vxe-cascader-search--input",props:{value:g,title:x,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.cascader.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH},on:{"model-value":t.modelSearchEvent}})]):(0,_ui.renderEmptyElement)(t),s||d&&l||p||y?e("div",{class:"vxe-cascader--panel-header"},y?y({}):[e("div",{class:"vxe-cascader--header-button"},[s?e("div",{class:"vxe-cascader--header-total"},(0,_ui.getI18n)("vxe.cascader.total",[r.length])):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-cascader--header-btns"},[d&&l?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.cascader.allChecked"),mode:"text"},on:{click:t.allCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(t),p?e(_button.default,{props:{content:(0,_ui.getI18n)("vxe.cascader.clearChecked"),mode:"text"},on:{click:t.clearCheckedPanelEvent}}):(0,_ui.renderEmptyElement)(t)])])]):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-cascader--panel-body"},[e("div",{ref:"refTreeWrapper",class:"vxe-cascader-tree--wrapper",style:P},[])]),C?e("div",{class:"vxe-cascader--panel-footer"},C({})):(0,_ui.renderEmptyElement)(t)])]:[])]))}},watch:{options:function(){this.cacheDataMap()}},created:function(){this.cacheDataMap()},mounted:function(){var e=this;_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.$refs.refOptionPanel;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_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)}});
|
package/lib/index.umd.js
CHANGED
|
@@ -13214,7 +13214,7 @@ function checkDynamic() {
|
|
|
13214
13214
|
}
|
|
13215
13215
|
;// ./packages/ui/src/log.ts
|
|
13216
13216
|
|
|
13217
|
-
var log_version = "ui v".concat("3.14.
|
|
13217
|
+
var log_version = "ui v".concat("3.14.34");
|
|
13218
13218
|
var warnLog = log.create('warn', log_version);
|
|
13219
13219
|
var errLog = log.create('error', log_version);
|
|
13220
13220
|
;// ./packages/ui/index.ts
|
|
@@ -13222,7 +13222,7 @@ var errLog = log.create('error', log_version);
|
|
|
13222
13222
|
|
|
13223
13223
|
|
|
13224
13224
|
|
|
13225
|
-
var ui_version = "3.14.
|
|
13225
|
+
var ui_version = "3.14.34";
|
|
13226
13226
|
VxeUI.uiVersion = ui_version;
|
|
13227
13227
|
VxeUI.dynamicApp = dynamicApp;
|
|
13228
13228
|
function config(options) {
|
|
@@ -24321,16 +24321,16 @@ function cascader_createInternalData() {
|
|
|
24321
24321
|
return getConfig().cascader.autoClose;
|
|
24322
24322
|
}
|
|
24323
24323
|
},
|
|
24324
|
-
|
|
24324
|
+
showTotalButton: {
|
|
24325
24325
|
type: Boolean,
|
|
24326
24326
|
default: function _default() {
|
|
24327
|
-
return getConfig().cascader.
|
|
24327
|
+
return getConfig().cascader.showTotalButton;
|
|
24328
24328
|
}
|
|
24329
24329
|
},
|
|
24330
|
-
|
|
24330
|
+
showCheckedButton: {
|
|
24331
24331
|
type: Boolean,
|
|
24332
24332
|
default: function _default() {
|
|
24333
|
-
return getConfig().cascader.
|
|
24333
|
+
return getConfig().cascader.showCheckedButton;
|
|
24334
24334
|
}
|
|
24335
24335
|
},
|
|
24336
24336
|
showClearButton: {
|
|
@@ -24973,8 +24973,8 @@ function cascader_createInternalData() {
|
|
|
24973
24973
|
multiple = props.multiple,
|
|
24974
24974
|
loading = props.loading,
|
|
24975
24975
|
filterable = props.filterable,
|
|
24976
|
-
|
|
24977
|
-
|
|
24976
|
+
showTotalButton = props.showTotalButton,
|
|
24977
|
+
showCheckedButton = props.showCheckedButton,
|
|
24978
24978
|
showClearButton = props.showClearButton;
|
|
24979
24979
|
var initialized = reactData.initialized,
|
|
24980
24980
|
isActivated = reactData.isActivated,
|
|
@@ -25059,15 +25059,15 @@ function cascader_createInternalData() {
|
|
|
25059
25059
|
on: {
|
|
25060
25060
|
'model-value': $xeCascader.modelSearchEvent
|
|
25061
25061
|
}
|
|
25062
|
-
})]) : renderEmptyElement($xeCascader),
|
|
25062
|
+
})]) : renderEmptyElement($xeCascader), showTotalButton || showCheckedButton && multiple || showClearButton || headerSlot ? h('div', {
|
|
25063
25063
|
class: 'vxe-cascader--panel-header'
|
|
25064
25064
|
}, headerSlot ? headerSlot({}) : [h('div', {
|
|
25065
25065
|
class: 'vxe-cascader--header-button'
|
|
25066
|
-
}, [
|
|
25066
|
+
}, [showTotalButton ? h('div', {
|
|
25067
25067
|
class: 'vxe-cascader--header-total'
|
|
25068
25068
|
}, getI18n('vxe.cascader.total', [selectVals.length])) : renderEmptyElement($xeCascader), h('div', {
|
|
25069
25069
|
class: 'vxe-cascader--header-btns'
|
|
25070
|
-
}, [
|
|
25070
|
+
}, [showCheckedButton && multiple ? h(src_button, {
|
|
25071
25071
|
props: {
|
|
25072
25072
|
content: getI18n('vxe.cascader.allChecked'),
|
|
25073
25073
|
mode: 'text'
|
|
@@ -45256,7 +45256,7 @@ function select_createInternalData() {
|
|
|
45256
45256
|
showCheckbox: {
|
|
45257
45257
|
type: Boolean,
|
|
45258
45258
|
default: function _default() {
|
|
45259
|
-
return getConfig().select.
|
|
45259
|
+
return getConfig().select.showCheckedButton;
|
|
45260
45260
|
}
|
|
45261
45261
|
},
|
|
45262
45262
|
checkboxConfig: Object,
|
|
@@ -45299,16 +45299,16 @@ function select_createInternalData() {
|
|
|
45299
45299
|
return getConfig().select.showCloseButton;
|
|
45300
45300
|
}
|
|
45301
45301
|
},
|
|
45302
|
-
|
|
45302
|
+
showTotalButton: {
|
|
45303
45303
|
type: Boolean,
|
|
45304
45304
|
default: function _default() {
|
|
45305
|
-
return getConfig().select.
|
|
45305
|
+
return getConfig().select.showTotalButton;
|
|
45306
45306
|
}
|
|
45307
45307
|
},
|
|
45308
|
-
|
|
45308
|
+
showCheckedButton: {
|
|
45309
45309
|
type: Boolean,
|
|
45310
45310
|
default: function _default() {
|
|
45311
|
-
return getConfig().select.
|
|
45311
|
+
return getConfig().select.showCheckedButton;
|
|
45312
45312
|
}
|
|
45313
45313
|
},
|
|
45314
45314
|
showClearButton: {
|
|
@@ -47025,8 +47025,8 @@ function select_createInternalData() {
|
|
|
47025
47025
|
multiple = props.multiple,
|
|
47026
47026
|
loading = props.loading,
|
|
47027
47027
|
filterable = props.filterable,
|
|
47028
|
-
|
|
47029
|
-
|
|
47028
|
+
showTotalButton = props.showTotalButton,
|
|
47029
|
+
showCheckedButton = props.showCheckedButton,
|
|
47030
47030
|
showClearButton = props.showClearButton,
|
|
47031
47031
|
showCloseButton = props.showCloseButton;
|
|
47032
47032
|
var initialized = reactData.initialized,
|
|
@@ -47131,13 +47131,13 @@ function select_createInternalData() {
|
|
|
47131
47131
|
change: $xeSelect.triggerSearchEvent,
|
|
47132
47132
|
search: $xeSelect.triggerSearchEvent
|
|
47133
47133
|
}
|
|
47134
|
-
})]) : renderEmptyElement($xeSelect),
|
|
47134
|
+
})]) : renderEmptyElement($xeSelect), showCheckedButton && multiple || showClearButton || headerSlot ? h('div', {
|
|
47135
47135
|
class: 'vxe-select--panel-header'
|
|
47136
47136
|
}, headerSlot ? $xeSelect.callSlot(headerSlot, {}, h) : [h('div', {
|
|
47137
47137
|
class: 'vxe-tree-select--header-button'
|
|
47138
47138
|
}, [h('div', {
|
|
47139
47139
|
class: 'vxe-tree-select--header-btns'
|
|
47140
|
-
}, [
|
|
47140
|
+
}, [showCheckedButton && multiple ? h(src_button, {
|
|
47141
47141
|
props: {
|
|
47142
47142
|
content: getI18n('vxe.select.allChecked'),
|
|
47143
47143
|
mode: 'text'
|
|
@@ -47172,11 +47172,11 @@ function select_createInternalData() {
|
|
|
47172
47172
|
style: {
|
|
47173
47173
|
transform: "translateY(".concat(topSpaceHeight, "px)")
|
|
47174
47174
|
}
|
|
47175
|
-
}, $xeSelect.renderOpts(h))])]), footerSlot ||
|
|
47175
|
+
}, $xeSelect.renderOpts(h))])]), footerSlot || showTotalButton || showCloseButton && multiple ? h('div', {
|
|
47176
47176
|
class: 'vxe-select--panel-footer'
|
|
47177
47177
|
}, footerSlot ? $xeSelect.callSlot(footerSlot, {}, h) : [h('div', {
|
|
47178
47178
|
class: 'vxe-select--footer-button'
|
|
47179
|
-
}, [
|
|
47179
|
+
}, [showTotalButton ? h('div', {
|
|
47180
47180
|
class: 'vxe-select--total-btns'
|
|
47181
47181
|
}, getI18n('vxe.select.total', [selectVals.length, optList.length])) : renderEmptyElement($xeSelect), showCloseButton && multiple ? h('div', {
|
|
47182
47182
|
class: 'vxe-select--oper-btns'
|
|
@@ -59994,16 +59994,16 @@ function tree_select_createInternalData() {
|
|
|
59994
59994
|
return getConfig().treeSelect.showCloseButton;
|
|
59995
59995
|
}
|
|
59996
59996
|
},
|
|
59997
|
-
|
|
59997
|
+
showTotalButton: {
|
|
59998
59998
|
type: Boolean,
|
|
59999
59999
|
default: function _default() {
|
|
60000
|
-
return getConfig().treeSelect.
|
|
60000
|
+
return getConfig().treeSelect.showTotalButton;
|
|
60001
60001
|
}
|
|
60002
60002
|
},
|
|
60003
|
-
|
|
60003
|
+
showCheckedButton: {
|
|
60004
60004
|
type: Boolean,
|
|
60005
60005
|
default: function _default() {
|
|
60006
|
-
return getConfig().treeSelect.
|
|
60006
|
+
return getConfig().treeSelect.showCheckedButton;
|
|
60007
60007
|
}
|
|
60008
60008
|
},
|
|
60009
60009
|
showClearButton: {
|
|
@@ -60738,8 +60738,8 @@ function tree_select_createInternalData() {
|
|
|
60738
60738
|
loading = props.loading,
|
|
60739
60739
|
menuConfig = props.menuConfig,
|
|
60740
60740
|
filterable = props.filterable,
|
|
60741
|
-
|
|
60742
|
-
|
|
60741
|
+
showTotalButton = props.showTotalButton,
|
|
60742
|
+
showCheckedButton = props.showCheckedButton,
|
|
60743
60743
|
showClearButton = props.showClearButton,
|
|
60744
60744
|
showExpandButton = props.showExpandButton,
|
|
60745
60745
|
showCloseButton = props.showCloseButton;
|
|
@@ -60861,13 +60861,13 @@ function tree_select_createInternalData() {
|
|
|
60861
60861
|
on: {
|
|
60862
60862
|
'model-value': $xeTreeSelect.modelSearchEvent
|
|
60863
60863
|
}
|
|
60864
|
-
})]) : renderEmptyElement($xeTreeSelect),
|
|
60864
|
+
})]) : renderEmptyElement($xeTreeSelect), showCheckedButton && multiple || showClearButton || showExpandButton || headerSlot ? h('div', {
|
|
60865
60865
|
class: 'vxe-tree-select--panel-header'
|
|
60866
60866
|
}, headerSlot ? headerSlot({}) : [h('div', {
|
|
60867
60867
|
class: 'vxe-tree-select--header-button'
|
|
60868
|
-
}, [
|
|
60868
|
+
}, [showCheckedButton && showClearButton ? h('div', {
|
|
60869
60869
|
class: 'vxe-tree-select--selected-btns'
|
|
60870
|
-
}, [
|
|
60870
|
+
}, [showCheckedButton && multiple ? h(packages_button, {
|
|
60871
60871
|
props: {
|
|
60872
60872
|
content: getI18n('vxe.treeSelect.allChecked'),
|
|
60873
60873
|
mode: 'text'
|
|
@@ -60958,11 +60958,11 @@ function tree_select_createInternalData() {
|
|
|
60958
60958
|
'load-success': $xeTreeSelect.loadSuccessEvent
|
|
60959
60959
|
},
|
|
60960
60960
|
scopedSlots: treeScopedSlots
|
|
60961
|
-
})])]), footerSlot ||
|
|
60961
|
+
})])]), footerSlot || showTotalButton || showCloseButton && multiple ? h('div', {
|
|
60962
60962
|
class: 'vxe-tree-select--panel-footer'
|
|
60963
60963
|
}, footerSlot ? footerSlot({}) : [h('div', {
|
|
60964
60964
|
class: 'vxe-tree-select--footer-button'
|
|
60965
|
-
}, [
|
|
60965
|
+
}, [showTotalButton ? h('div', {
|
|
60966
60966
|
class: 'vxe-tree-select--total-btns'
|
|
60967
60967
|
}, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeTreeSelect), showCloseButton && multiple ? h('div', {
|
|
60968
60968
|
class: 'vxe-tree-select--oper-btns'
|