vxe-table 3.12.0-beta.8 → 3.12.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/locale/lang/de-DE.js +490 -490
- package/es/locale/lang/en-US.js +438 -438
- package/es/locale/lang/it-IT.js +692 -0
- package/es/locale/lang/ru-RU.js +36 -36
- package/es/locale/lang/th-TH.js +692 -0
- package/es/locale/lang/zh-CHT.js +19 -19
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +5 -5
- package/es/table/module/export/mixin.js +208 -140
- package/es/table/module/validator/mixin.js +2 -6
- package/es/table/src/cell.js +88 -61
- package/es/table/src/column.js +2 -2
- package/es/table/src/group.js +2 -2
- package/es/table/src/methods.js +112 -87
- package/es/table/src/table.js +7 -11
- package/es/toolbar/src/toolbar.js +22 -4
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +3 -0
- package/lib/index.umd.js +513 -362
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/de-DE.js +490 -490
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +438 -438
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +438 -438
- package/lib/locale/lang/it-IT.js +698 -0
- package/lib/locale/lang/it-IT.min.js +1 -0
- package/lib/locale/lang/ru-RU.js +36 -36
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +36 -36
- package/lib/locale/lang/th-TH.js +698 -0
- package/lib/locale/lang/th-TH.min.js +1 -0
- package/lib/locale/lang/zh-CHT.js +19 -19
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +19 -19
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +5 -5
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +239 -167
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +1 -6
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/cell.js +109 -83
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +112 -87
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +4 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +36 -2
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/lib/ui/src/vn.js +3 -0
- package/lib/ui/src/vn.min.js +1 -1
- package/package.json +3 -3
- package/packages/locale/lang/de-DE.ts +492 -491
- package/packages/locale/lang/en-US.ts +438 -438
- package/packages/locale/lang/it-IT.ts +692 -0
- package/packages/locale/lang/ru-RU.ts +36 -36
- package/packages/locale/lang/th-TH.ts +692 -0
- package/packages/locale/lang/zh-CHT.ts +19 -19
- package/packages/table/module/custom/panel.ts +5 -5
- package/packages/table/module/export/mixin.ts +227 -156
- package/packages/table/module/validator/mixin.ts +2 -6
- package/packages/table/src/cell.ts +141 -108
- package/packages/table/src/methods.ts +136 -105
- package/packages/table/src/table.ts +8 -12
- package/packages/toolbar/src/toolbar.ts +26 -8
- package/packages/ui/index.ts +1 -1
- package/packages/ui/src/vn.ts +4 -1
- /package/es/{iconfont.1735299026800.ttf → iconfont.1735661059384.ttf} +0 -0
- /package/es/{iconfont.1735299026800.woff → iconfont.1735661059384.woff} +0 -0
- /package/es/{iconfont.1735299026800.woff2 → iconfont.1735661059384.woff2} +0 -0
- /package/lib/{iconfont.1735299026800.ttf → iconfont.1735661059384.ttf} +0 -0
- /package/lib/{iconfont.1735299026800.woff → iconfont.1735661059384.woff} +0 -0
- /package/lib/{iconfont.1735299026800.woff2 → iconfont.1735661059384.woff2} +0 -0
|
@@ -5,8 +5,8 @@ import { VxeUI } from '../../ui'
|
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
6
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
7
7
|
|
|
8
|
-
import type { ValueOf, VxeButtonComponent, VxeComponentSizeType } from 'vxe-pc-ui'
|
|
9
|
-
import type { VxeGridConstructor, GridPrivateMethods, ToolbarInternalData,
|
|
8
|
+
import type { ValueOf, VxeButtonComponent, VxeComponentSizeType, VxeComponentSlotType } from 'vxe-pc-ui'
|
|
9
|
+
import type { VxeGridConstructor, GridPrivateMethods, ToolbarInternalData, VxeTableDefines, VxeToolbarEmits, VxeToolbarPropTypes, VxeTablePropTypes, ToolbarReactData, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
|
|
10
10
|
|
|
11
11
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, globalMixins, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
@@ -139,13 +139,13 @@ export default defineVxeComponent({
|
|
|
139
139
|
},
|
|
140
140
|
syncUpdate (params: {
|
|
141
141
|
collectColumn: VxeTableDefines.ColumnInfo<any>[]
|
|
142
|
-
$table: VxeTableConstructor
|
|
142
|
+
$table: VxeTableConstructor
|
|
143
143
|
}) {
|
|
144
144
|
const $xeToolbar = this
|
|
145
145
|
const reactData = $xeToolbar.reactData
|
|
146
146
|
const internalData = $xeToolbar.internalData
|
|
147
147
|
|
|
148
|
-
internalData.connectTable = params.$table
|
|
148
|
+
internalData.connectTable = params.$table as (VxeTableConstructor & VxeTablePrivateMethods)
|
|
149
149
|
reactData.columns = params.collectColumn
|
|
150
150
|
reactData.connectFlag++
|
|
151
151
|
},
|
|
@@ -376,19 +376,25 @@ export default defineVxeComponent({
|
|
|
376
376
|
/**
|
|
377
377
|
* 渲染按钮
|
|
378
378
|
*/
|
|
379
|
-
|
|
379
|
+
renderLeftBtns (h: CreateElement): VxeComponentSlotType[] {
|
|
380
380
|
// 使用已安装的组件,如果未安装则不渲染
|
|
381
381
|
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
382
382
|
|
|
383
383
|
const $xeToolbar = this
|
|
384
384
|
const props = $xeToolbar
|
|
385
|
+
const slots = $xeToolbar.$scopedSlots
|
|
385
386
|
const internalData = $xeToolbar.internalData
|
|
386
387
|
const $xeGrid = $xeToolbar.$xeGrid
|
|
387
388
|
|
|
388
389
|
const { buttons } = props
|
|
389
390
|
const { connectTable } = internalData
|
|
390
391
|
const $table = connectTable
|
|
391
|
-
const
|
|
392
|
+
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix']
|
|
393
|
+
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix']
|
|
394
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
395
|
+
if (buttonPrefixSlot) {
|
|
396
|
+
btnVNs.push(...getSlotVNs(buttonPrefixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $table: $table })))
|
|
397
|
+
}
|
|
392
398
|
if (buttons) {
|
|
393
399
|
buttons.forEach((item) => {
|
|
394
400
|
const { dropdowns, buttonRender } = item
|
|
@@ -440,6 +446,9 @@ export default defineVxeComponent({
|
|
|
440
446
|
}
|
|
441
447
|
})
|
|
442
448
|
}
|
|
449
|
+
if (buttonSuffixSlot) {
|
|
450
|
+
btnVNs.push(...getSlotVNs(buttonSuffixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $table: $table })))
|
|
451
|
+
}
|
|
443
452
|
return btnVNs
|
|
444
453
|
},
|
|
445
454
|
/**
|
|
@@ -451,13 +460,19 @@ export default defineVxeComponent({
|
|
|
451
460
|
|
|
452
461
|
const $xeToolbar = this
|
|
453
462
|
const props = $xeToolbar
|
|
463
|
+
const slots = $xeToolbar.$scopedSlots
|
|
454
464
|
const internalData = $xeToolbar.internalData
|
|
455
465
|
const $xeGrid = $xeToolbar.$xeGrid
|
|
456
466
|
|
|
457
467
|
const { tools } = props
|
|
458
468
|
const { connectTable } = internalData
|
|
459
469
|
const $table = connectTable
|
|
460
|
-
const
|
|
470
|
+
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix']
|
|
471
|
+
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix']
|
|
472
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
473
|
+
if (toolPrefixSlot) {
|
|
474
|
+
btnVNs.push(...getSlotVNs(toolPrefixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $table: $table })))
|
|
475
|
+
}
|
|
461
476
|
if (tools) {
|
|
462
477
|
tools.forEach((item, tIndex) => {
|
|
463
478
|
const { dropdowns, toolRender } = item
|
|
@@ -512,6 +527,9 @@ export default defineVxeComponent({
|
|
|
512
527
|
}
|
|
513
528
|
})
|
|
514
529
|
}
|
|
530
|
+
if (toolSuffixSlot) {
|
|
531
|
+
btnVNs.push(...getSlotVNs(toolSuffixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $table: $table })))
|
|
532
|
+
}
|
|
515
533
|
return btnVNs
|
|
516
534
|
},
|
|
517
535
|
renderToolImport (h: CreateElement) {
|
|
@@ -680,7 +698,7 @@ export default defineVxeComponent({
|
|
|
680
698
|
}, [
|
|
681
699
|
h('div', {
|
|
682
700
|
class: 'vxe-buttons--wrapper'
|
|
683
|
-
}, buttonsSlot ? buttonsSlot({ $grid: $xeGrid, $table: $table }) : $xeToolbar.
|
|
701
|
+
}, buttonsSlot ? buttonsSlot({ $grid: $xeGrid, $table: $table }) : $xeToolbar.renderLeftBtns(h)),
|
|
684
702
|
h('div', {
|
|
685
703
|
class: 'vxe-tools--wrapper'
|
|
686
704
|
}, toolsSlot ? toolsSlot({ $grid: $xeGrid, $table: $table }) : $xeToolbar.renderRightTools(h)),
|
package/packages/ui/index.ts
CHANGED
package/packages/ui/src/vn.ts
CHANGED
|
@@ -31,7 +31,10 @@ export function getChangeEvent (renderOpts: any) {
|
|
|
31
31
|
return 'change'
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
|
|
34
|
+
export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[] | undefined) {
|
|
35
|
+
if (vns === null || vns === undefined) {
|
|
36
|
+
return []
|
|
37
|
+
}
|
|
35
38
|
if (XEUtils.isArray(vns)) {
|
|
36
39
|
return vns
|
|
37
40
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|