vxe-pc-ui 4.20.38 → 4.20.39
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 +61 -43
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +1 -1
- package/dist/style.mini.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- package/es/language/ar-EG.d.ts +1 -0
- package/es/language/ar-EG.js +679 -678
- package/es/language/de-DE.d.ts +1 -0
- package/es/language/de-DE.js +561 -560
- package/es/language/en-US.d.ts +1 -0
- package/es/language/en-US.js +4 -3
- package/es/language/es-ES.d.ts +1 -0
- package/es/language/es-ES.js +559 -558
- package/es/language/fr-FR.d.ts +1 -0
- package/es/language/fr-FR.js +568 -567
- package/es/language/hu-HU.d.ts +1 -0
- package/es/language/hu-HU.js +2 -1
- package/es/language/hy-AM.d.ts +1 -0
- package/es/language/hy-AM.js +2 -1
- package/es/language/id-ID.d.ts +1 -0
- package/es/language/id-ID.js +580 -579
- package/es/language/it-IT.d.ts +1 -0
- package/es/language/it-IT.js +2 -1
- package/es/language/ja-JP.d.ts +1 -0
- package/es/language/ja-JP.js +536 -535
- package/es/language/ko-KR.d.ts +1 -0
- package/es/language/ko-KR.js +2 -1
- package/es/language/ms-MY.d.ts +1 -0
- package/es/language/ms-MY.js +2 -1
- package/es/language/nb-NO.d.ts +1 -0
- package/es/language/nb-NO.js +2 -1
- package/es/language/pt-BR.d.ts +1 -0
- package/es/language/pt-BR.js +2 -1
- package/es/language/ru-RU.d.ts +1 -0
- package/es/language/ru-RU.js +582 -581
- package/es/language/th-TH.d.ts +1 -0
- package/es/language/th-TH.js +2 -1
- package/es/language/ug-CN.d.ts +1 -0
- package/es/language/ug-CN.js +2 -1
- package/es/language/uk-UA.d.ts +1 -0
- package/es/language/uk-UA.js +578 -577
- package/es/language/uz-UZ.d.ts +1 -0
- package/es/language/uz-UZ.js +2 -1
- package/es/language/vi-VN.d.ts +1 -0
- package/es/language/vi-VN.js +585 -584
- package/es/language/zh-CHT.d.ts +1 -0
- package/es/language/zh-CHT.js +2 -1
- package/es/language/zh-CN.d.ts +1 -0
- package/es/language/zh-CN.js +2 -1
- package/es/language/zh-HK.d.ts +1 -0
- package/es/language/zh-HK.js +2 -1
- package/es/language/zh-MO.d.ts +1 -0
- package/es/language/zh-MO.js +2 -1
- package/es/language/zh-TC.d.ts +1 -0
- package/es/language/zh-TC.js +2 -1
- package/es/language/zh-TW.d.ts +1 -0
- package/es/language/zh-TW.js +2 -1
- package/es/style.css +1 -1
- package/es/style.mini.css +1 -1
- package/es/tree/index.d.ts +8 -0
- package/es/tree/src/tree.d.ts +18 -0
- package/es/tree/src/tree.js +55 -41
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-icon/style.css +1 -1
- package/es/vxe-icon/style.mini.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/index.umd.js +61 -43
- package/lib/index.umd.min.js +3 -3
- package/lib/language/ar-EG.d.ts +1 -0
- package/lib/language/ar-EG.js +679 -678
- package/lib/language/de-DE.d.ts +1 -0
- package/lib/language/de-DE.js +561 -560
- package/lib/language/en-US.d.ts +1 -0
- package/lib/language/en-US.js +4 -3
- package/lib/language/es-ES.d.ts +1 -0
- package/lib/language/es-ES.js +559 -558
- package/lib/language/fr-FR.d.ts +1 -0
- package/lib/language/fr-FR.js +568 -567
- package/lib/language/hu-HU.d.ts +1 -0
- package/lib/language/hu-HU.js +2 -1
- package/lib/language/hy-AM.d.ts +1 -0
- package/lib/language/hy-AM.js +2 -1
- package/lib/language/id-ID.d.ts +1 -0
- package/lib/language/id-ID.js +580 -579
- package/lib/language/it-IT.d.ts +1 -0
- package/lib/language/it-IT.js +2 -1
- package/lib/language/ja-JP.d.ts +1 -0
- package/lib/language/ja-JP.js +536 -535
- package/lib/language/ko-KR.d.ts +1 -0
- package/lib/language/ko-KR.js +2 -1
- package/lib/language/ms-MY.d.ts +1 -0
- package/lib/language/ms-MY.js +2 -1
- package/lib/language/nb-NO.d.ts +1 -0
- package/lib/language/nb-NO.js +2 -1
- package/lib/language/pt-BR.d.ts +1 -0
- package/lib/language/pt-BR.js +2 -1
- package/lib/language/ru-RU.d.ts +1 -0
- package/lib/language/ru-RU.js +582 -581
- package/lib/language/th-TH.d.ts +1 -0
- package/lib/language/th-TH.js +2 -1
- package/lib/language/ug-CN.d.ts +1 -0
- package/lib/language/ug-CN.js +2 -1
- package/lib/language/uk-UA.d.ts +1 -0
- package/lib/language/uk-UA.js +578 -577
- package/lib/language/uz-UZ.d.ts +1 -0
- package/lib/language/uz-UZ.js +2 -1
- package/lib/language/vi-VN.d.ts +1 -0
- package/lib/language/vi-VN.js +585 -584
- package/lib/language/zh-CHT.d.ts +1 -0
- package/lib/language/zh-CHT.js +2 -1
- package/lib/language/zh-CN.d.ts +1 -0
- package/lib/language/zh-CN.js +2 -1
- package/lib/language/zh-HK.d.ts +1 -0
- package/lib/language/zh-HK.js +2 -1
- package/lib/language/zh-MO.d.ts +1 -0
- package/lib/language/zh-MO.js +2 -1
- package/lib/language/zh-TC.d.ts +1 -0
- package/lib/language/zh-TC.js +2 -1
- package/lib/language/zh-TW.d.ts +1 -0
- package/lib/language/zh-TW.js +2 -1
- package/lib/locale/ar-EG.umd.d.ts +1 -0
- package/lib/locale/ar-EG.umd.js +679 -678
- package/lib/locale/ar-EG.umd.min.js +1 -1
- package/lib/locale/de-DE.umd.d.ts +1 -0
- package/lib/locale/de-DE.umd.js +561 -560
- package/lib/locale/de-DE.umd.min.js +1 -1
- package/lib/locale/en-US.umd.d.ts +1 -0
- package/lib/locale/en-US.umd.js +4 -3
- package/lib/locale/en-US.umd.min.js +1 -1
- package/lib/locale/es-ES.umd.d.ts +1 -0
- package/lib/locale/es-ES.umd.js +559 -558
- package/lib/locale/es-ES.umd.min.js +1 -1
- package/lib/locale/fr-FR.umd.d.ts +1 -0
- package/lib/locale/fr-FR.umd.js +568 -567
- package/lib/locale/fr-FR.umd.min.js +1 -1
- package/lib/locale/hu-HU.umd.d.ts +1 -0
- package/lib/locale/hu-HU.umd.js +2 -1
- package/lib/locale/hu-HU.umd.min.js +1 -1
- package/lib/locale/hy-AM.umd.d.ts +1 -0
- package/lib/locale/hy-AM.umd.js +2 -1
- package/lib/locale/hy-AM.umd.min.js +1 -1
- package/lib/locale/id-ID.umd.d.ts +1 -0
- package/lib/locale/id-ID.umd.js +580 -579
- package/lib/locale/id-ID.umd.min.js +1 -1
- package/lib/locale/it-IT.umd.d.ts +1 -0
- package/lib/locale/it-IT.umd.js +2 -1
- package/lib/locale/it-IT.umd.min.js +1 -1
- package/lib/locale/ja-JP.umd.d.ts +1 -0
- package/lib/locale/ja-JP.umd.js +536 -535
- package/lib/locale/ja-JP.umd.min.js +1 -1
- package/lib/locale/ko-KR.umd.d.ts +1 -0
- package/lib/locale/ko-KR.umd.js +2 -1
- package/lib/locale/ko-KR.umd.min.js +1 -1
- package/lib/locale/ms-MY.umd.d.ts +1 -0
- package/lib/locale/ms-MY.umd.js +2 -1
- package/lib/locale/ms-MY.umd.min.js +1 -1
- package/lib/locale/nb-NO.umd.d.ts +1 -0
- package/lib/locale/nb-NO.umd.js +2 -1
- package/lib/locale/nb-NO.umd.min.js +1 -1
- package/lib/locale/pt-BR.umd.d.ts +1 -0
- package/lib/locale/pt-BR.umd.js +2 -1
- package/lib/locale/pt-BR.umd.min.js +1 -1
- package/lib/locale/ru-RU.umd.d.ts +1 -0
- package/lib/locale/ru-RU.umd.js +582 -581
- package/lib/locale/ru-RU.umd.min.js +1 -1
- package/lib/locale/th-TH.umd.d.ts +1 -0
- package/lib/locale/th-TH.umd.js +2 -1
- package/lib/locale/th-TH.umd.min.js +1 -1
- package/lib/locale/ug-CN.umd.d.ts +1 -0
- package/lib/locale/ug-CN.umd.js +2 -1
- package/lib/locale/ug-CN.umd.min.js +1 -1
- package/lib/locale/uk-UA.umd.d.ts +1 -0
- package/lib/locale/uk-UA.umd.js +578 -577
- package/lib/locale/uk-UA.umd.min.js +1 -1
- package/lib/locale/uz-UZ.umd.d.ts +1 -0
- package/lib/locale/uz-UZ.umd.js +2 -1
- package/lib/locale/uz-UZ.umd.min.js +1 -1
- package/lib/locale/vi-VN.umd.d.ts +1 -0
- package/lib/locale/vi-VN.umd.js +585 -584
- package/lib/locale/vi-VN.umd.min.js +1 -1
- package/lib/locale/zh-CHT.umd.d.ts +1 -0
- package/lib/locale/zh-CHT.umd.js +2 -1
- package/lib/locale/zh-CHT.umd.min.js +1 -1
- package/lib/locale/zh-CN.umd.d.ts +1 -0
- package/lib/locale/zh-CN.umd.js +2 -1
- package/lib/locale/zh-CN.umd.min.js +1 -1
- package/lib/locale/zh-HK.umd.d.ts +1 -0
- package/lib/locale/zh-HK.umd.js +2 -1
- package/lib/locale/zh-HK.umd.min.js +1 -1
- package/lib/locale/zh-MO.umd.d.ts +1 -0
- package/lib/locale/zh-MO.umd.js +2 -1
- package/lib/locale/zh-MO.umd.min.js +1 -1
- package/lib/locale/zh-TC.umd.d.ts +1 -0
- package/lib/locale/zh-TC.umd.js +2 -1
- package/lib/locale/zh-TC.umd.min.js +1 -1
- package/lib/locale/zh-TW.umd.d.ts +1 -0
- package/lib/locale/zh-TW.umd.js +2 -1
- package/lib/locale/zh-TW.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.mini.css +1 -1
- package/lib/tree/index.d.ts +8 -0
- package/lib/tree/src/tree.d.ts +18 -0
- package/lib/tree/src/tree.js +54 -40
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/vxe-icon/style/style.css +1 -1
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/package.json +1 -1
- package/packages/language/ar-EG.ts +679 -678
- package/packages/language/de-DE.ts +561 -560
- package/packages/language/en-US.ts +4 -3
- package/packages/language/es-ES.ts +559 -558
- package/packages/language/fr-FR.ts +568 -567
- package/packages/language/hu-HU.ts +2 -1
- package/packages/language/hy-AM.ts +2 -1
- package/packages/language/id-ID.ts +580 -579
- package/packages/language/it-IT.ts +2 -1
- package/packages/language/ja-JP.ts +536 -535
- package/packages/language/ko-KR.ts +2 -1
- package/packages/language/ms-MY.ts +2 -1
- package/packages/language/nb-NO.ts +2 -1
- package/packages/language/pt-BR.ts +2 -1
- package/packages/language/ru-RU.ts +582 -581
- package/packages/language/th-TH.ts +2 -1
- package/packages/language/ug-CN.ts +2 -1
- package/packages/language/uk-UA.ts +578 -577
- package/packages/language/uz-UZ.ts +2 -1
- package/packages/language/vi-VN.ts +585 -584
- package/packages/language/zh-CHT.ts +2 -1
- package/packages/language/zh-CN.ts +2 -1
- package/packages/language/zh-HK.ts +2 -1
- package/packages/language/zh-MO.ts +2 -1
- package/packages/language/zh-TC.ts +2 -1
- package/packages/language/zh-TW.ts +2 -1
- package/packages/tree/src/tree.ts +51 -39
- package/types/components/tree.d.ts +47 -16
- /package/dist/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/dist/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/dist/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/es/icon/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/es/icon/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/es/icon/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/es/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/es/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/es/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/lib/icon/style/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/lib/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/lib/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/lib/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793866326470.ttf → iconfont.1793872783847.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793866326470.woff → iconfont.1793872783847.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793866326470.woff2 → iconfont.1793872783847.woff2} +0 -0
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '擴充外掛未安裝 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超過支援的最大資料量 {0} 列,這可能會導致出現錯誤',
|
|
63
63
|
useNew: '不建議使用 {0},請使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暫無資料',
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超过支持的最大数据量 {0} 行,这可能会导致出现错误',
|
|
63
63
|
useNew: '不建议使用 {0},请使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,当前版本 {0},最低支持版本为 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,当前版本 {0},最低支持版本为 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暂无数据',
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '擴充外掛未安裝 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超過支援的最大資料量 {0} 列,這可能會導致出現錯誤',
|
|
63
63
|
useNew: '不建議使用 {0},請使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暫無資料',
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '擴充外掛未安裝 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超過支援的最大資料量 {0} 列,這可能會導致出現錯誤',
|
|
63
63
|
useNew: '不建議使用 {0},請使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暫無資料',
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '擴充外掛未安裝 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超過支援的最大資料量 {0} 列,這可能會導致出現錯誤',
|
|
63
63
|
useNew: '不建議使用 {0},請使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暫無資料',
|
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
reqPlugin: '擴充外掛未安裝 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',
|
|
62
62
|
errMaxRow: '超過支援的最大資料量 {0} 列,這可能會導致出現錯誤',
|
|
63
63
|
useNew: '不建議使用 {0},請使用 {1}',
|
|
64
|
-
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}'
|
|
64
|
+
errorVersion: '版本不匹配,當前版本 {0},最低支援版本為 {1}',
|
|
65
|
+
errMaxVersion: '版本不匹配,当前版本 {0},最高支持版本为 {1}'
|
|
65
66
|
},
|
|
66
67
|
table: {
|
|
67
68
|
emptyText: '暫無資料',
|
|
@@ -7,7 +7,7 @@ import { getCrossTreeDragNodeInfo } from './store'
|
|
|
7
7
|
import XEUtils from 'xe-utils'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
9
|
import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, getTpImg, hasControlKey, getEventTargetNode, hasClass } from '../../ui/src/dom'
|
|
10
|
-
import { isEnableConf, enModelValue, deModelValue, getText } from '../../ui/src/utils'
|
|
10
|
+
import { isEnableConf, enModelValue, deModelValue, getText, hasEnableConf } from '../../ui/src/utils'
|
|
11
11
|
import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime'
|
|
12
12
|
import VxeLoadingComponent from '../../loading'
|
|
13
13
|
import VxeTooltipComponent from '../../tooltip'
|
|
@@ -162,9 +162,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
162
162
|
default: () => getConfig().tree.mapChildrenField
|
|
163
163
|
},
|
|
164
164
|
transform: Boolean as PropType<VxeTreePropTypes.Transform>,
|
|
165
|
-
|
|
165
|
+
/**
|
|
166
|
+
* 已废弃,请使用 node-config.isCurrent
|
|
167
|
+
* @deprecated
|
|
168
|
+
*/
|
|
166
169
|
isCurrent: Boolean as PropType<VxeTreePropTypes.IsCurrent>,
|
|
167
|
-
|
|
170
|
+
/**
|
|
171
|
+
* 已废弃,请使用 node-config.isHover
|
|
172
|
+
* @deprecated
|
|
173
|
+
*/
|
|
168
174
|
isHover: Boolean as PropType<VxeTreePropTypes.IsHover>,
|
|
169
175
|
expandAll: Boolean as PropType<VxeTreePropTypes.ExpandAll>,
|
|
170
176
|
expandNodeKeys: Array as PropType<VxeTreePropTypes.ExpandNodeKeys>,
|
|
@@ -199,6 +205,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
199
205
|
default: () => getConfig().tree.showOverflow
|
|
200
206
|
},
|
|
201
207
|
tooltipConfig: Object as PropType<VxeTreePropTypes.TooltipConfig>,
|
|
208
|
+
sortConfig: Object as PropType<VxeTreePropTypes.SortConfig>,
|
|
202
209
|
drag: {
|
|
203
210
|
type: Boolean as PropType<VxeTreePropTypes.Drag>,
|
|
204
211
|
default: () => getConfig().tree.drag
|
|
@@ -367,6 +374,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
367
374
|
return Object.assign({}, getConfig().tree.tooltipConfig, props.tooltipConfig)
|
|
368
375
|
})
|
|
369
376
|
|
|
377
|
+
const computeSortOpts = computed(() => {
|
|
378
|
+
return Object.assign({}, getConfig().tree.sortConfig, props.sortConfig)
|
|
379
|
+
})
|
|
380
|
+
|
|
381
|
+
const computeSortDefaultSort = computed(() => {
|
|
382
|
+
const sortOpts = computeSortOpts.value
|
|
383
|
+
return sortOpts.defaultSort || null
|
|
384
|
+
})
|
|
385
|
+
|
|
370
386
|
const computeMenuOpts = computed(() => {
|
|
371
387
|
return Object.assign({}, getConfig().tree.menuConfig, props.menuConfig)
|
|
372
388
|
})
|
|
@@ -911,22 +927,30 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
911
927
|
const triggerSearchEvent = XEUtils.debounce(() => handleData(true), 350, { trailing: true })
|
|
912
928
|
|
|
913
929
|
const loadData = (list: any[]) => {
|
|
914
|
-
const { expandAll, expandNodeKeys, transform, rootParentValue, rootValues } = props
|
|
930
|
+
const { expandAll, expandNodeKeys, transform, rootParentValue, rootValues, sortConfig } = props
|
|
915
931
|
const { initialized, scrollYStore } = internalData
|
|
916
932
|
const keyField = computeKeyField.value
|
|
917
933
|
const parentField = computeParentField.value
|
|
918
934
|
const childrenField = computeChildrenField.value
|
|
919
|
-
const
|
|
920
|
-
|
|
935
|
+
const sortOpts = computeSortOpts.value
|
|
936
|
+
let fullData = list.slice(0)
|
|
937
|
+
if (transform) {
|
|
938
|
+
if (hasEnableConf(sortConfig, sortOpts)) {
|
|
939
|
+
const { defaultSort, sortMethod } = sortOpts
|
|
940
|
+
if (sortMethod) {
|
|
941
|
+
fullData = sortMethod({ $tree: $xeTree, data: fullData }) || []
|
|
942
|
+
} else if (defaultSort) {
|
|
943
|
+
fullData = XEUtils.orderBy(fullData, defaultSort)
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
fullData = XEUtils.toArrayTree(fullData, {
|
|
921
947
|
key: keyField,
|
|
922
948
|
parentKey: parentField,
|
|
923
949
|
mapChildren: childrenField,
|
|
924
950
|
rootParentValue,
|
|
925
951
|
rootValues
|
|
926
952
|
})
|
|
927
|
-
|
|
928
|
-
? list.slice(0)
|
|
929
|
-
: []
|
|
953
|
+
}
|
|
930
954
|
internalData.treeFullData = fullData
|
|
931
955
|
internalData.insertNodeMaps = {}
|
|
932
956
|
reactData.insertNodeFlag++
|
|
@@ -3882,36 +3906,24 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
3882
3906
|
}
|
|
3883
3907
|
|
|
3884
3908
|
const dataFlag = ref(0)
|
|
3885
|
-
watch(
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
)
|
|
3891
|
-
watch(
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
)
|
|
3897
|
-
watch(
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
)
|
|
3903
|
-
watch(
|
|
3904
|
-
() => (props.rootValues ? props.rootValues.length : 0),
|
|
3905
|
-
() => {
|
|
3906
|
-
dataFlag.value++
|
|
3907
|
-
}
|
|
3908
|
-
)
|
|
3909
|
-
watch(
|
|
3910
|
-
() => props.rootValues,
|
|
3911
|
-
() => {
|
|
3912
|
-
dataFlag.value++
|
|
3913
|
-
}
|
|
3914
|
-
)
|
|
3909
|
+
watch(() => (props.data ? props.data.length : 0), () => {
|
|
3910
|
+
dataFlag.value++
|
|
3911
|
+
})
|
|
3912
|
+
watch(() => props.data, () => {
|
|
3913
|
+
dataFlag.value++
|
|
3914
|
+
})
|
|
3915
|
+
watch(() => props.rootParentValue, () => {
|
|
3916
|
+
dataFlag.value++
|
|
3917
|
+
})
|
|
3918
|
+
watch(() => (props.rootValues ? props.rootValues.length : 0), () => {
|
|
3919
|
+
dataFlag.value++
|
|
3920
|
+
})
|
|
3921
|
+
watch(() => props.rootValues, () => {
|
|
3922
|
+
dataFlag.value++
|
|
3923
|
+
})
|
|
3924
|
+
watch(computeSortDefaultSort, () => {
|
|
3925
|
+
dataFlag.value++
|
|
3926
|
+
})
|
|
3915
3927
|
watch(dataFlag, () => {
|
|
3916
3928
|
loadData(props.data || [])
|
|
3917
3929
|
})
|
|
@@ -24,7 +24,7 @@ export interface VxeTreeConstructor<D = any> extends VxeComponentBaseOptions, Vx
|
|
|
24
24
|
export interface TreePrivateRef {
|
|
25
25
|
refElem: Ref<HTMLDivElement | undefined>
|
|
26
26
|
}
|
|
27
|
-
export interface VxeTreePrivateRef extends TreePrivateRef {}
|
|
27
|
+
export interface VxeTreePrivateRef extends TreePrivateRef { }
|
|
28
28
|
|
|
29
29
|
export namespace VxeTreePropTypes {
|
|
30
30
|
export type Data<D = any> = D[]
|
|
@@ -159,6 +159,36 @@ export namespace VxeTreePropTypes {
|
|
|
159
159
|
export type IconLoaded = string
|
|
160
160
|
export type Size = VxeComponentSizeType
|
|
161
161
|
|
|
162
|
+
interface SortConfigDefaultSort {
|
|
163
|
+
/**
|
|
164
|
+
* 字段
|
|
165
|
+
*/
|
|
166
|
+
field: string
|
|
167
|
+
/**
|
|
168
|
+
* 排序方式
|
|
169
|
+
*/
|
|
170
|
+
order: 'asc' | 'desc' | null
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface SortConfig<D = any> {
|
|
174
|
+
/**
|
|
175
|
+
* 是否启用
|
|
176
|
+
*/
|
|
177
|
+
enabled?: boolean
|
|
178
|
+
/**
|
|
179
|
+
* 指定单字段或多字段组合排序
|
|
180
|
+
*/
|
|
181
|
+
defaultSort?: SortConfigDefaultSort | SortConfigDefaultSort[]
|
|
182
|
+
/**
|
|
183
|
+
* 自定义排序方法,返回排序的列表
|
|
184
|
+
* @param params
|
|
185
|
+
*/
|
|
186
|
+
sortMethod?(params: {
|
|
187
|
+
$tree: VxeTreeConstructor<D>
|
|
188
|
+
data: D[]
|
|
189
|
+
}): any[]
|
|
190
|
+
}
|
|
191
|
+
|
|
162
192
|
export type Drag = boolean
|
|
163
193
|
export interface DragConfig<D = any> {
|
|
164
194
|
/**
|
|
@@ -377,6 +407,7 @@ export interface VxeTreeProps<D = any> {
|
|
|
377
407
|
* 该方法用于异步加载子节点
|
|
378
408
|
*/
|
|
379
409
|
loadMethod?: VxeTreePropTypes.LoadMethod<D>
|
|
410
|
+
sortConfig?: VxeTreePropTypes.SortConfig<D>
|
|
380
411
|
drag?: VxeTreePropTypes.Drag
|
|
381
412
|
dragConfig?: VxeTreePropTypes.DragConfig
|
|
382
413
|
showIcon?: VxeTreePropTypes.ShowIcon
|
|
@@ -405,7 +436,7 @@ export interface TreePrivateComputed<D = any> {
|
|
|
405
436
|
computeNodeOpts: ComputedRef<VxeTreePropTypes.NodeConfig<D>>
|
|
406
437
|
computeDragOpts: ComputedRef<VxeTreePropTypes.DragConfig<D>>
|
|
407
438
|
}
|
|
408
|
-
export interface VxeTreePrivateComputed extends TreePrivateComputed {}
|
|
439
|
+
export interface VxeTreePrivateComputed extends TreePrivateComputed { }
|
|
409
440
|
|
|
410
441
|
export interface TreeReactData extends VxeUseInitVScrollbarReactData {
|
|
411
442
|
parentHeight: number
|
|
@@ -654,9 +685,9 @@ export interface TreeMethods<D = any> {
|
|
|
654
685
|
scrollTo(
|
|
655
686
|
x:
|
|
656
687
|
| {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
688
|
+
top?: number | null
|
|
689
|
+
left?: number | null
|
|
690
|
+
}
|
|
660
691
|
| number
|
|
661
692
|
| null
|
|
662
693
|
| undefined,
|
|
@@ -739,7 +770,7 @@ export interface TreeMethods<D = any> {
|
|
|
739
770
|
removeRecords: D[]
|
|
740
771
|
}
|
|
741
772
|
}
|
|
742
|
-
export interface VxeTreeMethods<D = any> extends TreeMethods<D> {}
|
|
773
|
+
export interface VxeTreeMethods<D = any> extends TreeMethods<D> { }
|
|
743
774
|
|
|
744
775
|
export interface TreePrivateMethods {
|
|
745
776
|
/**
|
|
@@ -791,7 +822,7 @@ export interface TreePrivateMethods {
|
|
|
791
822
|
*/
|
|
792
823
|
hideCrossTreeNodeDropClearStatus(): void
|
|
793
824
|
}
|
|
794
|
-
export interface VxeTreePrivateMethods extends TreePrivateMethods {}
|
|
825
|
+
export interface VxeTreePrivateMethods extends TreePrivateMethods { }
|
|
795
826
|
|
|
796
827
|
export type VxeTreeEmits = [
|
|
797
828
|
'update:modelValue',
|
|
@@ -859,14 +890,14 @@ export namespace VxeTreeDefines {
|
|
|
859
890
|
}
|
|
860
891
|
}
|
|
861
892
|
|
|
862
|
-
export interface NodeDragToChildMethod<D = any> extends NodeDragendEventParams<D> {}
|
|
893
|
+
export interface NodeDragToChildMethod<D = any> extends NodeDragendEventParams<D> { }
|
|
863
894
|
|
|
864
895
|
export interface NodeClickParams<D = any> {
|
|
865
896
|
node: D
|
|
866
897
|
}
|
|
867
|
-
export interface NodeClickEventParams<D = any> extends TreeEventParams<D>, NodeClickParams<D> {}
|
|
898
|
+
export interface NodeClickEventParams<D = any> extends TreeEventParams<D>, NodeClickParams<D> { }
|
|
868
899
|
|
|
869
|
-
export interface NodeDblclickEventParams<D = any> extends NodeClickEventParams<D> {}
|
|
900
|
+
export interface NodeDblclickEventParams<D = any> extends NodeClickEventParams<D> { }
|
|
870
901
|
|
|
871
902
|
export interface CurrentChangeEventParams<D = any> extends TreeEventParams<D> {
|
|
872
903
|
node: D
|
|
@@ -967,16 +998,16 @@ export namespace VxeTreeSlotTypes {
|
|
|
967
998
|
node: any
|
|
968
999
|
isExpand: boolean
|
|
969
1000
|
}
|
|
970
|
-
export interface TitleSlotParams extends DefaultSlotParams {}
|
|
971
|
-
export interface ExtraSlotParams extends DefaultSlotParams {}
|
|
1001
|
+
export interface TitleSlotParams extends DefaultSlotParams { }
|
|
1002
|
+
export interface ExtraSlotParams extends DefaultSlotParams { }
|
|
972
1003
|
|
|
973
|
-
export interface HeaderSlotParams {}
|
|
974
|
-
export interface FooterSlotParams {}
|
|
975
|
-
export interface LoadingSlotParams {}
|
|
1004
|
+
export interface HeaderSlotParams { }
|
|
1005
|
+
export interface FooterSlotParams { }
|
|
1006
|
+
export interface LoadingSlotParams { }
|
|
976
1007
|
export interface TooltipSlotParams {
|
|
977
1008
|
node: any
|
|
978
1009
|
}
|
|
979
|
-
export interface EmptySlotParams {}
|
|
1010
|
+
export interface EmptySlotParams { }
|
|
980
1011
|
}
|
|
981
1012
|
|
|
982
1013
|
export interface VxeTreeSlots {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|