vxe-table 4.7.74 → 4.7.76
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/style.min.css +1 -1
- package/es/table/index.js +5 -0
- package/es/table/module/custom/hook.js +1 -1
- package/es/table/module/custom/panel.js +19 -7
- package/es/table/module/edit/hook.js +8 -2
- package/es/table/module/keyboard/hook.js +1 -1
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/src/body.js +1 -1
- package/es/table/src/cell.js +7 -5
- package/es/table/src/table.js +9 -9
- package/es/table/src/use/cell-view.js +34 -0
- package/es/table/src/use/index.js +1 -0
- package/es/table/style.css +5 -9
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +5 -9
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.umd.js +110 -31
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +5 -0
- package/lib/table/index.min.js +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 +18 -7
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +8 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +1 -1
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +1 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +1 -0
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +10 -7
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +9 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/use/cell-view.js +57 -0
- package/lib/table/src/use/cell-view.min.js +1 -0
- package/lib/table/src/use/index.js +16 -0
- package/lib/table/src/use/index.min.js +1 -0
- package/lib/table/style/style.css +5 -9
- package/lib/table/style/style.min.css +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/vxe-table/style/style.css +5 -9
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/index.ts +8 -0
- package/packages/table/module/custom/hook.ts +1 -1
- package/packages/table/module/custom/panel.ts +18 -7
- package/packages/table/module/edit/hook.ts +8 -2
- package/packages/table/module/keyboard/hook.ts +1 -1
- package/packages/table/module/validator/hook.ts +1 -1
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/cell.ts +7 -5
- package/packages/table/src/table.ts +9 -9
- package/packages/table/src/use/cell-view.ts +44 -0
- package/packages/table/src/use/index.ts +1 -0
- package/styles/components/table.scss +4 -9
- /package/es/{iconfont.1724980788075.ttf → iconfont.1725332971397.ttf} +0 -0
- /package/es/{iconfont.1724980788075.woff → iconfont.1725332971397.woff} +0 -0
- /package/es/{iconfont.1724980788075.woff2 → iconfont.1725332971397.woff2} +0 -0
- /package/lib/{iconfont.1724980788075.ttf → iconfont.1725332971397.ttf} +0 -0
- /package/lib/{iconfont.1724980788075.woff → iconfont.1725332971397.woff} +0 -0
- /package/lib/{iconfont.1724980788075.woff2 → iconfont.1725332971397.woff2} +0 -0
|
@@ -1773,7 +1773,7 @@ export default defineComponent({
|
|
|
1773
1773
|
checkValidate('blur')
|
|
1774
1774
|
.catch((e: any) => e)
|
|
1775
1775
|
.then(() => {
|
|
1776
|
-
$xeTable.
|
|
1776
|
+
$xeTable.handleEdit(params, evnt)
|
|
1777
1777
|
.then(() => checkValidate('change'))
|
|
1778
1778
|
.catch((e: any) => e)
|
|
1779
1779
|
})
|
|
@@ -3514,8 +3514,8 @@ export default defineComponent({
|
|
|
3514
3514
|
* 将固定的列左边、右边分别靠边
|
|
3515
3515
|
* 如果传 true 则会检查列顺序并排序
|
|
3516
3516
|
*/
|
|
3517
|
-
refreshColumn (
|
|
3518
|
-
if (
|
|
3517
|
+
refreshColumn (initOrder) {
|
|
3518
|
+
if (initOrder) {
|
|
3519
3519
|
const columnList = XEUtils.orderBy(internalData.collectColumn, 'renderSortNumber')
|
|
3520
3520
|
internalData.collectColumn = columnList
|
|
3521
3521
|
const tableFullColumn = getColumnList(columnList)
|
|
@@ -5027,7 +5027,7 @@ export default defineComponent({
|
|
|
5027
5027
|
// 如果按下了 F2 键
|
|
5028
5028
|
if (selected.row && selected.column) {
|
|
5029
5029
|
evnt.preventDefault()
|
|
5030
|
-
$xeTable.
|
|
5030
|
+
$xeTable.handleEdit(selected.args, evnt)
|
|
5031
5031
|
}
|
|
5032
5032
|
}
|
|
5033
5033
|
} else if (isContextMenu) {
|
|
@@ -5144,7 +5144,7 @@ export default defineComponent({
|
|
|
5144
5144
|
backMethod(params)
|
|
5145
5145
|
} else {
|
|
5146
5146
|
setCellValue(selected.row, selected.column, null)
|
|
5147
|
-
$xeTable.
|
|
5147
|
+
$xeTable.handleEdit(selected.args, evnt)
|
|
5148
5148
|
}
|
|
5149
5149
|
$xeTable.dispatchEvent('cell-backspace-value', params, evnt)
|
|
5150
5150
|
}
|
|
@@ -5188,7 +5188,7 @@ export default defineComponent({
|
|
|
5188
5188
|
editMethod(params)
|
|
5189
5189
|
} else {
|
|
5190
5190
|
setCellValue(selected.row, selected.column, null)
|
|
5191
|
-
$xeTable.
|
|
5191
|
+
$xeTable.handleEdit(selected.args, evnt)
|
|
5192
5192
|
}
|
|
5193
5193
|
const afterEditMethod = editOpts.afterEditMethod
|
|
5194
5194
|
if (afterEditMethod) {
|
|
@@ -5349,7 +5349,7 @@ export default defineComponent({
|
|
|
5349
5349
|
const el = refElem.value
|
|
5350
5350
|
if (el) {
|
|
5351
5351
|
const parentElem = el.parentNode as HTMLElement
|
|
5352
|
-
const parentPaddingSize = height === '
|
|
5352
|
+
const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0
|
|
5353
5353
|
return Math.floor($xeGrid ? $xeGrid.getParentHeight() : XEUtils.toNumber(getComputedStyle(parentElem).height) - parentPaddingSize)
|
|
5354
5354
|
}
|
|
5355
5355
|
return 0
|
|
@@ -6071,12 +6071,12 @@ export default defineComponent({
|
|
|
6071
6071
|
checkValidate('blur')
|
|
6072
6072
|
.catch((e) => e)
|
|
6073
6073
|
.then(() => {
|
|
6074
|
-
$xeTable.
|
|
6074
|
+
$xeTable.handleEdit(params, evnt)
|
|
6075
6075
|
.then(() => checkValidate('change'))
|
|
6076
6076
|
.catch((e) => e)
|
|
6077
6077
|
})
|
|
6078
6078
|
} else if (editOpts.mode === 'cell') {
|
|
6079
|
-
$xeTable.
|
|
6079
|
+
$xeTable.handleEdit(params, evnt)
|
|
6080
6080
|
.then(() => checkValidate('change'))
|
|
6081
6081
|
.catch((e) => e)
|
|
6082
6082
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { computed } from 'vue'
|
|
2
|
+
import XEUtils from 'xe-utils'
|
|
3
|
+
|
|
4
|
+
import type { VxeTableDefines, VxeGlobalRendererHandles } from '../../../../types'
|
|
5
|
+
|
|
6
|
+
export function useCellView <D = any, P = Record<string, any>> (props: {
|
|
7
|
+
renderOpts: VxeGlobalRendererHandles.RenderTableCellOptions | VxeGlobalRendererHandles.RenderTableEditOptions
|
|
8
|
+
renderParams: VxeGlobalRendererHandles.RenderTableCellParams | VxeGlobalRendererHandles.RenderTableEditParams
|
|
9
|
+
}) {
|
|
10
|
+
const currColumn = computed<VxeTableDefines.ColumnInfo<D>>(() => {
|
|
11
|
+
const { renderParams } = props
|
|
12
|
+
return renderParams.column
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const currRow = computed<D>(() => {
|
|
16
|
+
const { renderParams } = props
|
|
17
|
+
return renderParams.row
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const cellOptions = computed<P>(() => {
|
|
21
|
+
const { renderOpts } = props
|
|
22
|
+
return renderOpts.props as any || {}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const cellModel = computed({
|
|
26
|
+
get () {
|
|
27
|
+
const { renderParams } = props
|
|
28
|
+
const { row, column } = renderParams
|
|
29
|
+
return XEUtils.get(row, column.field)
|
|
30
|
+
},
|
|
31
|
+
set (value) {
|
|
32
|
+
const { renderParams } = props
|
|
33
|
+
const { row, column } = renderParams
|
|
34
|
+
return XEUtils.set(row, column.field, value)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
currColumn,
|
|
40
|
+
currRow,
|
|
41
|
+
cellModel,
|
|
42
|
+
cellOptions
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cell-view'
|
|
@@ -89,6 +89,9 @@
|
|
|
89
89
|
.vxe-default-textarea {
|
|
90
90
|
resize: none;
|
|
91
91
|
vertical-align: middle;
|
|
92
|
+
&:not([rows]) {
|
|
93
|
+
height: var(--vxe-ui-input-height-default);
|
|
94
|
+
}
|
|
92
95
|
}
|
|
93
96
|
& > .vxe-input,
|
|
94
97
|
& > .vxe-textarea,
|
|
@@ -1219,6 +1222,7 @@
|
|
|
1219
1222
|
/*暂无数据*/
|
|
1220
1223
|
.vxe-table--empty-placeholder,
|
|
1221
1224
|
.vxe-table--empty-block {
|
|
1225
|
+
color: var(--vxe-ui-input-placeholder-color);
|
|
1222
1226
|
min-height: var(--vxe-ui-table-row-height-default);
|
|
1223
1227
|
justify-content: center;
|
|
1224
1228
|
align-items: center;
|
|
@@ -1430,21 +1434,12 @@
|
|
|
1430
1434
|
border: 0;
|
|
1431
1435
|
padding: 0;
|
|
1432
1436
|
}
|
|
1433
|
-
.vxe-default-input {
|
|
1434
|
-
height: var(--vxe-ui-table-row-line-height);
|
|
1435
|
-
}
|
|
1436
1437
|
.vxe-input {
|
|
1437
1438
|
.vxe-input--inner {
|
|
1438
1439
|
border: 0;
|
|
1439
1440
|
padding-left: 0;
|
|
1440
1441
|
}
|
|
1441
1442
|
}
|
|
1442
|
-
.vxe-textarea {
|
|
1443
|
-
height: calc(var(--vxe-ui-table-row-line-height) - 1px);
|
|
1444
|
-
.vxe-textarea--inner {
|
|
1445
|
-
border: 0;
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
1443
|
}
|
|
1449
1444
|
}
|
|
1450
1445
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|