Skip to content

Commit

Permalink
releases 4.9.20
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 10, 2024
1 parent 1f6419f commit 3554208
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* [x] ~~v1.0 基于 vue2.6,支持所有主流的浏览器,实现表格的一切实用的功能~~
* [x] ~~v2.0 基于 vue2.6,支持所有主流的浏览器,同时兼具功能与性能~~
* [x] ~~v3.0 基于 vue2.6+,支持现代浏览器并保留兼容 IE11~~
* [x] v3.9+ 基于 vue2.6+,内部重构,只支持现代浏览器,不支持 IE
* [x] v3.9+ 基于 vue2.6+,内部重构,拆分 Table 库和 UI 库,只支持现代浏览器,不支持 IE
* [x] ~~v4.0 基于 vue3.2+,只支持现代浏览器,不支持 IE~~
* [x] v4.7+ 基于 vue3.2+,内部重构,只支持现代浏览器,不支持 IE
* [x] v4.7+ 基于 vue3.2+,内部重构,拆分 Table 库和 UI 库,只支持现代浏览器,不支持 IE
* [ ] 下一阶段:sticky 渲染模式、将虚拟滚动提升到极致、虚拟表单、数据图表可视化

## 浏览器支持
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.9.19",
"version": "4.9.20",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.3.22"
"vxe-pc-ui": "^4.3.24"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/ar-EG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
4 changes: 2 additions & 2 deletions packages/locale/lang/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export default {
notExp: 'El navegador no es compatible con la importación / exportación.',
impFields: 'Error de importación, por favor revise que el nombre del campo y el formato de datos sean correctos.',
treeNotImp: 'La tabla de árbol no soporta importación.',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeCrossDrag: 'Only the first level of data can be dragged',
treeDragChild: 'Parent data cannot be dragged into its own child',
reqPlugin: 'Optional extension "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/hu-HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: 'Az importálás nem sikerült, ellenőrizze, hogy a mezőnév és az adatformátum helyes-e',
treeNotImp: 'A fatáblák nem támogatják az importálást',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/hy-AM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/ja-JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: 'インポートに失敗しました。フィールド名とデータ形式を確認してください',
treeNotImp: 'ツリーテーブルはインポートをサポートしていません',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/nb-NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: 'Falha na importação, verifique se o nome do campo e o formato dos dados estão corretos.',
treeNotImp: 'A tabela de árvore não suporta importação.',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: 'Не удалось выполнить импорт. Проверьте правильность имени поля и формата данных.',
treeNotImp: 'Древовидные таблицы не поддерживают импорт.',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/ug-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: 'ئەكىرىشى مەغلۇپ بولدى،سۆز ھەم ئۇچۇر فورماتىنى تەكشۈرۈڭ',
treeNotImp: 'دەرەخ شەكىللىك جەدىۋەلنى ئەكىرىشنى قوللىمايدۇ',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/uk-UA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/vi-VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/zh-CHT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '匯入失敗,請檢查欄位名稱和資料格式是否正確',
treeNotImp: '樹表格不支援導入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可選擴展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
2 changes: 1 addition & 1 deletion packages/locale/lang/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
impFields: '导入失败,请检查字段名和数据格式是否正确',
treeNotImp: '树表格不支持导入',
treeCrossDrag: '只能拖拽第一层级的数据',
treeDragChild: '父级数据不能拖拽到子级中',
treeDragChild: '父级数据不能拖拽到自己的子级中',
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
},
table: {
Expand Down
29 changes: 24 additions & 5 deletions packages/table/render/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,17 +606,36 @@ renderer.mixin({
renderTableCell (renderOpts, params) {
const { props = {} } = renderOpts
const { row, column } = params
const digits = props.digits || getConfig().numberInput?.digits || 2
const { type } = props
let cellValue = XEUtils.get(row, column.field)
if (cellValue) {
switch (props.type) {
case 'float':
cellValue = XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
break
if (type === 'float') {
const digits = props.digits || getConfig().numberInput.digits || 1
cellValue = XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
} else if (type === 'amount') {
const digits = props.digits || getConfig().numberInput.digits || 2
cellValue = XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
}
}
return getCellLabelVNs(renderOpts, params, cellValue)
},
renderTableFooter (renderOpts, params) {
const { props = {} } = renderOpts
const { row, column, _columnIndex } = params
const { type } = props
// 兼容老模式
const cellValue = XEUtils.isArray(row) ? row[_columnIndex] : XEUtils.get(row, column.field)
if (XEUtils.isNumber(cellValue)) {
if (type === 'float') {
const digits = props.digits || getConfig().numberInput.digits || 1
return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
} else if (type === 'amount') {
const digits = props.digits || getConfig().numberInput.digits || 2
return XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
}
}
return getFuncText(cellValue, 1)
},
renderTableDefault: defaultEditRender,
renderTableFilter: defaultFilterRender,
tableFilterDefaultMethod: handleInputFilterMethod
Expand Down
11 changes: 7 additions & 4 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6215,6 +6215,9 @@ export default defineComponent({
cacheItem = { row, rowid, seq, index: -1, _index: -1, $index: -1, items, parent, level, height: 0 }
}
if (isSource) {
cacheItem.row = row
cacheItem.items = items
cacheItem.parent = parent
cacheItem.level = level
cacheItem.index = treeConfig && parent ? -1 : index
fullDataRowIdMaps[rowid] = cacheItem
Expand Down Expand Up @@ -6995,17 +6998,17 @@ export default defineComponent({
}
},
triggerCurrentColumnEvent (evnt, params) {
const columnOpts = computeColumnOpts
const { currentMethod } = columnOpts.value
const columnOpts = computeColumnOpts.value
const { currentMethod } = columnOpts
const { column } = params
if (!currentMethod || currentMethod({ column })) {
tableMethods.setCurrentColumn(column)
}
},
triggerCurrentRowEvent (evnt, params) {
const { currentRow: oldValue } = reactData
const rowOpts = computeRowOpts
const { currentMethod } = rowOpts.value
const rowOpts = computeRowOpts.value
const { currentMethod } = rowOpts
const { row: newValue } = params
const isChange = oldValue !== newValue
if (!currentMethod || currentMethod({ row: newValue })) {
Expand Down

0 comments on commit 3554208

Please sign in to comment.