vxe-table 3.12.1-beta.0 → 3.12.1-beta.2
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/export/mixin.js +1 -1
- package/es/table/src/body.js +9 -6
- package/es/table/src/methods.js +36 -9
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +46 -18
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/mixin.js +1 -1
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/body.js +7 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +36 -10
- package/lib/table/src/methods.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/table/module/export/mixin.ts +1 -1
- package/packages/table/src/body.ts +7 -5
- package/packages/table/src/methods.ts +42 -13
- /package/es/{iconfont.1735796308780.ttf → iconfont.1735881990049.ttf} +0 -0
- /package/es/{iconfont.1735796308780.woff → iconfont.1735881990049.woff} +0 -0
- /package/es/{iconfont.1735796308780.woff2 → iconfont.1735881990049.woff2} +0 -0
- /package/lib/{iconfont.1735796308780.ttf → iconfont.1735881990049.ttf} +0 -0
- /package/lib/{iconfont.1735796308780.woff → iconfont.1735881990049.woff} +0 -0
- /package/lib/{iconfont.1735796308780.woff2 → iconfont.1735881990049.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.12.1-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.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.12.1-beta.2",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},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{maxFixedSize:4},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,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},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},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{gt:60},scrollY:{gt:100}},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.12.1-beta.
|
|
11
|
+
const version = `table v${"3.12.1-beta.2"}`;
|
|
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.12.1-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 v3.12.1-beta.2",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.12.1-beta.
|
|
3
|
+
"version": "3.12.1-beta.2",
|
|
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.62"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
|
|
@@ -1394,7 +1394,7 @@ export default {
|
|
|
1394
1394
|
handleOptions.data = afterFullData
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
return handleExport($xeTable,
|
|
1397
|
+
return handleExport($xeTable, handleOptions)
|
|
1398
1398
|
},
|
|
1399
1399
|
_importByFile (file: any, options: any) {
|
|
1400
1400
|
const opts = Object.assign({}, options)
|
|
@@ -294,12 +294,14 @@ function renderColumn (h: any, _vm: any, $xeTable: any, seq: any, rowid: any, fi
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
let cellHeight = ''
|
|
297
|
-
if (hasEllipsis
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (!
|
|
301
|
-
cellHeight = `${rest.height ||
|
|
297
|
+
if (hasEllipsis) {
|
|
298
|
+
if (scrollYRHeight || rowHeight) {
|
|
299
|
+
cellHeight = `${scrollYRHeight || rowHeight}px`
|
|
300
|
+
} else if (!isAllOverflow) {
|
|
301
|
+
cellHeight = `${rest.height || 18}px`
|
|
302
302
|
}
|
|
303
|
+
} else {
|
|
304
|
+
cellHeight = `${rest.height || 18}px`
|
|
303
305
|
}
|
|
304
306
|
|
|
305
307
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
@@ -7,7 +7,7 @@ import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible,
|
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
9
9
|
|
|
10
|
-
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf } from '../../../types'
|
|
10
|
+
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, TableInternalData } from '../../../types'
|
|
11
11
|
|
|
12
12
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI
|
|
13
13
|
|
|
@@ -289,16 +289,32 @@ function calcTableHeight (_vm: any, key: 'height' | 'minHeight' | 'maxHeight') {
|
|
|
289
289
|
return num
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
const
|
|
292
|
+
// const updateCellOffset = ($xeTable: VxeTableConstructor) => {
|
|
293
|
+
// const internalData = $xeTable as unknown as TableInternalData
|
|
294
|
+
|
|
295
|
+
// const { chTimeout, chRunTime } = internalData
|
|
296
|
+
// if (chTimeout) {
|
|
297
|
+
// clearTimeout(chTimeout)
|
|
298
|
+
// }
|
|
299
|
+
// if (!chRunTime || chRunTime + 10 < Date.now()) {
|
|
300
|
+
// internalData.chRunTime = Date.now()
|
|
301
|
+
// }
|
|
302
|
+
// internalData.chTimeout = setTimeout(() => {
|
|
303
|
+
// internalData.chRunTime = undefined
|
|
304
|
+
// internalData.chTimeout = undefined
|
|
305
|
+
// }, 80)
|
|
306
|
+
// }
|
|
307
|
+
|
|
308
|
+
const calcCellHeight = ($xeTable: VxeTableConstructor) => {
|
|
293
309
|
const props = $xeTable
|
|
294
|
-
const reactData = $xeTable
|
|
295
|
-
const internalData = $xeTable
|
|
310
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
311
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
296
312
|
|
|
297
313
|
const { showOverflow } = props
|
|
298
|
-
const { tableData, scrollXLoad
|
|
314
|
+
const { tableData, scrollXLoad } = reactData
|
|
299
315
|
const { fullAllDataRowIdData } = internalData
|
|
300
316
|
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
301
|
-
if (!showOverflow &&
|
|
317
|
+
if (!showOverflow && el) {
|
|
302
318
|
let paddingTop = 0
|
|
303
319
|
let paddingBottom = 0
|
|
304
320
|
let calcPadding = false
|
|
@@ -329,6 +345,7 @@ const calcCellHeight = ($xeTable: any) => {
|
|
|
329
345
|
}
|
|
330
346
|
})
|
|
331
347
|
}
|
|
348
|
+
// updateCellOffset($xeTable)
|
|
332
349
|
}
|
|
333
350
|
|
|
334
351
|
function getOrderField (_vm: any, column: any) {
|
|
@@ -559,7 +576,7 @@ function handleRecalculateLayout ($xeTable: any, reFull: boolean) {
|
|
|
559
576
|
const internalData = $xeTable
|
|
560
577
|
|
|
561
578
|
const el = $xeTable.$refs.refElem
|
|
562
|
-
internalData.
|
|
579
|
+
internalData.rceRunTime = Date.now()
|
|
563
580
|
if (!el || !el.clientWidth) {
|
|
564
581
|
return $xeTable.$nextTick()
|
|
565
582
|
}
|
|
@@ -592,10 +609,14 @@ function checkLastSyncScroll ($xeTable: any, isRollX: boolean, isRollY: boolean)
|
|
|
592
609
|
internalData.bodyScrollType = ''
|
|
593
610
|
internalData.inFooterScroll = false
|
|
594
611
|
if (isRollX && scrollXLoad) {
|
|
595
|
-
$xeTable.updateScrollXData()
|
|
612
|
+
$xeTable.updateScrollXData().then(() => {
|
|
613
|
+
$xeTable.loadScrollXData()
|
|
614
|
+
})
|
|
596
615
|
}
|
|
597
616
|
if (isRollY && scrollYLoad) {
|
|
598
|
-
$xeTable.updateScrollYData()
|
|
617
|
+
$xeTable.updateScrollYData().then(() => {
|
|
618
|
+
$xeTable.loadScrollYData()
|
|
619
|
+
})
|
|
599
620
|
}
|
|
600
621
|
$xeTable.updateCellAreas()
|
|
601
622
|
}, 200)
|
|
@@ -2456,6 +2477,7 @@ const Methods = {
|
|
|
2456
2477
|
saveCustomStore (type: any) {
|
|
2457
2478
|
const $xeTable = this
|
|
2458
2479
|
const props = $xeTable
|
|
2480
|
+
const reactData = $xeTable as TableReactData
|
|
2459
2481
|
|
|
2460
2482
|
const { customConfig } = props
|
|
2461
2483
|
const tableId = $xeTable.computeTableId
|
|
@@ -2467,6 +2489,9 @@ const Methods = {
|
|
|
2467
2489
|
const isCustomVisible = isAllCustom || storageOpts.visible
|
|
2468
2490
|
const isCustomFixed = isAllCustom || storageOpts.fixed
|
|
2469
2491
|
const isCustomSort = isAllCustom || storageOpts.sort
|
|
2492
|
+
if (type !== 'reset') {
|
|
2493
|
+
reactData.isCustomStatus = true
|
|
2494
|
+
}
|
|
2470
2495
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
2471
2496
|
if (!tableId) {
|
|
2472
2497
|
errLog('vxe.error.reqProp', ['id'])
|
|
@@ -2719,7 +2744,7 @@ const Methods = {
|
|
|
2719
2744
|
const internalData = $xeTable
|
|
2720
2745
|
|
|
2721
2746
|
return new Promise<void>(resolve => {
|
|
2722
|
-
const { rceTimeout,
|
|
2747
|
+
const { rceTimeout, rceRunTime } = internalData
|
|
2723
2748
|
const resizeOpts = $xeTable.computeResizeOpts
|
|
2724
2749
|
const refreshDelay = resizeOpts.refreshDelay || 20
|
|
2725
2750
|
const el = $xeTable.$refs.refElem as HTMLElement
|
|
@@ -2728,7 +2753,7 @@ const Methods = {
|
|
|
2728
2753
|
}
|
|
2729
2754
|
if (rceTimeout) {
|
|
2730
2755
|
clearTimeout(rceTimeout)
|
|
2731
|
-
if (
|
|
2756
|
+
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
2732
2757
|
resolve(
|
|
2733
2758
|
handleRecalculateLayout($xeTable, !!reFull)
|
|
2734
2759
|
)
|
|
@@ -7024,7 +7049,9 @@ const Methods = {
|
|
|
7024
7049
|
scrollXStore.offsetSize = offsetXSize
|
|
7025
7050
|
scrollXStore.visibleSize = visibleXSize
|
|
7026
7051
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex)
|
|
7027
|
-
$xeTable.updateScrollXData()
|
|
7052
|
+
$xeTable.updateScrollXData().then(() => {
|
|
7053
|
+
$xeTable.loadScrollXData()
|
|
7054
|
+
})
|
|
7028
7055
|
} else {
|
|
7029
7056
|
$xeTable.updateScrollXSpace()
|
|
7030
7057
|
}
|
|
@@ -7039,7 +7066,9 @@ const Methods = {
|
|
|
7039
7066
|
scrollYStore.offsetSize = offsetYSize
|
|
7040
7067
|
scrollYStore.visibleSize = visibleYSize
|
|
7041
7068
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex)
|
|
7042
|
-
$xeTable.updateScrollYData()
|
|
7069
|
+
$xeTable.updateScrollYData().then(() => {
|
|
7070
|
+
$xeTable.loadScrollYData()
|
|
7071
|
+
})
|
|
7043
7072
|
} else {
|
|
7044
7073
|
$xeTable.updateScrollYSpace()
|
|
7045
7074
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|