vxe-table 4.12.0-beta.26 → 4.12.0-beta.28
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/style.css +1 -1
- package/es/table/module/custom/hook.js +1 -1
- package/es/table/module/custom/panel.js +4 -2
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -2
- package/es/table/module/export/import-panel.js +3 -2
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +2 -1
- package/es/table/src/body.js +8 -3
- package/es/table/src/cell.js +18 -4
- package/es/table/src/columnInfo.js +2 -2
- package/es/table/src/footer.js +6 -2
- package/es/table/src/header.js +6 -2
- package/es/table/src/table.js +10 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +58 -32
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +1 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -2
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -1
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +2 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +8 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +12 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +6 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +6 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +10 -10
- 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 +1 -1
- package/packages/table/module/custom/hook.ts +1 -1
- package/packages/table/module/custom/panel.ts +6 -2
- package/packages/table/module/edit/hook.ts +4 -2
- package/packages/table/module/export/export-panel.ts +4 -2
- package/packages/table/module/export/import-panel.ts +4 -2
- package/packages/table/module/menu/hook.ts +3 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +9 -3
- package/packages/table/src/cell.ts +18 -4
- package/packages/table/src/columnInfo.ts +3 -2
- package/packages/table/src/footer.ts +7 -2
- package/packages/table/src/header.ts +7 -2
- package/packages/table/src/table.ts +10 -10
- package/packages/table/src/util.ts +1 -0
- /package/es/{iconfont.1742788362296.ttf → iconfont.1742873611926.ttf} +0 -0
- /package/es/{iconfont.1742788362296.woff → iconfont.1742873611926.woff} +0 -0
- /package/es/{iconfont.1742788362296.woff2 → iconfont.1742873611926.woff2} +0 -0
- /package/lib/{iconfont.1742788362296.ttf → iconfont.1742873611926.ttf} +0 -0
- /package/lib/{iconfont.1742788362296.woff → iconfont.1742873611926.woff} +0 -0
- /package/lib/{iconfont.1742788362296.woff2 → iconfont.1742873611926.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
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.hooks = 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;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.12.0-beta.
|
|
16
|
+
const version = exports.version = "4.12.0-beta.28";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
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.hooks=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="4.12.0-beta.
|
|
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.hooks=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="4.12.0-beta.28",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!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:1,oSize:2},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,hooks=exports.hooks=_core.VxeUI.hooks,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${"4.12.0-beta.
|
|
11
|
+
const version = `table v${"4.12.0-beta.28"}`;
|
|
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 v4.12.0-beta.
|
|
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 v4.12.0-beta.28",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
12
12
|
const { computeCustomOpts } = $xeTable.getComputeMaps()
|
|
13
13
|
const { refElem } = $xeTable.getRefMaps()
|
|
14
14
|
|
|
15
|
-
const $xeGrid = $xeTable.
|
|
15
|
+
const $xeGrid = $xeTable.xeGrid
|
|
16
16
|
|
|
17
17
|
const calcMaxHeight = () => {
|
|
18
18
|
const { customStore } = reactData
|
|
@@ -508,6 +508,8 @@ export default defineComponent({
|
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
const renderSimplePanel = () => {
|
|
511
|
+
const $xeGrid = $xeTable.xeGrid
|
|
512
|
+
|
|
511
513
|
const { customStore } = props
|
|
512
514
|
const { isCustomStatus, customColumnList } = reactData
|
|
513
515
|
const customOpts = computeCustomOpts.value
|
|
@@ -534,7 +536,7 @@ export default defineComponent({
|
|
|
534
536
|
}
|
|
535
537
|
const params = {
|
|
536
538
|
$table: $xeTable,
|
|
537
|
-
$grid: $
|
|
539
|
+
$grid: $xeGrid,
|
|
538
540
|
columns: customColumnList,
|
|
539
541
|
isAllChecked,
|
|
540
542
|
isAllIndeterminate,
|
|
@@ -774,6 +776,8 @@ export default defineComponent({
|
|
|
774
776
|
}
|
|
775
777
|
|
|
776
778
|
const renderPopupPanel = () => {
|
|
779
|
+
const $xeGrid = $xeTable.xeGrid
|
|
780
|
+
|
|
777
781
|
const { customStore } = props
|
|
778
782
|
const { resizable: allResizable } = tableProps
|
|
779
783
|
const { isCustomStatus, customColumnList } = reactData
|
|
@@ -800,7 +804,7 @@ export default defineComponent({
|
|
|
800
804
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
801
805
|
const params = {
|
|
802
806
|
$table: $xeTable,
|
|
803
|
-
$grid: $
|
|
807
|
+
$grid: $xeGrid,
|
|
804
808
|
columns: customColumnList,
|
|
805
809
|
isAllChecked,
|
|
806
810
|
isAllIndeterminate,
|
|
@@ -324,6 +324,8 @@ hooks.add('tableEditModule', {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
const handleEditActive = (params: any, evnt: Event | null, isFocus: boolean, isPos: boolean) => {
|
|
327
|
+
const $xeGrid = $xeTable.xeGrid
|
|
328
|
+
|
|
327
329
|
const { editConfig, mouseConfig } = props
|
|
328
330
|
const { editStore, tableColumn } = reactData
|
|
329
331
|
const editOpts = computeEditOpts.value
|
|
@@ -340,7 +342,7 @@ hooks.add('tableEditModule', {
|
|
|
340
342
|
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
341
343
|
// 判断是否禁用编辑
|
|
342
344
|
let type: 'edit-disabled' | 'edit-activated' = 'edit-disabled'
|
|
343
|
-
if (!beforeEditMethod || beforeEditMethod({ ...params, $table: $xeTable, $grid: $
|
|
345
|
+
if (!beforeEditMethod || beforeEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid })) {
|
|
344
346
|
if (mouseConfig) {
|
|
345
347
|
$xeTable.clearSelected()
|
|
346
348
|
if ($xeTable.clearCellAreas) {
|
|
@@ -368,7 +370,7 @@ hooks.add('tableEditModule', {
|
|
|
368
370
|
$xeTable.handleFocus(params, evnt)
|
|
369
371
|
}
|
|
370
372
|
if (afterEditMethod) {
|
|
371
|
-
afterEditMethod({ ...params, $table: $xeTable, $grid: $
|
|
373
|
+
afterEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid })
|
|
372
374
|
}
|
|
373
375
|
})
|
|
374
376
|
}
|
|
@@ -162,6 +162,8 @@ export default defineComponent({
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
const renderVN = () => {
|
|
165
|
+
const $xeGrid = $xeTable.xeGrid
|
|
166
|
+
|
|
165
167
|
const { defaultOptions, storeData } = props
|
|
166
168
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData
|
|
167
169
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData
|
|
@@ -242,7 +244,7 @@ export default defineComponent({
|
|
|
242
244
|
default: () => {
|
|
243
245
|
const params = {
|
|
244
246
|
$table: $xeTable,
|
|
245
|
-
$grid: $
|
|
247
|
+
$grid: $xeGrid,
|
|
246
248
|
options: defaultOptions,
|
|
247
249
|
columns,
|
|
248
250
|
params: defaultOptions.params as any
|
|
@@ -487,7 +489,7 @@ export default defineComponent({
|
|
|
487
489
|
footer () {
|
|
488
490
|
const params = {
|
|
489
491
|
$table: $xeTable,
|
|
490
|
-
$grid: $
|
|
492
|
+
$grid: $xeGrid,
|
|
491
493
|
options: defaultOptions,
|
|
492
494
|
columns,
|
|
493
495
|
params: defaultOptions.params as any
|
|
@@ -93,6 +93,8 @@ export default defineComponent({
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
const renderVN = () => {
|
|
96
|
+
const $xeGrid = $xeTable.xeGrid
|
|
97
|
+
|
|
96
98
|
const { defaultOptions, storeData } = props
|
|
97
99
|
const selectName = computeSelectName.value
|
|
98
100
|
const hasFile = computeHasFile.value
|
|
@@ -127,7 +129,7 @@ export default defineComponent({
|
|
|
127
129
|
default: () => {
|
|
128
130
|
const params = {
|
|
129
131
|
$table: $xeTable,
|
|
130
|
-
$grid: $
|
|
132
|
+
$grid: $xeGrid,
|
|
131
133
|
options: defaultOptions,
|
|
132
134
|
params: defaultOptions.params as any
|
|
133
135
|
}
|
|
@@ -204,7 +206,7 @@ export default defineComponent({
|
|
|
204
206
|
footer () {
|
|
205
207
|
const params = {
|
|
206
208
|
$table: $xeTable,
|
|
207
|
-
$grid: $
|
|
209
|
+
$grid: $xeGrid,
|
|
208
210
|
options: defaultOptions,
|
|
209
211
|
params: defaultOptions.params as any
|
|
210
212
|
}
|
|
@@ -279,10 +279,12 @@ hooks.add('tableMenuModule', {
|
|
|
279
279
|
* 快捷菜单点击事件
|
|
280
280
|
*/
|
|
281
281
|
ctxMenuLinkEvent (evnt, menu) {
|
|
282
|
+
const $xeGrid = $xeTable.xeGrid
|
|
283
|
+
|
|
282
284
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
283
285
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
284
286
|
const gMenuOpts = menus.get(menu.code)
|
|
285
|
-
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $
|
|
287
|
+
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $event: evnt })
|
|
286
288
|
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null
|
|
287
289
|
if (tmMethod) {
|
|
288
290
|
tmMethod(params, evnt)
|
|
@@ -382,6 +382,8 @@ hooks.add('tableValidatorModule', {
|
|
|
382
382
|
* trigger=blur|change 触发方式(除非特殊场景,否则默认为空就行)
|
|
383
383
|
*/
|
|
384
384
|
validCellRules (validType, row, column, val) {
|
|
385
|
+
const $xeGrid = $xeTable.xeGrid
|
|
386
|
+
|
|
385
387
|
const { editRules } = props
|
|
386
388
|
const { field } = column
|
|
387
389
|
const errorRules: Rule[] = []
|
|
@@ -404,7 +406,7 @@ hooks.add('tableValidatorModule', {
|
|
|
404
406
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
405
407
|
field: column.field,
|
|
406
408
|
$table: $xeTable,
|
|
407
|
-
$grid: $
|
|
409
|
+
$grid: $xeGrid
|
|
408
410
|
}
|
|
409
411
|
let customValid: any
|
|
410
412
|
if (XEUtils.isString(validator)) {
|
|
@@ -101,6 +101,8 @@ export default defineComponent({
|
|
|
101
101
|
columns: VxeTableDefines.ColumnInfo[],
|
|
102
102
|
items: any[]
|
|
103
103
|
) => {
|
|
104
|
+
const $xeGrid = $xeTable.xeGrid
|
|
105
|
+
|
|
104
106
|
const { fullAllDataRowIdData, visibleColumn } = tableInternalData
|
|
105
107
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps
|
|
106
108
|
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData
|
|
@@ -157,7 +159,7 @@ export default defineComponent({
|
|
|
157
159
|
$table: VxeTableConstructor<any> & VxeTablePrivateMethods
|
|
158
160
|
} = {
|
|
159
161
|
$table: $xeTable,
|
|
160
|
-
$grid: $
|
|
162
|
+
$grid: $xeGrid,
|
|
161
163
|
isEdit: false,
|
|
162
164
|
seq,
|
|
163
165
|
rowid,
|
|
@@ -652,6 +654,7 @@ export default defineComponent({
|
|
|
652
654
|
|
|
653
655
|
const renderVN = () => {
|
|
654
656
|
const { slots } = tableContext
|
|
657
|
+
const $xeGrid = $xeTable.xeGrid
|
|
655
658
|
|
|
656
659
|
const { fixedColumn, fixedType, tableColumn } = props
|
|
657
660
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
|
|
@@ -736,7 +739,7 @@ export default defineComponent({
|
|
|
736
739
|
let emptyContent: string | VxeComponentSlotType | VxeComponentSlotType[]
|
|
737
740
|
const emptySlot = slots ? slots.empty : null
|
|
738
741
|
if (emptySlot) {
|
|
739
|
-
emptyContent = $xeTable.callSlot(emptySlot, { $table: $xeTable, $grid: $
|
|
742
|
+
emptyContent = $xeTable.callSlot(emptySlot, { $table: $xeTable, $grid: $xeGrid })
|
|
740
743
|
} else {
|
|
741
744
|
const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null
|
|
742
745
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null
|
|
@@ -789,7 +792,10 @@ export default defineComponent({
|
|
|
789
792
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
790
793
|
return h('col', {
|
|
791
794
|
name: column.id,
|
|
792
|
-
key: $columnIndex
|
|
795
|
+
key: $columnIndex,
|
|
796
|
+
style: {
|
|
797
|
+
width: `${column.renderWidth}px`
|
|
798
|
+
}
|
|
793
799
|
})
|
|
794
800
|
})),
|
|
795
801
|
/**
|
|
@@ -228,15 +228,27 @@ function getFooterContent (params: VxeTableDefines.CellRenderFooterParams & { $t
|
|
|
228
228
|
})
|
|
229
229
|
if (footerFormatter) {
|
|
230
230
|
if (XEUtils.isFunction(footerFormatter)) {
|
|
231
|
-
return
|
|
231
|
+
return [
|
|
232
|
+
h('span', {
|
|
233
|
+
class: 'vxe-cell--label'
|
|
234
|
+
}, `${footerFormatter(footParams)}`)
|
|
235
|
+
]
|
|
232
236
|
}
|
|
233
237
|
const isArr = XEUtils.isArray(footerFormatter)
|
|
234
238
|
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter)
|
|
235
239
|
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
236
240
|
if (footerFormatMethod) {
|
|
237
|
-
return
|
|
241
|
+
return [
|
|
242
|
+
h('span', {
|
|
243
|
+
class: 'vxe-cell--label'
|
|
244
|
+
}, `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`)
|
|
245
|
+
]
|
|
238
246
|
}
|
|
239
|
-
return
|
|
247
|
+
return [
|
|
248
|
+
h('span', {
|
|
249
|
+
class: 'vxe-cell--label'
|
|
250
|
+
}, '')
|
|
251
|
+
]
|
|
240
252
|
}
|
|
241
253
|
if (renderOpts) {
|
|
242
254
|
const compConf = renderer.get(renderOpts.name)
|
|
@@ -248,7 +260,9 @@ function getFooterContent (params: VxeTableDefines.CellRenderFooterParams & { $t
|
|
|
248
260
|
}
|
|
249
261
|
}
|
|
250
262
|
return [
|
|
251
|
-
|
|
263
|
+
h('span', {
|
|
264
|
+
class: 'vxe-cell--label'
|
|
265
|
+
}, formatText(itemValue, 1))
|
|
252
266
|
]
|
|
253
267
|
}
|
|
254
268
|
|
|
@@ -10,10 +10,11 @@ const { getI18n, formats } = VxeUI
|
|
|
10
10
|
export class ColumnInfo {
|
|
11
11
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
12
12
|
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
|
|
13
|
-
const
|
|
13
|
+
const tableProps = $xeTable.props
|
|
14
|
+
const $xeGrid = $xeTable.xeGrid
|
|
15
|
+
|
|
14
16
|
const formatter: string | any[] = _vm.formatter
|
|
15
17
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true
|
|
16
|
-
const { props: tableProps } = $xeTable
|
|
17
18
|
|
|
18
19
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
19
20
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
@@ -58,6 +58,8 @@ export default defineComponent({
|
|
|
58
58
|
const refFooterXSpace = ref() as Ref<HTMLDivElement>
|
|
59
59
|
|
|
60
60
|
const renderRows = (tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) => {
|
|
61
|
+
const $xeGrid = $xeTable.xeGrid
|
|
62
|
+
|
|
61
63
|
const { fixedType } = props
|
|
62
64
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
63
65
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData
|
|
@@ -96,7 +98,7 @@ export default defineComponent({
|
|
|
96
98
|
$table: VxeTableConstructor<any> & VxeTablePrivateMethods
|
|
97
99
|
} = {
|
|
98
100
|
$table: $xeTable,
|
|
99
|
-
$grid: $
|
|
101
|
+
$grid: $xeGrid,
|
|
100
102
|
row,
|
|
101
103
|
rowIndex: _rowIndex,
|
|
102
104
|
_rowIndex,
|
|
@@ -354,7 +356,10 @@ export default defineComponent({
|
|
|
354
356
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
355
357
|
return h('col', {
|
|
356
358
|
name: column.id,
|
|
357
|
-
key: $columnIndex
|
|
359
|
+
key: $columnIndex,
|
|
360
|
+
style: {
|
|
361
|
+
width: `${column.renderWidth}px`
|
|
362
|
+
}
|
|
358
363
|
})
|
|
359
364
|
})),
|
|
360
365
|
/**
|
|
@@ -43,6 +43,8 @@ export default defineComponent({
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const renderRows = (isGroup: boolean, isOptimizeMode: boolean, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
|
|
46
|
+
const $xeGrid = $xeTable.xeGrid
|
|
47
|
+
|
|
46
48
|
const { fixedType } = props
|
|
47
49
|
const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps
|
|
48
50
|
const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX } = tableReactData
|
|
@@ -78,7 +80,7 @@ export default defineComponent({
|
|
|
78
80
|
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
79
81
|
const cellParams: VxeTableDefines.CellRenderHeaderParams & {
|
|
80
82
|
$table: VxeTableConstructor & VxeTablePrivateMethods
|
|
81
|
-
} = { $table: $xeTable, $grid: $
|
|
83
|
+
} = { $table: $xeTable, $grid: $xeGrid, $rowIndex, column, columnIndex, $columnIndex, _columnIndex, firstFilterOption, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, hasFilter }
|
|
82
84
|
const thAttrs: Record<string, string | number | null> = {
|
|
83
85
|
colid,
|
|
84
86
|
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
@@ -317,7 +319,10 @@ export default defineComponent({
|
|
|
317
319
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
318
320
|
return h('col', {
|
|
319
321
|
name: column.id,
|
|
320
|
-
key: $columnIndex
|
|
322
|
+
key: $columnIndex,
|
|
323
|
+
style: {
|
|
324
|
+
width: `${column.renderWidth}px`
|
|
325
|
+
}
|
|
321
326
|
})
|
|
322
327
|
})),
|
|
323
328
|
/**
|
|
@@ -6803,8 +6803,9 @@ export default defineComponent({
|
|
|
6803
6803
|
* @param {Event} evnt 事件
|
|
6804
6804
|
* @param {Row} row 行对象
|
|
6805
6805
|
*/
|
|
6806
|
-
const handleTooltip = (evnt: MouseEvent, tdEl: HTMLTableCellElement, overflowElem: HTMLElement
|
|
6807
|
-
|
|
6806
|
+
const handleTooltip = (evnt: MouseEvent, tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, params: any) => {
|
|
6807
|
+
const tipOverEl = overflowElem || tdEl
|
|
6808
|
+
if (!tipOverEl) {
|
|
6808
6809
|
return nextTick()
|
|
6809
6810
|
}
|
|
6810
6811
|
params.cell = tdEl
|
|
@@ -6814,9 +6815,8 @@ export default defineComponent({
|
|
|
6814
6815
|
const { showAll, contentMethod } = tooltipOpts
|
|
6815
6816
|
const customContent = contentMethod ? contentMethod(params) : null
|
|
6816
6817
|
const useCustom = contentMethod && !XEUtils.eqNull(customContent)
|
|
6817
|
-
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ?
|
|
6818
|
-
|
|
6819
|
-
if (content && (showAll || useCustom || isCellOverflow)) {
|
|
6818
|
+
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim()
|
|
6819
|
+
if (content && (showAll || useCustom || (tipOverEl.scrollWidth > tipOverEl.clientWidth))) {
|
|
6820
6820
|
Object.assign(tooltipStore, {
|
|
6821
6821
|
row,
|
|
6822
6822
|
column,
|
|
@@ -6826,7 +6826,7 @@ export default defineComponent({
|
|
|
6826
6826
|
nextTick(() => {
|
|
6827
6827
|
const $tooltip = refTooltip.value
|
|
6828
6828
|
if ($tooltip && $tooltip.open) {
|
|
6829
|
-
$tooltip.open(
|
|
6829
|
+
$tooltip.open(tipOverEl, formatText(content))
|
|
6830
6830
|
}
|
|
6831
6831
|
})
|
|
6832
6832
|
}
|
|
@@ -7787,7 +7787,7 @@ export default defineComponent({
|
|
|
7787
7787
|
return
|
|
7788
7788
|
}
|
|
7789
7789
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
7790
|
-
handleTooltip(evnt, thEl, cellEl,
|
|
7790
|
+
handleTooltip(evnt, thEl, thEl.querySelector<HTMLElement>('.vxe-cell--title') || cellEl, params)
|
|
7791
7791
|
}
|
|
7792
7792
|
},
|
|
7793
7793
|
/**
|
|
@@ -7814,7 +7814,7 @@ export default defineComponent({
|
|
|
7814
7814
|
}
|
|
7815
7815
|
}
|
|
7816
7816
|
if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
|
|
7817
|
-
handleTooltip(evnt, tdEl, tdEl.querySelector('.vxe-cell--
|
|
7817
|
+
handleTooltip(evnt, tdEl, tdEl.querySelector<HTMLElement>('.vxe-cell--label') || tdEl.querySelector<HTMLElement>('.vxe-cell--wrapper'), params)
|
|
7818
7818
|
}
|
|
7819
7819
|
},
|
|
7820
7820
|
/**
|
|
@@ -7823,10 +7823,10 @@ export default defineComponent({
|
|
|
7823
7823
|
triggerFooterTooltipEvent (evnt, params) {
|
|
7824
7824
|
const { column } = params
|
|
7825
7825
|
const { tooltipStore } = reactData
|
|
7826
|
-
const
|
|
7826
|
+
const tdEl = evnt.currentTarget as HTMLTableCellElement
|
|
7827
7827
|
handleTargetEnterEvent(tooltipStore.column !== column || !!tooltipStore.row)
|
|
7828
7828
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
7829
|
-
handleTooltip(evnt,
|
|
7829
|
+
handleTooltip(evnt, tdEl, tdEl.querySelector<HTMLElement>('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper') as HTMLElement, params)
|
|
7830
7830
|
}
|
|
7831
7831
|
},
|
|
7832
7832
|
handleTargetLeaveEvent () {
|
|
@@ -388,6 +388,7 @@ export function destroyColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
388
388
|
|
|
389
389
|
export function getRootColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, column: ColumnInfo) {
|
|
390
390
|
const { internalData } = $xeTable
|
|
391
|
+
|
|
391
392
|
const { fullColumnIdData } = internalData
|
|
392
393
|
if (!column) {
|
|
393
394
|
return null
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|