From ed8900b39e58a0a3e22a2234ab9634764276e977 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Tue, 8 Oct 2024 11:22:52 +0800 Subject: [PATCH] releases 4.7.86 --- README.md | 7 +++---- index.ts | 6 ++++++ package.json | 4 ++-- packages/locale/lang/en-US.ts | 5 ++++- packages/table/module/export/import-panel.ts | 2 +- packages/table/src/table.ts | 6 +++--- types/all.d.ts | 1 + 7 files changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4a97501811..29441804be 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,15 @@ * 设计理念 * 面向现代浏览器,高效的简洁 API 设计 - * 模块化表格、按需加载 - * 为单行编辑表格而设计,支持增删改查及更多扩展,强大的功能的同时兼具性能 + * 按需加载 * 计划 * [x] ~~v1.0 基于 vue2.6,支持所有主流的浏览器,实现表格的一切实用的功能~~ * [x] ~~v2.0 基于 vue2.6,支持所有主流的浏览器,同时兼具功能与性能~~ * [x] v3.0 基于 vue2.6+,支持现代浏览器并保留兼容 IE11 - * [x] v3.9 基于 vue2.6+,重构拆分组件,分为 [Vxe table](https://github.com/x-extends/vxe-table) 和 [Vxe UI](https://github.com/x-extends/vxe-pc-ui),将支持可视化组件 + * [x] v3.9 基于 vue2.6+,内部重构,只支持现代浏览器,不支持 IE * [x] v4.0 基于 vue3.2+,只支持现代浏览器,不支持 IE - * [x] v4.7 基于 vue3.2+,重构拆分组件,分为 [Vxe table](https://github.com/x-extends/vxe-table) 和 [Vxe UI](https://github.com/x-extends/vxe-pc-ui),将支持可视化组件 + * [x] v4.7 基于 vue3.2+,内部重构,只支持现代浏览器,不支持 IE * [ ] 下一阶段:sticky 渲染模式、将虚拟滚动提升到极致、虚拟滚动动态行高、数据图表可视化 ## 浏览器支持 diff --git a/index.ts b/index.ts index 58ce288d26..43a6cb09b8 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,11 @@ import * as VxeTableExport from './packages/components' import './styles/all.scss' +if (typeof window !== 'undefined' && window.VXETable) { + if (!(window as any).VxeUITable) { + (window as any).VxeUITable = VxeTableExport + } +} + export * from './packages/components' export default VxeTableExport diff --git a/package.json b/package.json index 72f6296fbe..e182ea996c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.7.85", + "version": "4.7.86", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", @@ -28,7 +28,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "vxe-pc-ui": "^4.2.10" + "vxe-pc-ui": "^4.2.16" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/locale/lang/en-US.ts b/packages/locale/lang/en-US.ts index 9ba3ae313a..1ce5e592dd 100644 --- a/packages/locale/lang/en-US.ts +++ b/packages/locale/lang/en-US.ts @@ -89,7 +89,7 @@ export default { goto: 'Go to', gotoTitle: 'Number', pagesize: '{0}/page', - total: 'Total {0} record', + total: 'Total {0} records', pageClassifier: '', homePage: 'Home', homePageTitle: 'Home page', @@ -320,6 +320,9 @@ export default { fileTitle: 'Upload file' } }, + empty: { + defText: 'No Data' + }, formDesign: { formName: 'Form name', defFormTitle: 'Unnamed form', diff --git a/packages/table/module/export/import-panel.ts b/packages/table/module/export/import-panel.ts index fee99b371f..6af9a008c1 100644 --- a/packages/table/module/export/import-panel.ts +++ b/packages/table/module/export/import-panel.ts @@ -102,7 +102,7 @@ export default defineComponent({ modelValue: storeData.visible, title: getI18n('vxe.import.impTitle'), className: 'vxe-table-import-popup-wrapper', - width: 520, + width: 540, mask: true, lockView: true, showFooter: false, diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index b596bbe971..9246730f21 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -770,9 +770,9 @@ export default defineComponent({ } } } - return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(8, visibleSize) } + return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(6, visibleSize) } } - return { toVisibleIndex: 0, visibleSize: 8 } + return { toVisibleIndex: 0, visibleSize: 6 } } const computeVirtualY = () => { @@ -7179,7 +7179,7 @@ export default defineComponent({ resizeObserver = globalResize.create(handleOptimizeResize ? () => { if (props.autoResize) { - requestAnimationFrame(handleOptimizeResize) + handleOptimizeResize() } } : () => { diff --git a/types/all.d.ts b/types/all.d.ts index d938daa303..5ccfcc46e0 100644 --- a/types/all.d.ts +++ b/types/all.d.ts @@ -7,6 +7,7 @@ declare global { * @deprecated */ VXETable: VxeUIExport; + VxeUITable: VxeUIExport; } }