vxe-table 3.13.14 → 3.14.0-beta.0
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/grid/src/grid.js +41 -31
- package/es/locale/lang/ar-EG.js +1 -0
- package/es/locale/lang/de-DE.js +1 -0
- package/es/locale/lang/en-US.js +3 -2
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/fr-FR.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/hy-AM.js +1 -0
- package/es/locale/lang/id-ID.js +1 -0
- package/es/locale/lang/it-IT.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/nb-NO.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/th-TH.js +1 -0
- package/es/locale/lang/ug-CN.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +18 -16
- package/es/table/module/edit/mixin.js +3 -1
- package/es/table/src/cell.js +2 -1
- package/es/table/src/methods.js +297 -178
- package/es/table/src/table.js +170 -165
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +41 -32
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +1743 -2683
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -2
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/hy-AM.js +1 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +18 -16
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +3 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +312 -184
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +179 -180
- package/lib/table/src/table.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 +2 -2
- package/packages/grid/src/grid.ts +41 -31
- package/packages/locale/lang/ar-EG.ts +1 -0
- package/packages/locale/lang/de-DE.ts +1 -0
- package/packages/locale/lang/en-US.ts +3 -2
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/fr-FR.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/hy-AM.ts +1 -0
- package/packages/locale/lang/id-ID.ts +1 -0
- package/packages/locale/lang/it-IT.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/nb-NO.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/th-TH.ts +1 -0
- package/packages/locale/lang/ug-CN.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/panel.ts +22 -20
- package/packages/table/module/edit/mixin.ts +3 -1
- package/packages/table/src/cell.ts +2 -1
- package/packages/table/src/methods.ts +308 -182
- package/packages/table/src/table.ts +172 -165
- /package/es/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/es/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/es/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
- /package/lib/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/lib/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/lib/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="3.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="3.14.0-beta.0",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,padding:!0,minHeight:144,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0,mode:"fixed"},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{enabled:!0,gt:60,preSize:0,oSize:1},virtualYConfig:{enabled:!0,gt:100,preSize:1,oSize:2},scrollbarConfig:{}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showResponseMsg:!0,showActiveMsg:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,r){return _core.VxeUI.modal.alert(e,o,r)},confirm(e,o,r){return _core.VxeUI.modal.confirm(e,o,r)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,r){return _core.VxeUI.modal.notification(e,o,r)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"3.
|
|
11
|
+
const version = `table v${"3.14.0-beta.0"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v3.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v3.14.0-beta.0",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0-beta.0",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^3.3.
|
|
31
|
+
"vxe-pc-ui": "^3.3.103"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
|
|
@@ -492,27 +492,29 @@ export default {
|
|
|
492
492
|
})
|
|
493
493
|
return rest
|
|
494
494
|
},
|
|
495
|
-
|
|
496
|
-
const { isZMax, seqConfig, pagerConfig, loading, editConfig, proxyConfig, proxyOpts, tableExtendProps, tableLoading, tablePage
|
|
497
|
-
const
|
|
495
|
+
computeTableProps () {
|
|
496
|
+
const { isZMax, seqConfig, pagerConfig, loading, editConfig, proxyConfig, proxyOpts, tableExtendProps, tableLoading, tablePage } = this
|
|
497
|
+
const tProps = Object.assign({}, tableExtendProps)
|
|
498
498
|
if (isZMax) {
|
|
499
499
|
if (tableExtendProps.maxHeight) {
|
|
500
|
-
|
|
500
|
+
tProps.maxHeight = '100%'
|
|
501
501
|
} else {
|
|
502
|
-
|
|
502
|
+
tProps.height = '100%'
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
if (proxyConfig) {
|
|
506
|
-
|
|
507
|
-
tableProps.data = tableData
|
|
506
|
+
tProps.loading = loading || tableLoading
|
|
508
507
|
if (proxyOpts.seq && isEnableConf(pagerConfig)) {
|
|
509
|
-
|
|
508
|
+
tProps.seqConfig = Object.assign({}, seqConfig, { startIndex: (tablePage.currentPage - 1) * tablePage.pageSize })
|
|
510
509
|
}
|
|
511
510
|
}
|
|
512
511
|
if (editConfig) {
|
|
513
|
-
|
|
512
|
+
tProps.editConfig = Object.assign({}, editConfig)
|
|
514
513
|
}
|
|
515
|
-
return
|
|
514
|
+
return tProps
|
|
515
|
+
},
|
|
516
|
+
tableProps () {
|
|
517
|
+
return this.computeTableProps
|
|
516
518
|
},
|
|
517
519
|
computeCurrLayoutConf () {
|
|
518
520
|
const $xeGrid = this
|
|
@@ -733,7 +735,7 @@ export default {
|
|
|
733
735
|
const { $refs, toolbar, toolbarConfig, toolbarOpts, proxyOpts, tablePage, pagerConfig, editRules, isRespMsg, isActiveMsg, validConfig, pagerOpts } = this
|
|
734
736
|
const { beforeQuery, afterQuery, beforeDelete, afterDelete, beforeSave, afterSave, ajax = {} } = proxyOpts
|
|
735
737
|
const resConfigs = proxyOpts.response || proxyOpts.props || {}
|
|
736
|
-
const $
|
|
738
|
+
const $xeTable = $refs.xTable
|
|
737
739
|
const formData = this.getFormData()
|
|
738
740
|
let button: any
|
|
739
741
|
let code: string
|
|
@@ -799,8 +801,8 @@ export default {
|
|
|
799
801
|
}
|
|
800
802
|
if (isInited) {
|
|
801
803
|
let defaultSort = null
|
|
802
|
-
if ($
|
|
803
|
-
const { sortOpts } = $
|
|
804
|
+
if ($xeTable) {
|
|
805
|
+
const { sortOpts } = $xeTable
|
|
804
806
|
defaultSort = sortOpts.defaultSort
|
|
805
807
|
}
|
|
806
808
|
// 如果使用默认排序
|
|
@@ -816,16 +818,16 @@ export default {
|
|
|
816
818
|
}
|
|
817
819
|
})
|
|
818
820
|
}
|
|
819
|
-
if ($
|
|
820
|
-
filterList = $
|
|
821
|
+
if ($xeTable) {
|
|
822
|
+
filterList = $xeTable.getCheckedFilters()
|
|
821
823
|
}
|
|
822
824
|
} else {
|
|
823
|
-
if ($
|
|
825
|
+
if ($xeTable) {
|
|
824
826
|
if (isReload) {
|
|
825
|
-
$
|
|
827
|
+
$xeTable.clearAll()
|
|
826
828
|
} else {
|
|
827
|
-
sortList = $
|
|
828
|
-
filterList = $
|
|
829
|
+
sortList = $xeTable.getSortColumns()
|
|
830
|
+
filterList = $xeTable.getCheckedFilters()
|
|
829
831
|
}
|
|
830
832
|
}
|
|
831
833
|
}
|
|
@@ -848,6 +850,7 @@ export default {
|
|
|
848
850
|
const applyArgs = [commitParams].concat(args)
|
|
849
851
|
return Promise.resolve((beforeQuery || ajaxMethods)(...applyArgs))
|
|
850
852
|
.then(rest => {
|
|
853
|
+
let tableData: any[] = []
|
|
851
854
|
this.tableLoading = false
|
|
852
855
|
if (rest) {
|
|
853
856
|
if (pagerConfig && isEnableConf(pagerOpts)) {
|
|
@@ -855,7 +858,7 @@ export default {
|
|
|
855
858
|
const total = (XEUtils.isFunction(totalProp) ? totalProp({ data: rest, $grid: this }) : XEUtils.get(rest, totalProp || 'page.total')) || 0
|
|
856
859
|
tablePage.total = XEUtils.toNumber(total)
|
|
857
860
|
const resultProp = resConfigs.result
|
|
858
|
-
|
|
861
|
+
tableData = (XEUtils.isFunction(resultProp) ? resultProp({ data: rest, $grid: this }) : XEUtils.get(rest, resultProp || 'result')) || []
|
|
859
862
|
// 检验当前页码,不能超出当前最大页数
|
|
860
863
|
const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1)
|
|
861
864
|
if (tablePage.currentPage > pageCount) {
|
|
@@ -863,10 +866,17 @@ export default {
|
|
|
863
866
|
}
|
|
864
867
|
} else {
|
|
865
868
|
const listProp = resConfigs.list
|
|
866
|
-
|
|
869
|
+
tableData = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $grid: this }) : XEUtils.get(rest, listProp)) : rest) || []
|
|
867
870
|
}
|
|
871
|
+
}
|
|
872
|
+
if ($xeTable as any) {
|
|
873
|
+
$xeTable.loadData(tableData)
|
|
868
874
|
} else {
|
|
869
|
-
|
|
875
|
+
$xeTable.$nextTick(() => {
|
|
876
|
+
if ($xeTable) {
|
|
877
|
+
$xeTable.loadData(tableData)
|
|
878
|
+
}
|
|
879
|
+
})
|
|
870
880
|
}
|
|
871
881
|
if (afterQuery) {
|
|
872
882
|
afterQuery(...applyArgs)
|
|
@@ -894,21 +904,21 @@ export default {
|
|
|
894
904
|
const deleteSuccessMethods = ajax.deleteSuccess
|
|
895
905
|
const deleteErrorMethods = ajax.deleteError
|
|
896
906
|
if (ajaxMethods) {
|
|
897
|
-
const selectRecords = $
|
|
898
|
-
const removeRecords = selectRecords.filter((row: any) => !$
|
|
907
|
+
const selectRecords = $xeTable.getCheckboxRecords()
|
|
908
|
+
const removeRecords = selectRecords.filter((row: any) => !$xeTable.isInsertByRow(row))
|
|
899
909
|
const body = { removeRecords }
|
|
900
910
|
const commitParams = { $grid: this, code, button, body, form: formData, options: ajaxMethods }
|
|
901
911
|
const applyArgs = [commitParams].concat(args)
|
|
902
912
|
if (selectRecords.length) {
|
|
903
913
|
return this.handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
904
914
|
if (!removeRecords.length) {
|
|
905
|
-
return $
|
|
915
|
+
return $xeTable.remove(selectRecords)
|
|
906
916
|
}
|
|
907
917
|
this.tableLoading = true
|
|
908
918
|
return Promise.resolve((beforeDelete || ajaxMethods)(...applyArgs))
|
|
909
919
|
.then(rest => {
|
|
910
920
|
this.tableLoading = false
|
|
911
|
-
$
|
|
921
|
+
$xeTable.setPendingRow(removeRecords, false)
|
|
912
922
|
if (isRespMsg) {
|
|
913
923
|
// 检测弹窗模块
|
|
914
924
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -995,7 +1005,7 @@ export default {
|
|
|
995
1005
|
return Promise.resolve((beforeSave || ajaxMethods)(...applyArgs))
|
|
996
1006
|
.then(rest => {
|
|
997
1007
|
this.tableLoading = false
|
|
998
|
-
$
|
|
1008
|
+
$xeTable.clearPendingRow()
|
|
999
1009
|
if (isRespMsg) {
|
|
1000
1010
|
// 检测弹窗模块
|
|
1001
1011
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -1054,7 +1064,7 @@ export default {
|
|
|
1054
1064
|
const gCommandOpts = commands.get(code)
|
|
1055
1065
|
if (gCommandOpts) {
|
|
1056
1066
|
if (gCommandOpts.commandMethod) {
|
|
1057
|
-
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $
|
|
1067
|
+
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xeTable }, ...args)
|
|
1058
1068
|
} else {
|
|
1059
1069
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1060
1070
|
errLog('vxe.error.notCommands', [code])
|
|
@@ -1247,16 +1257,16 @@ export default {
|
|
|
1247
1257
|
},
|
|
1248
1258
|
getProxyInfo () {
|
|
1249
1259
|
const { $refs, sortData, proxyConfig } = this
|
|
1250
|
-
const $
|
|
1260
|
+
const $xeTable = $refs.xTable
|
|
1251
1261
|
if (proxyConfig) {
|
|
1252
1262
|
return {
|
|
1253
|
-
data:
|
|
1263
|
+
data: $xeTable ? $xeTable.getFullData() : [],
|
|
1254
1264
|
filter: this.filterData,
|
|
1255
1265
|
form: this.getFormData(),
|
|
1256
1266
|
sort: sortData.length ? sortData[0] : {},
|
|
1257
1267
|
sorts: sortData,
|
|
1258
1268
|
pager: this.tablePage,
|
|
1259
|
-
pendingRecords: $
|
|
1269
|
+
pendingRecords: $xeTable ? $xeTable.getPendingRecords() : []
|
|
1260
1270
|
}
|
|
1261
1271
|
}
|
|
1262
1272
|
return null
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -18,6 +18,7 @@ export default
|
|
|
18
18
|
groupTag: 'Bei der Gruppierung von Spaltenüberschriften sollte „{0}“ anstelle von „{1}“ verwendet werden, was zu Fehlern führen kann',
|
|
19
19
|
scrollErrProp: 'Der Parameter „{0}“ wird nicht unterstützt, wenn virtuelles Scrollen aktiviert ist',
|
|
20
20
|
errConflicts: 'Parameter „{0}“ stehen im Konflikt mit „{1}“',
|
|
21
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
21
22
|
unableInsert: 'Das Einfügen an der angegebenen Position ist nicht möglich. Bitte überprüfen Sie, ob die Parameter korrekt sind',
|
|
22
23
|
useErr: 'Bei der Installation des Moduls „{0}“ ist möglicherweise die falsche Reihenfolge aufgetreten. Die abhängigen Module müssen vor der Tabelle installiert werden.',
|
|
23
24
|
barUnableLink: 'Die Symbolleiste kann nicht mit der Tabelle verknüpft werden',
|
|
@@ -11,12 +11,13 @@ export default {
|
|
|
11
11
|
},
|
|
12
12
|
error: {
|
|
13
13
|
downErr: 'Download failed',
|
|
14
|
-
errLargeData: '
|
|
14
|
+
errLargeData: 'When the amount of data bound is too large, you should use "{0}"; otherwise, a stall may occur',
|
|
15
15
|
groupFixed: 'If using group headers, frozen columns must be set by group',
|
|
16
16
|
groupMouseRange: 'The group header and "{0}" cannot be used at the same time, which may cause an error.',
|
|
17
17
|
groupTag: 'Grouping column headers should use "{0}" instead of "{1}", which may cause errors',
|
|
18
18
|
scrollErrProp: 'The parameter "{0}" is not supported when virtual scrolling is enabled',
|
|
19
|
-
errConflicts: '
|
|
19
|
+
errConflicts: '"{1}" is not supported when parameter "{0}", it should be "{2}", otherwise an error will occur',
|
|
20
|
+
notSupportProp: '"{1}" is not supported when parameter "{0}" is enabled, it should be "{2}", otherwise an error will occur',
|
|
20
21
|
unableInsert: 'Unable to insert into the specified position, please check whether the parameters are correct',
|
|
21
22
|
useErr: 'An error occurred while installing the "{0}" module. The order may be incorrect. The dependent modules need to be installed before Table.',
|
|
22
23
|
barUnableLink: 'The toolbar cannot be associated with the table',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'El encabezado de columna de agrupación debería utilizar "{0}" en lugar de "{1}", lo que puede causar errores.',
|
|
18
18
|
scrollErrProp: 'El parámetro "{0}" no es compatible cuando el desplazamiento virtual está habilitado.',
|
|
19
19
|
errConflicts: 'El argumento "{0}" entra en conflicto con "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'No se puede insertar en la ubicación especificada.',
|
|
21
22
|
useErr: 'Error al instalar el módulo "{0}", posiblemente en el orden equivocado, los módulos dependientes deben ser instalados antes de la tabla.',
|
|
22
23
|
barUnableLink: 'La barra de herramientas no puede asociarse con la tabla.',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'A csoportosító oszlopfejlécben a „{0}” értéket kell használni a „{1}” helyett, ami hibákat okozhat',
|
|
18
18
|
scrollErrProp: 'A "{0}" paraméter nem támogatott, ha a virtuális görgetés engedélyezve van',
|
|
19
19
|
errConflicts: 'A "{0}" paraméter ütközik a következővel: "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'Nem sikerült beilleszteni a megadott pozícióba, ellenőrizze, hogy a paraméterek helyesek-e',
|
|
21
22
|
useErr: 'Hiba történt a "{0}" modul telepítésekor. Lehet, hogy a sorrend helytelen. A függő modulokat a táblázat előtt kell telepíteni.',
|
|
22
23
|
barUnableLink: 'Az eszköztár nem társítható a táblázathoz',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'Le intestazioni delle colonne di raggruppamento devono utilizzare "{0}" anziché "{1}", il che potrebbe causare errori',
|
|
18
18
|
scrollErrProp: 'Il parametro "{0}" non è supportato quando è abilitato lo scorrimento virtuale',
|
|
19
19
|
errConflicts: 'I parametri "{0}" sono in conflitto con "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'Impossibile inserire nella posizione specificata, verificare se i parametri sono corretti',
|
|
21
22
|
useErr: "Si è verificato un errore durante l'installazione del modulo \"{0}\". L'ordine potrebbe essere errato. I moduli dipendenti devono essere installati prima della Tabella.",
|
|
22
23
|
barUnableLink: 'La barra degli strumenti non può essere associata alla tabella',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'ヘッダー結合は "{0}" を使ってください。 "{1}" はエラーが発生する可能性があります',
|
|
18
18
|
scrollErrProp: '仮想スクロールはこのパラメータを使えません: "{0}"',
|
|
19
19
|
errConflicts: 'パラメータ "{0}" と "{1}" は同時に使えません',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '指定された位置に挿入できない',
|
|
21
22
|
useErr: '"{0}" モジュールをインストールする際にエラーが発生し、順序が正しくない可能性がある。依存するモジュールはTableの前にインストールする必要がある',
|
|
22
23
|
barUnableLink: 'ツールバーはフォームを関連付けることができない',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '그룹화된 열 헤더는 "{0}"을 사용해야 하며, "{1}"을 사용하면 오류가 발생할 수 있습니다.',
|
|
18
18
|
scrollErrProp: '가상 스크롤을 활성화한 경우, 매개변수 "{0}"은 지원되지 않습니다.',
|
|
19
19
|
errConflicts: '매개변수 "{0}"과(와) "{1}"은(는) 충돌합니다.',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '지정된 위치에 삽입할 수 없습니다. 매개변수가 올바른지 확인하세요.',
|
|
21
22
|
useErr: '"{0}" 모듈 설치 중 오류가 발생했습니다. 순서가 잘못되었을 수 있으며, 테이블 전에 종속 모듈이 설치되어야 합니다.',
|
|
22
23
|
barUnableLink: '도구 모음과 테이블을 연결할 수 없습니다.',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'O cabeçalho da coluna de agrupamento deve usar "{0}" em vez de "{1}", o que pode causar erros.',
|
|
18
18
|
scrollErrProp: 'O parâmetro "{0}" não é suportado quando a rolagem virtual está habilitada.',
|
|
19
19
|
errConflicts: 'O argumento "{0}" entra em conflito com "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'Não é possível inserir na localização especificada.',
|
|
21
22
|
useErr: 'Erro ao instalar o módulo "{0}", possivelmente na ordem errada, os módulos dependentes precisam ser instalados antes da Tabela.',
|
|
22
23
|
barUnableLink: 'A barra de ferramentas não pode ser associada à tabela.',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'При группировке заголовков столбцов следует использовать "{0}" вместо "{1}", что может привести к ошибкам.',
|
|
18
18
|
scrollErrProp: 'Параметр "{0}" не поддерживается, если включена виртуальная прокрутка.',
|
|
19
19
|
errConflicts: 'Параметры "{0}" конфликтуют с "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'Невозможно вставить в указанную позицию, проверьте правильность параметров.',
|
|
21
22
|
useErr: 'Произошла ошибка при установке модуля "{0}". Порядок может быть неправильным. Зависимые модули необходимо установить перед Табл.',
|
|
22
23
|
barUnableLink: 'Панель инструментов не может быть связана с таблицей',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'การจัดกลุ่มส่วนหัวคอลัมน์ควรใช้ "{0}" แทน "{1}" ซึ่งอาจทำให้เกิดข้อผิดพลาด',
|
|
18
18
|
scrollErrProp: 'ไม่สนับสนุนพารามิเตอร์ "{0}" เมื่อเปิดใช้งานการเลื่อนเสมือน',
|
|
19
19
|
errConflicts: 'พารามิเตอร์ "{0}" ขัดแย้งกับ "{1}"',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'ไม่สามารถแทรกลงในตำแหน่งที่ระบุได้ โปรดตรวจสอบว่าพารามิเตอร์ถูกต้องหรือไม่',
|
|
21
22
|
useErr: 'เกิดข้อผิดพลาดขณะติดตั้งโมดูล "{0}" ลำดับอาจไม่ถูกต้อง จำเป็นต้องติดตั้งโมดูลที่ต้องพึ่งพาก่อนตาราง',
|
|
22
23
|
barUnableLink: 'แถบเครื่องมือไม่สามารถเชื่อมโยงกับตารางได้',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'گۇرۇپپا قۇر بىشىغا چوقۇم "{0}" نى ئىشلىتىشىڭىز كىرەك،ھەرگىزمۇ "{1}"نى ئەمەس ،بولمىسا بۇ بەلكىم خاتالىق كەلتۈرۈپ چىقىرىشى مومكىن',
|
|
18
18
|
scrollErrProp: 'مەۋھۇم يۇمىلاتما ئىقىدارىنى قوزغاتقاندىن كىيىن بۇ سېپىرنى تەكشەشكە بولمايدۇ "{0}"',
|
|
19
19
|
errConflicts: 'سان سىپىر "{0}" بىلەن "{1}" دە ماسلاشماسلىق ئەھۋالى مەۋجۇت',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'بىكىتىلگەن ئورۇنغا قىستۇرۇشقا بولمايدۇ، پارامېتىرىڭىزنىڭ توغرا-خاتالىقىنى تەكشۈرۈڭ ',
|
|
21
22
|
useErr: 'قاچىلاش: "{0}" پارچىنى قاچىلىغاندا خاتالىق كۆرۈلدى ،بەلكىم رەت تەرتىۋىدە بىنۇرماللىق كۆرۈلگەن بولۇشى مومكىن,مۇناسىۋەتلىك پارچە چوقۇم Table دىن ئاۋۋال قاچىلىنىشى كىرەك',
|
|
22
23
|
barUnableLink: 'ئەسۋاب ئىستونى جەدىۋەل بىلەن ئۇلىنىشقا ئامالسىز',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: 'Груповані заголовки повинні використовувати "{0}", а не "{1}", це може спричинити помилки',
|
|
18
18
|
scrollErrProp: 'Параметр "{0}" не підтримується після включення віртуального скролінгу',
|
|
19
19
|
errConflicts: 'Параметри "{0}" та "{1}" конфліктують',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: 'Неможливо вставити в задане місце, перевірте правильність параметрів',
|
|
21
22
|
useErr: 'Сталася помилка під час встановлення модуля "{0}", можливо, порядок неправильний, залежні модулі повинні бути встановлені до таблиці',
|
|
22
23
|
barUnableLink: "Панель інструментів не може бути пов'язана з таблицею",
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分組列頭應該使用 "{0}" 而不是 "{1}",這可能會出現錯誤',
|
|
18
18
|
scrollErrProp: '啟用虛擬滾動後不支援此參數 "{0}"',
|
|
19
19
|
errConflicts: '參數 "{0}" 與 "{1}" 有衝突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '無法插入指定位置,請檢查參數是否正確',
|
|
21
22
|
useErr: '安裝 "{0}" 模組時發生錯誤,可能順序不正確,依賴的模組需要在 Table 之前安裝',
|
|
22
23
|
barUnableLink: '工具列無法關聯表格',
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
18
18
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
19
19
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
20
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
20
21
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
21
22
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
22
23
|
barUnableLink: '工具栏无法关联表格',
|
|
@@ -5,7 +5,7 @@ import { getTpImg, addClass, removeClass } from '../../../ui/src/dom'
|
|
|
5
5
|
import { errLog } from '../../../ui/src/log'
|
|
6
6
|
import XEUtils from 'xe-utils'
|
|
7
7
|
|
|
8
|
-
import type { VxeTableDefines } from '../../../../types'
|
|
8
|
+
import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, TableReactData, TableInternalData } from '../../../../types'
|
|
9
9
|
import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeInputComponent } from 'vxe-pc-ui'
|
|
10
10
|
|
|
11
11
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
@@ -1083,10 +1083,10 @@ export default {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
},
|
|
1085
1085
|
sortDragendEvent (evnt: any) {
|
|
1086
|
-
const $xeTable = this.$xetable
|
|
1086
|
+
const $xeTable = this.$xetable as VxeTableConstructor & VxeTablePrivateMethods
|
|
1087
1087
|
const tableProps = $xeTable
|
|
1088
|
-
const reactData = $xeTable
|
|
1089
|
-
const internalData = $xeTable
|
|
1088
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
1089
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
1090
1090
|
|
|
1091
1091
|
const { dragCol, prevDragPos, prevDragCol, prevDragToChild } = this
|
|
1092
1092
|
|
|
@@ -1102,13 +1102,14 @@ export default {
|
|
|
1102
1102
|
if (prevDragCol && dragCol) {
|
|
1103
1103
|
// 判断是否有拖动
|
|
1104
1104
|
if (prevDragCol !== dragCol) {
|
|
1105
|
-
const
|
|
1105
|
+
const dragColumn: VxeTableDefines.ColumnInfo = dragCol
|
|
1106
1106
|
const newColumn: VxeTableDefines.ColumnInfo = prevDragCol
|
|
1107
1107
|
Promise.resolve(
|
|
1108
1108
|
dragEndMethod
|
|
1109
1109
|
? dragEndMethod({
|
|
1110
|
-
oldColumn,
|
|
1110
|
+
oldColumn: dragColumn,
|
|
1111
1111
|
newColumn,
|
|
1112
|
+
dragColumn,
|
|
1112
1113
|
dragPos: prevDragPos as any,
|
|
1113
1114
|
dragToChild: !!prevDragToChild,
|
|
1114
1115
|
offsetIndex: dragOffsetIndex
|
|
@@ -1123,7 +1124,7 @@ export default {
|
|
|
1123
1124
|
let nafIndex = -1
|
|
1124
1125
|
|
|
1125
1126
|
const oldAllMaps: Record<string, any> = {}
|
|
1126
|
-
XEUtils.eachTree([
|
|
1127
|
+
XEUtils.eachTree([dragColumn], column => {
|
|
1127
1128
|
oldAllMaps[column.id] = column
|
|
1128
1129
|
})
|
|
1129
1130
|
|
|
@@ -1131,7 +1132,7 @@ export default {
|
|
|
1131
1132
|
|
|
1132
1133
|
// 只有实时拖拽支持跨层级
|
|
1133
1134
|
if (immediate) {
|
|
1134
|
-
if (
|
|
1135
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
1135
1136
|
// 子到子
|
|
1136
1137
|
|
|
1137
1138
|
if (!isCrossDrag) {
|
|
@@ -1149,7 +1150,7 @@ export default {
|
|
|
1149
1150
|
return
|
|
1150
1151
|
}
|
|
1151
1152
|
}
|
|
1152
|
-
} else if (
|
|
1153
|
+
} else if (dragColumn.parentId) {
|
|
1153
1154
|
// 子到根
|
|
1154
1155
|
|
|
1155
1156
|
if (!isCrossDrag) {
|
|
@@ -1177,18 +1178,18 @@ export default {
|
|
|
1177
1178
|
// 根到根
|
|
1178
1179
|
}
|
|
1179
1180
|
|
|
1180
|
-
const oldewMatchRest = XEUtils.findTree(collectColumn as VxeTableDefines.ColumnInfo[], item => item.id ===
|
|
1181
|
+
const oldewMatchRest = XEUtils.findTree(collectColumn as VxeTableDefines.ColumnInfo[], item => item.id === dragColumn.id)
|
|
1181
1182
|
|
|
1182
1183
|
// 改变层级
|
|
1183
1184
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
1184
1185
|
if (oldewMatchRest) {
|
|
1185
1186
|
const { items: oCols, index: oIndex } = oldewMatchRest
|
|
1186
|
-
const childList =
|
|
1187
|
+
const childList = dragColumn.children || []
|
|
1187
1188
|
childList.forEach(column => {
|
|
1188
|
-
column.parentId =
|
|
1189
|
+
column.parentId = dragColumn.parentId
|
|
1189
1190
|
})
|
|
1190
1191
|
oCols.splice(oIndex, 1, ...childList)
|
|
1191
|
-
|
|
1192
|
+
dragColumn.children = []
|
|
1192
1193
|
}
|
|
1193
1194
|
} else {
|
|
1194
1195
|
if (oldewMatchRest) {
|
|
@@ -1205,11 +1206,11 @@ export default {
|
|
|
1205
1206
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest
|
|
1206
1207
|
// 转子级
|
|
1207
1208
|
if ((isCrossDrag && isToChildDrag) && prevDragToChild) {
|
|
1208
|
-
|
|
1209
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
1209
|
+
dragColumn.parentId = newColumn.id
|
|
1210
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn])
|
|
1210
1211
|
} else {
|
|
1211
|
-
|
|
1212
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
1212
|
+
dragColumn.parentId = newColumn.parentId
|
|
1213
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn)
|
|
1213
1214
|
}
|
|
1214
1215
|
if (!nParent) {
|
|
1215
1216
|
nafIndex = nIndex
|
|
@@ -1223,11 +1224,11 @@ export default {
|
|
|
1223
1224
|
}
|
|
1224
1225
|
})
|
|
1225
1226
|
} else {
|
|
1226
|
-
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id ===
|
|
1227
|
+
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === dragColumn.id)
|
|
1227
1228
|
customColumnList.splice(oafIndex, 1)
|
|
1228
1229
|
|
|
1229
1230
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id)
|
|
1230
|
-
customColumnList.splice(nafIndex + dragOffsetIndex, 0,
|
|
1231
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn)
|
|
1231
1232
|
}
|
|
1232
1233
|
|
|
1233
1234
|
reactData.isDragColMove = true
|
|
@@ -1242,8 +1243,9 @@ export default {
|
|
|
1242
1243
|
}
|
|
1243
1244
|
|
|
1244
1245
|
$xeTable.dispatchEvent('column-dragend', {
|
|
1245
|
-
oldColumn,
|
|
1246
|
+
oldColumn: dragColumn,
|
|
1246
1247
|
newColumn,
|
|
1248
|
+
dragColumn,
|
|
1247
1249
|
dragPos: prevDragPos,
|
|
1248
1250
|
offsetIndex: dragOffsetIndex,
|
|
1249
1251
|
_index: {
|
|
@@ -863,7 +863,9 @@ export default {
|
|
|
863
863
|
let isPos = false
|
|
864
864
|
if (fieldOrColumn) {
|
|
865
865
|
isPos = true
|
|
866
|
-
|
|
866
|
+
if (fieldOrColumn !== true) {
|
|
867
|
+
column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn
|
|
868
|
+
}
|
|
867
869
|
}
|
|
868
870
|
return handleEditCell($xeTable, row, column, isPos)
|
|
869
871
|
},
|
|
@@ -89,12 +89,13 @@ function renderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRender
|
|
|
89
89
|
const { treeConfig, dragConfig } = tableProps
|
|
90
90
|
const rowOpts = $table.computeRowOpts
|
|
91
91
|
const rowDragOpts = $table.computeRowDragOpts
|
|
92
|
+
const treeOpts = $table.computeTreeOpts
|
|
92
93
|
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts
|
|
93
94
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
|
|
94
95
|
const vns: any[] = XEUtils.isArray(content) ? content : [content]
|
|
95
96
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
96
97
|
if (treeConfig) {
|
|
97
|
-
if (isPeerDrag || isCrossDrag || !level) {
|
|
98
|
+
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
98
99
|
vns.unshift(
|
|
99
100
|
renderCellDragIcon(h, params)
|
|
100
101
|
)
|