vxe-pc-ui 4.16.26 → 4.16.27
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/dist/all.esm.js +57 -21
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +6 -0
- package/es/list/src/list.js +14 -8
- package/es/number-input/src/number-input.js +4 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/textarea/src/textarea.js +6 -0
- package/es/tree/src/tree.js +17 -11
- package/es/tree-select/src/tree-select.js +8 -0
- package/es/tree-select/style.css +6 -0
- package/es/tree-select/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-tree-select/style.css +6 -0
- package/es/vxe-tree-select/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +65 -34
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +6 -0
- package/lib/input/src/input.min.js +1 -1
- package/lib/list/src/list.js +18 -14
- package/lib/list/src/list.min.js +1 -1
- package/lib/number-input/src/number-input.js +4 -0
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +5 -0
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tree/src/tree.js +20 -18
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +10 -0
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/tree-select/style/style.css +6 -0
- package/lib/tree-select/style/style.min.css +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/lib/vxe-tree-select/style/style.css +6 -0
- package/lib/vxe-tree-select/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/input/src/input.ts +6 -0
- package/packages/list/src/list.ts +14 -8
- package/packages/number-input/src/number-input.ts +4 -0
- package/packages/textarea/src/textarea.ts +5 -0
- package/packages/tree/src/tree.ts +17 -11
- package/packages/tree-select/src/tree-select.ts +8 -0
- package/styles/components/tree-select.scss +7 -0
- package/types/components/grid.d.ts +176 -0
- package/types/components/tree-select.d.ts +6 -1
- /package/es/icon/{iconfont.1785912579396.ttf → iconfont.1785940507447.ttf} +0 -0
- /package/es/icon/{iconfont.1785912579396.woff → iconfont.1785940507447.woff} +0 -0
- /package/es/icon/{iconfont.1785912579396.woff2 → iconfont.1785940507447.woff2} +0 -0
- /package/es/{iconfont.1785912579396.ttf → iconfont.1785940507447.ttf} +0 -0
- /package/es/{iconfont.1785912579396.woff → iconfont.1785940507447.woff} +0 -0
- /package/es/{iconfont.1785912579396.woff2 → iconfont.1785940507447.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1785912579396.ttf → iconfont.1785940507447.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1785912579396.woff → iconfont.1785940507447.woff} +0 -0
- /package/lib/icon/style/{iconfont.1785912579396.woff2 → iconfont.1785940507447.woff2} +0 -0
- /package/lib/{iconfont.1785912579396.ttf → iconfont.1785940507447.ttf} +0 -0
- /package/lib/{iconfont.1785912579396.woff → iconfont.1785940507447.woff} +0 -0
- /package/lib/{iconfont.1785912579396.woff2 → iconfont.1785940507447.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.16.
|
|
84
|
+
const uiVersion = `ui v${"4.16.27"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$h = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.16.
|
|
98
|
+
const version = "4.16.27";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -8638,13 +8638,12 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8638
8638
|
}
|
|
8639
8639
|
return renderEmptyElement($xeList);
|
|
8640
8640
|
};
|
|
8641
|
-
const renderRadio = (row, rowid, isChecked) => {
|
|
8641
|
+
const renderRadio = (row, rowid, isDisabled, isChecked) => {
|
|
8642
8642
|
const { showRadio } = props;
|
|
8643
8643
|
const radioOpts = computeRadioOpts.value;
|
|
8644
|
-
const { showIcon,
|
|
8644
|
+
const { showIcon, visibleMethod } = radioOpts;
|
|
8645
8645
|
const isVisible = !visibleMethod || visibleMethod({ $list: $xeList, row });
|
|
8646
8646
|
if (showRadio && showIcon && isVisible) {
|
|
8647
|
-
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
8648
8647
|
return h('div', {
|
|
8649
8648
|
key: 'ct2',
|
|
8650
8649
|
class: ['vxe-list--radio-option', {
|
|
@@ -8664,13 +8663,12 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8664
8663
|
}
|
|
8665
8664
|
return renderEmptyElement($xeList);
|
|
8666
8665
|
};
|
|
8667
|
-
const renderCheckbox = (row, rowid, isChecked) => {
|
|
8666
|
+
const renderCheckbox = (row, rowid, isDisabled, isChecked) => {
|
|
8668
8667
|
const { showCheckbox } = props;
|
|
8669
8668
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
8670
|
-
const { showIcon,
|
|
8669
|
+
const { showIcon, visibleMethod } = checkboxOpts;
|
|
8671
8670
|
const isVisible = !visibleMethod || visibleMethod({ $list: $xeList, row });
|
|
8672
8671
|
if (showCheckbox && showIcon && isVisible) {
|
|
8673
|
-
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
8674
8672
|
return h('div', {
|
|
8675
8673
|
key: 'ct3',
|
|
8676
8674
|
class: ['vxe-list--checkbox-option', {
|
|
@@ -8698,6 +8696,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8698
8696
|
const extraSlot = slots.extra;
|
|
8699
8697
|
const dragOpts = computeDragOpts.value;
|
|
8700
8698
|
const { trigger, icon, disabledMethod, visibleMethod } = dragOpts;
|
|
8699
|
+
const radioOpts = computeRadioOpts.value;
|
|
8700
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
8701
8701
|
const rowOpts = computeRowOpts.value;
|
|
8702
8702
|
const { useKey, contentField, className: rowClassName, isCurrent } = rowOpts;
|
|
8703
8703
|
const isDrag = computeIsDrag.value;
|
|
@@ -8708,19 +8708,23 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8708
8708
|
const rowid = enModelValue(rowKey);
|
|
8709
8709
|
const rowParams = { row, $list: $xeList };
|
|
8710
8710
|
let isRadioChecked = false;
|
|
8711
|
+
let isRadioDisabled = false;
|
|
8711
8712
|
if (showRadio) {
|
|
8712
8713
|
isRadioChecked = selectRadioRow && (row === selectRadioRow || eqRowByKey(selectRadioRow, rowKey));
|
|
8714
|
+
isRadioDisabled = radioOpts.checkMethod ? !radioOpts.checkMethod({ $list: $xeList, row }) : false;
|
|
8713
8715
|
}
|
|
8714
8716
|
let isCheckboxChecked = false;
|
|
8717
|
+
let isCheckboxDisabled = false;
|
|
8715
8718
|
if (showCheckbox) {
|
|
8716
8719
|
isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
|
|
8720
|
+
isCheckboxDisabled = checkboxOpts.checkMethod ? !checkboxOpts.checkMethod({ $list: $xeList, row }) : false;
|
|
8717
8721
|
}
|
|
8718
8722
|
const ctVNs = [];
|
|
8719
8723
|
if (showRadio) {
|
|
8720
|
-
ctVNs.push(renderRadio(row, rowid, isRadioChecked));
|
|
8724
|
+
ctVNs.push(renderRadio(row, rowid, isRadioDisabled, isRadioChecked));
|
|
8721
8725
|
}
|
|
8722
8726
|
if (showCheckbox) {
|
|
8723
|
-
ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
|
|
8727
|
+
ctVNs.push(renderCheckbox(row, rowid, isCheckboxDisabled, isCheckboxChecked));
|
|
8724
8728
|
}
|
|
8725
8729
|
let isDragDisabled = false;
|
|
8726
8730
|
if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
|
|
@@ -8779,7 +8783,9 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8779
8783
|
return h('div', Object.assign({ key: hasKey && keyField ? rowid : rowIndex, class: ['vxe-list--row', isRowFnCls ? rowClassName(rowParams) : (rowClassName || ''), {
|
|
8780
8784
|
'is--drag-disabled': isDragDisabled,
|
|
8781
8785
|
'is--current': currRowFlag && currentRow && eqRowByKey(currentRow, rowKey),
|
|
8786
|
+
'is-radio--disabled': isRadioDisabled,
|
|
8782
8787
|
'is-radio--checked': isRadioChecked,
|
|
8788
|
+
'is-checkbox--disabled': isCheckboxDisabled,
|
|
8783
8789
|
'is-checkbox--checked': isCheckboxChecked
|
|
8784
8790
|
}], rowid: hasKey && keyField ? rowid : undefined }, rowOns), ctVNs);
|
|
8785
8791
|
};
|
|
@@ -9791,6 +9797,12 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9791
9797
|
}
|
|
9792
9798
|
else {
|
|
9793
9799
|
inputMethods.dispatchEvent('input', { value }, evnt);
|
|
9800
|
+
if (!$xeSelect && !$xeTreeSelect) {
|
|
9801
|
+
// 自动更新校验状态
|
|
9802
|
+
if ($xeForm && formItemInfo) {
|
|
9803
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
9804
|
+
}
|
|
9805
|
+
}
|
|
9794
9806
|
}
|
|
9795
9807
|
}
|
|
9796
9808
|
};
|
|
@@ -15453,6 +15465,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15453
15465
|
}
|
|
15454
15466
|
else {
|
|
15455
15467
|
numberInputMethods.dispatchEvent('input', { value }, evnt);
|
|
15468
|
+
// 自动更新校验状态
|
|
15469
|
+
if ($xeForm && formItemInfo) {
|
|
15470
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
15471
|
+
}
|
|
15456
15472
|
}
|
|
15457
15473
|
};
|
|
15458
15474
|
const inputEvent = (evnt) => {
|
|
@@ -40457,6 +40473,12 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40457
40473
|
if (immediate) {
|
|
40458
40474
|
handleChange(value, evnt);
|
|
40459
40475
|
}
|
|
40476
|
+
else {
|
|
40477
|
+
// 自动更新校验状态
|
|
40478
|
+
if ($xeForm && formItemInfo) {
|
|
40479
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
40480
|
+
}
|
|
40481
|
+
}
|
|
40460
40482
|
$xeTextarea.dispatchEvent('input', { value }, evnt);
|
|
40461
40483
|
handleResize();
|
|
40462
40484
|
};
|
|
@@ -43963,13 +43985,12 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43963
43985
|
}
|
|
43964
43986
|
return true;
|
|
43965
43987
|
};
|
|
43966
|
-
const renderRadio = (node, nodeid, isExistChild, nLevel, isChecked) => {
|
|
43988
|
+
const renderRadio = (node, nodeid, isExistChild, nLevel, isDisabled, isChecked) => {
|
|
43967
43989
|
const { showRadio } = props;
|
|
43968
43990
|
const radioOpts = computeRadioOpts.value;
|
|
43969
|
-
const { showIcon,
|
|
43991
|
+
const { showIcon, visibleMode, visibleMethod } = radioOpts;
|
|
43970
43992
|
const isVisible = visibleMethod ? visibleMethod({ $tree: $xeTree, node }) : handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
|
|
43971
43993
|
if (showRadio && showIcon && isVisible) {
|
|
43972
|
-
const isDisabled = checkMethod ? !checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
43973
43994
|
return h('div', {
|
|
43974
43995
|
class: ['vxe-tree--radio-option', {
|
|
43975
43996
|
'is--checked': isChecked,
|
|
@@ -43988,13 +44009,12 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43988
44009
|
}
|
|
43989
44010
|
return renderEmptyElement($xeTree);
|
|
43990
44011
|
};
|
|
43991
|
-
const renderCheckbox = (node, nodeid, isExistChild, nLevel, isChecked, isIndeterminate) => {
|
|
44012
|
+
const renderCheckbox = (node, nodeid, isExistChild, nLevel, isDisabled, isChecked, isIndeterminate) => {
|
|
43992
44013
|
const { showCheckbox } = props;
|
|
43993
44014
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
43994
|
-
const { showIcon,
|
|
44015
|
+
const { showIcon, visibleMode, visibleMethod } = checkboxOpts;
|
|
43995
44016
|
const isVisible = visibleMethod ? visibleMethod({ $tree: $xeTree, node }) : handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
|
|
43996
44017
|
if (showCheckbox && showIcon && isVisible) {
|
|
43997
|
-
const isDisabled = checkMethod ? !checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
43998
44018
|
return h('div', {
|
|
43999
44019
|
class: ['vxe-tree--checkbox-option', {
|
|
44000
44020
|
'is--checked': isChecked,
|
|
@@ -44020,6 +44040,8 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
44020
44040
|
const { afterTreeList, nodeMaps, treeExpandedMaps, treeExpandLazyLoadedMaps } = internalData;
|
|
44021
44041
|
const tooltipOpts = computeTooltipOpts.value;
|
|
44022
44042
|
const { mode: tipMode } = tooltipOpts;
|
|
44043
|
+
const radioOpts = computeRadioOpts.value;
|
|
44044
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
44023
44045
|
const childrenField = computeChildrenField.value;
|
|
44024
44046
|
const titleField = computeTitleField.value;
|
|
44025
44047
|
const hasChildField = computeHasChildField.value;
|
|
@@ -44033,14 +44055,18 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
44033
44055
|
const nodeTitle = getText(XEUtils.get(node, titleField));
|
|
44034
44056
|
const nLevel = nodeItem.level;
|
|
44035
44057
|
let isRadioChecked = false;
|
|
44058
|
+
let isRadioDisabled = false;
|
|
44036
44059
|
if (showRadio) {
|
|
44037
44060
|
isRadioChecked = nodeid === String(selectRadioKey);
|
|
44061
|
+
isRadioDisabled = radioOpts.checkMethod ? !radioOpts.checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(radioOpts.checkMode, isExistChild, nLevel);
|
|
44038
44062
|
}
|
|
44039
44063
|
let isCheckboxChecked = false;
|
|
44040
|
-
let
|
|
44064
|
+
let isCheckboxIndeterminate = false;
|
|
44065
|
+
let isCheckboxDisabled = false;
|
|
44041
44066
|
if (showCheckbox) {
|
|
44042
44067
|
isCheckboxChecked = isCheckedByCheckboxNodeId(nodeid);
|
|
44043
|
-
|
|
44068
|
+
isCheckboxIndeterminate = isIndeterminateByCheckboxNodeid(nodeid);
|
|
44069
|
+
isCheckboxDisabled = checkboxOpts.checkMethod ? !checkboxOpts.checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(checkboxOpts.checkMode, isExistChild, nLevel);
|
|
44044
44070
|
}
|
|
44045
44071
|
let hasLazyChilds = false;
|
|
44046
44072
|
let isLazyLoading = false;
|
|
@@ -44083,9 +44109,11 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
44083
44109
|
h('div', {
|
|
44084
44110
|
class: ['vxe-tree--node-item', {
|
|
44085
44111
|
'is--current': currentNode && nodeid === getNodeId(currentNode),
|
|
44112
|
+
'is-radio--disabled': isRadioDisabled,
|
|
44086
44113
|
'is-radio--checked': isRadioChecked,
|
|
44114
|
+
'is-checkbox--disabled': isCheckboxDisabled,
|
|
44087
44115
|
'is-checkbox--checked': isCheckboxChecked,
|
|
44088
|
-
'is-checkbox--indeterminate':
|
|
44116
|
+
'is-checkbox--indeterminate': isCheckboxIndeterminate
|
|
44089
44117
|
}]
|
|
44090
44118
|
}, [
|
|
44091
44119
|
showLine
|
|
@@ -44118,8 +44146,8 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
44118
44146
|
])
|
|
44119
44147
|
]
|
|
44120
44148
|
: []),
|
|
44121
|
-
renderRadio(node, nodeid, isExistChild, nLevel, isRadioChecked),
|
|
44122
|
-
renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxChecked,
|
|
44149
|
+
renderRadio(node, nodeid, isExistChild, nLevel, isRadioDisabled, isRadioChecked),
|
|
44150
|
+
renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxDisabled, isCheckboxChecked, isCheckboxIndeterminate),
|
|
44123
44151
|
renderDragIcon(node, nodeid),
|
|
44124
44152
|
h('div', {
|
|
44125
44153
|
class: 'vxe-tree--node-item-inner'
|
|
@@ -44884,6 +44912,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
44884
44912
|
const popupOpts = computePopupOpts.value;
|
|
44885
44913
|
const handleStyle = () => {
|
|
44886
44914
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
44915
|
+
isMinWidth: !popupOpts.width,
|
|
44887
44916
|
placement: popupOpts.placement || placement,
|
|
44888
44917
|
defaultPlacement: popupOpts.defaultPlacement,
|
|
44889
44918
|
teleportTo: btnTransfer
|
|
@@ -44925,6 +44954,13 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
44925
44954
|
}
|
|
44926
44955
|
};
|
|
44927
44956
|
const hideOptionPanel = (evnt) => {
|
|
44957
|
+
const { filterable } = props;
|
|
44958
|
+
const filterOpts = computeFilterOpts.value;
|
|
44959
|
+
if (filterable) {
|
|
44960
|
+
if (filterOpts.clearOnClose) {
|
|
44961
|
+
reactData.searchValue = '';
|
|
44962
|
+
}
|
|
44963
|
+
}
|
|
44928
44964
|
reactData.visiblePanel = false;
|
|
44929
44965
|
internalData.hpTimeout = setTimeout(() => {
|
|
44930
44966
|
reactData.isAniVisible = false;
|