vxe-table 3.21.20 → 3.21.22
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +8 -0
- package/es/locale/lang/de-DE.js +8 -0
- package/es/locale/lang/en-US.js +9 -1
- package/es/locale/lang/es-ES.js +8 -0
- package/es/locale/lang/fr-FR.js +8 -0
- package/es/locale/lang/hu-HU.js +8 -0
- package/es/locale/lang/hy-AM.js +8 -0
- package/es/locale/lang/id-ID.js +8 -0
- package/es/locale/lang/it-IT.js +8 -0
- package/es/locale/lang/ja-JP.js +8 -0
- package/es/locale/lang/ko-KR.js +8 -0
- package/es/locale/lang/ms-MY.js +8 -0
- package/es/locale/lang/nb-NO.js +8 -0
- package/es/locale/lang/pt-BR.js +8 -0
- package/es/locale/lang/ru-RU.js +8 -0
- package/es/locale/lang/th-TH.js +8 -0
- package/es/locale/lang/ug-CN.js +8 -0
- package/es/locale/lang/uk-UA.js +8 -0
- package/es/locale/lang/uz-UZ.js +8 -0
- package/es/locale/lang/vi-VN.js +8 -0
- package/es/locale/lang/zh-CHT.js +8 -0
- package/es/locale/lang/zh-CN.js +8 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +32 -26
- package/es/table/module/custom/panel.js +7 -0
- package/es/table/module/edit/mixin.js +13 -7
- package/es/table/module/menu/mixin.js +11 -7
- package/es/table/src/methods.js +10 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +79 -47
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +8 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +8 -0
- package/lib/locale/lang/de-DE.js +8 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +8 -0
- package/lib/locale/lang/en-US.js +9 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +9 -1
- package/lib/locale/lang/es-ES.js +8 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +8 -0
- package/lib/locale/lang/fr-FR.js +8 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +8 -0
- package/lib/locale/lang/hu-HU.js +8 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +8 -0
- package/lib/locale/lang/hy-AM.js +8 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +8 -0
- package/lib/locale/lang/id-ID.js +8 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +8 -0
- package/lib/locale/lang/it-IT.js +8 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +8 -0
- package/lib/locale/lang/ja-JP.js +8 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +8 -0
- package/lib/locale/lang/ko-KR.js +8 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +8 -0
- package/lib/locale/lang/ms-MY.js +8 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +8 -0
- package/lib/locale/lang/nb-NO.js +8 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +8 -0
- package/lib/locale/lang/pt-BR.js +8 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +8 -0
- package/lib/locale/lang/ru-RU.js +8 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +8 -0
- package/lib/locale/lang/th-TH.js +8 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +8 -0
- package/lib/locale/lang/ug-CN.js +8 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +8 -0
- package/lib/locale/lang/uk-UA.js +8 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +8 -0
- package/lib/locale/lang/uz-UZ.js +8 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +8 -0
- package/lib/locale/lang/vi-VN.js +8 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +8 -0
- package/lib/locale/lang/zh-CHT.js +8 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +8 -0
- package/lib/locale/lang/zh-CN.js +8 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +8 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +32 -26
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +7 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +13 -7
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +10 -5
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/methods.js +6 -6
- 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/locale/lang/ar-EG.ts +8 -0
- package/packages/locale/lang/de-DE.ts +8 -0
- package/packages/locale/lang/en-US.ts +9 -1
- package/packages/locale/lang/es-ES.ts +8 -0
- package/packages/locale/lang/fr-FR.ts +8 -0
- package/packages/locale/lang/hu-HU.ts +8 -0
- package/packages/locale/lang/hy-AM.ts +8 -0
- package/packages/locale/lang/id-ID.ts +8 -0
- package/packages/locale/lang/it-IT.ts +8 -0
- package/packages/locale/lang/ja-JP.ts +8 -0
- package/packages/locale/lang/ko-KR.ts +8 -0
- package/packages/locale/lang/ms-MY.ts +8 -0
- package/packages/locale/lang/nb-NO.ts +8 -0
- package/packages/locale/lang/pt-BR.ts +8 -0
- package/packages/locale/lang/ru-RU.ts +8 -0
- package/packages/locale/lang/th-TH.ts +8 -0
- package/packages/locale/lang/ug-CN.ts +8 -0
- package/packages/locale/lang/uk-UA.ts +8 -0
- package/packages/locale/lang/uz-UZ.ts +8 -0
- package/packages/locale/lang/vi-VN.ts +8 -0
- package/packages/locale/lang/zh-CHT.ts +8 -0
- package/packages/locale/lang/zh-CN.ts +8 -0
- package/packages/table/module/custom/mixin.ts +31 -25
- package/packages/table/module/custom/panel.ts +7 -0
- package/packages/table/module/edit/mixin.ts +19 -8
- package/packages/table/module/menu/mixin.ts +12 -7
- package/packages/table/src/methods.ts +14 -6
- package/packages/table/src/table.ts +6 -6
- package/styles/theme/base.scss +2 -1
- /package/es/{iconfont.1782439496826.ttf → iconfont.1782890276645.ttf} +0 -0
- /package/es/{iconfont.1782439496826.woff → iconfont.1782890276645.woff} +0 -0
- /package/es/{iconfont.1782439496826.woff2 → iconfont.1782890276645.woff2} +0 -0
- /package/lib/{iconfont.1782439496826.ttf → iconfont.1782890276645.ttf} +0 -0
- /package/lib/{iconfont.1782439496826.woff → iconfont.1782890276645.woff} +0 -0
- /package/lib/{iconfont.1782439496826.woff2 → iconfont.1782890276645.woff2} +0 -0
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
}
|
|
160
160
|
return $xeTable.openCustom()
|
|
161
161
|
},
|
|
162
|
-
_saveCustom () {
|
|
162
|
+
_saveCustom (isDirectly?: boolean) {
|
|
163
163
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
164
164
|
const reactData = $xeTable as unknown as TableReactData
|
|
165
165
|
const internalData = $xeTable as unknown as TableInternalData
|
|
@@ -167,34 +167,36 @@ export default {
|
|
|
167
167
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData
|
|
168
168
|
const customOpts = $xeTable.computeCustomOpts
|
|
169
169
|
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
if (!isDirectly) {
|
|
171
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
172
|
+
if (parentColumn) {
|
|
172
173
|
// 更新子列信息
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
column.fixed = parentColumn.fixed
|
|
175
|
+
} else {
|
|
176
|
+
if (allowSort) {
|
|
177
|
+
const sortIndex = index + 1
|
|
178
|
+
column.renderSortNumber = sortIndex
|
|
179
|
+
}
|
|
180
|
+
if (allowFixed) {
|
|
181
|
+
column.fixed = column.renderFixed
|
|
182
|
+
}
|
|
181
183
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
if (allowResizable) {
|
|
185
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
186
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
187
|
+
column.resizeWidth = column.renderResizeWidth
|
|
188
|
+
column.renderWidth = column.renderResizeWidth
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
}
|
|
192
|
+
if (allowVisible) {
|
|
193
|
+
column.visible = column.renderVisible
|
|
194
|
+
}
|
|
195
|
+
if (allowGroup && allowValues) {
|
|
196
|
+
column.aggFunc = column.renderAggFn
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
}
|
|
198
200
|
reactData.isCustomStatus = true
|
|
199
201
|
if (allowGroup && allowValues && !!$xeTable.handlePivotTableAggData) {
|
|
200
202
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -376,10 +378,12 @@ export default {
|
|
|
376
378
|
if (customStore.visible) {
|
|
377
379
|
$xeTable.closeCustom()
|
|
378
380
|
emitCustomEvent($xeTable, 'close', evnt)
|
|
381
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
379
382
|
} else {
|
|
380
383
|
customStore.btnEl = evnt.target
|
|
381
384
|
$xeTable.openCustom()
|
|
382
385
|
emitCustomEvent($xeTable, 'open', evnt)
|
|
386
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt)
|
|
383
387
|
}
|
|
384
388
|
},
|
|
385
389
|
customOpenEvent (evnt: any) {
|
|
@@ -392,6 +396,7 @@ export default {
|
|
|
392
396
|
customStore.btnEl = evnt.target
|
|
393
397
|
$xeTable.openCustom()
|
|
394
398
|
emitCustomEvent($xeTable, 'open', evnt)
|
|
399
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt)
|
|
395
400
|
}
|
|
396
401
|
},
|
|
397
402
|
customCloseEvent (evnt: any) {
|
|
@@ -403,6 +408,7 @@ export default {
|
|
|
403
408
|
customStore.activeBtn = false
|
|
404
409
|
$xeTable.closeCustom()
|
|
405
410
|
emitCustomEvent($xeTable, 'close', evnt)
|
|
411
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
406
412
|
}
|
|
407
413
|
},
|
|
408
414
|
handleUpdateCustomColumn () {
|
|
@@ -180,7 +180,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
180
180
|
$xeTable.saveCustom()
|
|
181
181
|
$xeTable.closeCustom()
|
|
182
182
|
$xeTable.emitCustomEvent('confirm', $event)
|
|
183
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event)
|
|
183
184
|
$xeTable.emitCustomEvent('close', $event)
|
|
185
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
184
186
|
},
|
|
185
187
|
cancelCloseEvent ({ $event }: VxeButtonDefines.ClickEventParams) {
|
|
186
188
|
const $xeTableCustomPanel = this
|
|
@@ -188,6 +190,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
188
190
|
|
|
189
191
|
$xeTable.closeCustom()
|
|
190
192
|
$xeTable.emitCustomEvent('close', $event)
|
|
193
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
191
194
|
},
|
|
192
195
|
cancelCustomEvent ({ $event }: VxeButtonDefines.ClickEventParams) {
|
|
193
196
|
const $xeTableCustomPanel = this
|
|
@@ -196,7 +199,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
196
199
|
$xeTable.cancelCustom()
|
|
197
200
|
$xeTable.closeCustom()
|
|
198
201
|
$xeTable.emitCustomEvent('cancel', $event)
|
|
202
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event)
|
|
199
203
|
$xeTable.emitCustomEvent('close', $event)
|
|
204
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
200
205
|
},
|
|
201
206
|
handleResetCustomEvent (evnt: Event) {
|
|
202
207
|
const $xeTableCustomPanel = this
|
|
@@ -205,7 +210,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
205
210
|
$xeTable.resetCustom(true)
|
|
206
211
|
$xeTable.closeCustom()
|
|
207
212
|
$xeTable.emitCustomEvent('reset', evnt)
|
|
213
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt)
|
|
208
214
|
$xeTable.emitCustomEvent('close', evnt)
|
|
215
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
209
216
|
},
|
|
210
217
|
resetCustomEvent (evnt: Event) {
|
|
211
218
|
if (VxeUI.modal) {
|
|
@@ -11,8 +11,6 @@ const { warnLog, errLog } = createComponentLog('table')
|
|
|
11
11
|
|
|
12
12
|
const { getConfig, renderer, getI18n } = VxeUI
|
|
13
13
|
|
|
14
|
-
const browseObj = XEUtils.browse()
|
|
15
|
-
|
|
16
14
|
function getEditColumnModel (row: any, column: VxeTableDefines.ColumnInfo) {
|
|
17
15
|
const { model, editRender } = column
|
|
18
16
|
if (editRender) {
|
|
@@ -545,7 +543,9 @@ export default {
|
|
|
545
543
|
* @param {*} records
|
|
546
544
|
*/
|
|
547
545
|
_insert (records: any) {
|
|
548
|
-
|
|
546
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
547
|
+
|
|
548
|
+
return handleInsertRowAt($xeTable, records, null)
|
|
549
549
|
},
|
|
550
550
|
/**
|
|
551
551
|
* 往表格指定行中插入临时数据
|
|
@@ -555,19 +555,29 @@ export default {
|
|
|
555
555
|
* @returns
|
|
556
556
|
*/
|
|
557
557
|
_insertAt (records: any, targetRowOrRowid: any) {
|
|
558
|
-
|
|
558
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
559
|
+
|
|
560
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid)
|
|
559
561
|
},
|
|
560
562
|
_insertNextAt (records: any, targetRowOrRowid: any) {
|
|
561
|
-
|
|
563
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
564
|
+
|
|
565
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid, true)
|
|
562
566
|
},
|
|
563
567
|
_insertChild (records: any, parentRowOrParentId: any) {
|
|
564
|
-
|
|
568
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
569
|
+
|
|
570
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, null)
|
|
565
571
|
},
|
|
566
572
|
_insertChildAt (records: any, parentRowOrParentId: any, targetRowOrRowid: any) {
|
|
567
|
-
|
|
573
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
574
|
+
|
|
575
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid)
|
|
568
576
|
},
|
|
569
577
|
_insertChildNextAt (records: any, parentRowOrParentId: any, targetRowOrRowid: any) {
|
|
570
|
-
|
|
578
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
579
|
+
|
|
580
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, true)
|
|
571
581
|
},
|
|
572
582
|
/**
|
|
573
583
|
* 删除指定行数据
|
|
@@ -948,6 +958,7 @@ export default {
|
|
|
948
958
|
const { editRender } = column
|
|
949
959
|
const editOpts = $xeTable.computeEditOpts
|
|
950
960
|
if (isEnableConf(editRender)) {
|
|
961
|
+
const browseObj = XEUtils.browse()
|
|
951
962
|
const compRender = renderer.get(editRender.name)
|
|
952
963
|
let autoFocus = editRender.autofocus || editRender.autoFocus
|
|
953
964
|
let autoSelect = editRender.autoSelect || editRender.autoselect
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
|
-
import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom'
|
|
3
|
+
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from '../../../ui/src/dom'
|
|
4
4
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log'
|
|
6
6
|
|
|
7
|
+
import type { VxeComponentStyleType } from 'vxe-pc-ui'
|
|
7
8
|
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData, VxeTableDefines } from '../../../../types'
|
|
8
9
|
|
|
9
10
|
const { warnLog } = createComponentLog('table')
|
|
@@ -175,7 +176,7 @@ export default {
|
|
|
175
176
|
const isContentMenu = $xeTable.computeIsContentMenu
|
|
176
177
|
const menuOpts = $xeTable.computeMenuOpts
|
|
177
178
|
const config = menuOpts[type]
|
|
178
|
-
const { zIndex, transfer, visibleMethod } = menuOpts
|
|
179
|
+
const { zIndex, transfer, width, visibleMethod } = menuOpts
|
|
179
180
|
if (config) {
|
|
180
181
|
const { options, disabled } = config
|
|
181
182
|
if (disabled) {
|
|
@@ -199,17 +200,21 @@ export default {
|
|
|
199
200
|
|
|
200
201
|
const handleVisible = () => {
|
|
201
202
|
internalData._currMenuParams = params
|
|
203
|
+
const ctxStyle: VxeComponentStyleType = {
|
|
204
|
+
zIndex: zIndex || internalData.tZindex,
|
|
205
|
+
top: `${top}px`,
|
|
206
|
+
left: `${left}px`
|
|
207
|
+
}
|
|
208
|
+
if (width) {
|
|
209
|
+
ctxStyle['--vxe-ui-table-menu-item-width'] = toCssUnit(width)
|
|
210
|
+
}
|
|
202
211
|
Object.assign(ctxMenuStore, {
|
|
203
212
|
visible: true,
|
|
204
213
|
list: options,
|
|
205
214
|
selected: null,
|
|
206
215
|
selectChild: null,
|
|
207
216
|
showChild: false,
|
|
208
|
-
style:
|
|
209
|
-
zIndex: zIndex || internalData.tZindex,
|
|
210
|
-
top: `${top}px`,
|
|
211
|
-
left: `${left}px`
|
|
212
|
-
}
|
|
217
|
+
style: ctxStyle
|
|
213
218
|
})
|
|
214
219
|
$xeTable.$nextTick(() => {
|
|
215
220
|
const tableMenu = $xeTable.$refs.refTableMenu
|
|
@@ -16,8 +16,6 @@ const { warnLog, errLog } = createComponentLog('table')
|
|
|
16
16
|
|
|
17
17
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
18
18
|
|
|
19
|
-
const browseObj = XEUtils.browse()
|
|
20
|
-
|
|
21
19
|
const supportMaxRow = 5e6
|
|
22
20
|
const customStorageKey = 'VXE_CUSTOM_STORE'
|
|
23
21
|
const maxYHeight = 5e6
|
|
@@ -1030,6 +1028,7 @@ function updateStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
|
1030
1028
|
if (!el || (internalData.tBodyHeight && !el.clientHeight)) {
|
|
1031
1029
|
return
|
|
1032
1030
|
}
|
|
1031
|
+
const browseObj = XEUtils.browse()
|
|
1033
1032
|
const containerList = ['main', 'left', 'right']
|
|
1034
1033
|
const { leftList, rightList } = columnStore
|
|
1035
1034
|
let osbWidth = overflowY ? scrollbarWidth : 0
|
|
@@ -3000,11 +2999,14 @@ function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
3000
2999
|
// 如果为 null 使用默认逻辑
|
|
3001
3000
|
if (XEUtils.eqNull(customContent)) {
|
|
3002
3001
|
isShow = isOver
|
|
3002
|
+
content = cellText
|
|
3003
3003
|
} else if (customContent !== '' && customContent !== false) {
|
|
3004
3004
|
// 如果为 '' | false 则不显示
|
|
3005
3005
|
isShow = true
|
|
3006
|
+
content = customContent
|
|
3007
|
+
} else {
|
|
3008
|
+
content = cellText
|
|
3006
3009
|
}
|
|
3007
|
-
content = cellText
|
|
3008
3010
|
}
|
|
3009
3011
|
if (isShow && content) {
|
|
3010
3012
|
const tipContent = formatText(content)
|
|
@@ -10121,9 +10123,12 @@ const tableMethods: any = {
|
|
|
10121
10123
|
* 行拖拽
|
|
10122
10124
|
*/
|
|
10123
10125
|
handleRowDragDragstartEvent (evnt: DragEvent) {
|
|
10126
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
10127
|
+
|
|
10124
10128
|
if (evnt.dataTransfer) {
|
|
10125
10129
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
10126
10130
|
}
|
|
10131
|
+
$xeTable.closeTooltip()
|
|
10127
10132
|
},
|
|
10128
10133
|
handleRowDragSwapEvent (evnt: DragEvent | null, isSyncRow: boolean | undefined, dragRow: any, prevDragRow: any, prevDragPos: '' | 'top' | 'bottom' | 'left' | 'right' | undefined, prevDragToChild: boolean | undefined) {
|
|
10129
10134
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -10837,9 +10842,12 @@ const tableMethods: any = {
|
|
|
10837
10842
|
* 列拖拽
|
|
10838
10843
|
*/
|
|
10839
10844
|
handleHeaderCellDragDragstartEvent (evnt: DragEvent) {
|
|
10845
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
10846
|
+
|
|
10840
10847
|
if (evnt.dataTransfer) {
|
|
10841
10848
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
10842
10849
|
}
|
|
10850
|
+
$xeTable.closeTooltip()
|
|
10843
10851
|
},
|
|
10844
10852
|
handleColDragSwapColumn () {
|
|
10845
10853
|
const $xeTable = this
|
|
@@ -10851,10 +10859,10 @@ const tableMethods: any = {
|
|
|
10851
10859
|
})
|
|
10852
10860
|
},
|
|
10853
10861
|
handleColDragSwapEvent (evnt: DragEvent | null, isSyncColumn: boolean | undefined, dragCol: VxeTableDefines.ColumnInfo | null | undefined, prevDragCol: VxeTableDefines.ColumnInfo | undefined, prevDragPos: '' | 'top' | 'bottom' | 'left' | 'right' | undefined, prevDragToChild: boolean | undefined) {
|
|
10854
|
-
const $xeTable = this
|
|
10862
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
10855
10863
|
const props = $xeTable
|
|
10856
|
-
const reactData = $xeTable
|
|
10857
|
-
const internalData = $xeTable
|
|
10864
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
10865
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
10858
10866
|
|
|
10859
10867
|
const { mouseConfig } = props
|
|
10860
10868
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
@@ -2245,12 +2245,12 @@ export default {
|
|
|
2245
2245
|
const { isCrossTableDrag } = rowDragOpts
|
|
2246
2246
|
const tbOns: {
|
|
2247
2247
|
contextmenu: (...args: any[]) => void
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2248
|
+
keydown: (...args: any[]) => void
|
|
2249
|
+
dragover?: (...args: any[]) => void
|
|
2250
|
+
} = {
|
|
2251
|
+
contextmenu: this.contextMenuEvent,
|
|
2252
|
+
keydown: this.keydownEvent
|
|
2253
|
+
}
|
|
2254
2254
|
if (isCrossTableDrag && !tableData.length) {
|
|
2255
2255
|
tbOns.dragover = $xeTable.handleCrossTableRowDragoverEmptyEvent
|
|
2256
2256
|
}
|
package/styles/theme/base.scss
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
--vxe-ui-font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
|
|
4
4
|
|
|
5
5
|
/*font size*/
|
|
6
|
+
--vxe-ui-font-size-large: 16px;
|
|
6
7
|
--vxe-ui-font-size-default: 14px;
|
|
7
8
|
--vxe-ui-font-size-medium: 14px;
|
|
8
|
-
--vxe-ui-font-size-small:
|
|
9
|
+
--vxe-ui-font-size-small: 12px;
|
|
9
10
|
--vxe-ui-font-size-mini: 12px;
|
|
10
11
|
|
|
11
12
|
/*base border*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|