From 81bd00bb334cd74fd0670749cd646661f73fc5e0 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Mon, 8 Jul 2024 15:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20title-prefix=20HTML=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/main.ts | 6 +++--- package.json | 4 ++-- packages/locale/lang/en-US.ts | 2 +- packages/locale/lang/es-ES.ts | 2 +- packages/locale/lang/ja-JP.ts | 2 +- packages/locale/lang/pt-BR.ts | 2 +- packages/locale/lang/zh-CN.ts | 2 +- packages/locale/lang/zh-TC.ts | 2 +- packages/table/src/table.ts | 20 +++++++++++--------- 9 files changed, 22 insertions(+), 20 deletions(-) diff --git a/examples/main.ts b/examples/main.ts index 861086cbaf..410cf8cb7e 100644 --- a/examples/main.ts +++ b/examples/main.ts @@ -2,8 +2,8 @@ import { createApp } from 'vue' import App from './App.vue' import router from './router' -import VxeUI from 'vxe-pc-ui' -import 'vxe-pc-ui/lib/style.css' +// import VxeUI from 'vxe-pc-ui' +// import 'vxe-pc-ui/lib/style.css' // import enUS from 'vxe-pc-ui/packages/language/en-US' @@ -16,6 +16,6 @@ import './style/index.scss' createApp(App) .use(router) - .use(VxeUI) + // .use(VxeUI) .use(VxeTable) .mount('#app') diff --git a/package.json b/package.json index ab360366c7..eba2e75a28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.7.45", + "version": "4.7.46", "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.0.49" + "vxe-pc-ui": "^4.0.50" }, "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 c497ea9afd..cede47e1d0 100644 --- a/packages/locale/lang/en-US.ts +++ b/packages/locale/lang/en-US.ts @@ -19,7 +19,7 @@ export default { useErr: 'Error installing "{0}" module, possibly in the wrong order, dependent modules need to be installed before Table.', barUnableLink: 'Toolbar cannot associate table.', expandContent: 'Expand row slot should be "content", please check if it is correct.', - reqComp: 'Require "{0}" component, check whether the install is correct', + reqComp: 'Require "{0}" component, check whether the install is correct. https://vxetable.cn/#/start/useGlobal', reqModule: 'require "{0}" module.', reqProp: 'Missing the necessary "{0}" parameter, which can cause error.', emptyProp: 'The property "{0}" is not allowed to be empty.', diff --git a/packages/locale/lang/es-ES.ts b/packages/locale/lang/es-ES.ts index 88cf855a55..406c743e5d 100644 --- a/packages/locale/lang/es-ES.ts +++ b/packages/locale/lang/es-ES.ts @@ -19,7 +19,7 @@ export default { useErr: 'Error al instalar el módulo "{0}", posiblemente en el orden equivocado, los módulos dependientes deben ser instalados antes de la tabla.', barUnableLink: 'La barra de herramientas no puede asociarse con la tabla.', expandContent: 'La ranura de fila expandible debería ser "contenido", por favor revise si está correcta.', - reqComp: 'Require "{0}" component, check whether the install is correct', + reqComp: 'Require "{0}" component, check whether the install is correct. https://vxetable.cn/#/start/useGlobal', reqModule: 'Requerir el módulo "{0}".', reqProp: 'Falta el parámetro necesario "{0}", lo que puede causar errores.', emptyProp: 'La propiedad "{0}" no se permite estar vacía.', diff --git a/packages/locale/lang/ja-JP.ts b/packages/locale/lang/ja-JP.ts index a833c7fa1b..f5470fe479 100644 --- a/packages/locale/lang/ja-JP.ts +++ b/packages/locale/lang/ja-JP.ts @@ -19,7 +19,7 @@ export default { useErr: '"{0}" モジュールをインストールする際にエラーが発生し、順序が正しくない可能性がある。依存するモジュールはTableの前にインストールする必要がある', barUnableLink: 'ツールバーはフォームを関連付けることができない', expandContent: '拡張行スロットは "content" である必要があります。確認してください', - reqComp: 'Require "{0}" component, check whether the install is correct', + reqComp: 'Require "{0}" component, check whether the install is correct. https://vxetable.cn/#/start/useGlobal', reqModule: '"{0}" モジュールが必要です', reqProp: '必要な "{0}" パラメーターが欠落しているため、エラーが発生する可能性があります', emptyProp: '"{0}" プロパティは空白が許可されていません', diff --git a/packages/locale/lang/pt-BR.ts b/packages/locale/lang/pt-BR.ts index b9b77e9acb..649b4feade 100644 --- a/packages/locale/lang/pt-BR.ts +++ b/packages/locale/lang/pt-BR.ts @@ -19,7 +19,7 @@ export default { useErr: 'Erro ao instalar o módulo "{0}", possivelmente na ordem errada, os módulos dependentes precisam ser instalados antes da Tabela.', barUnableLink: 'A barra de ferramentas não pode ser associada à tabela.', expandContent: 'O slot de linha expandida deve ser "content", verifique se está correto.', - reqComp: 'Require "{0}" component, check whether the install is correct', + reqComp: 'Require "{0}" component, check whether the install is correct. https://vxetable.cn/#/start/useGlobal', reqModule: 'requerir o módulo "{0}".', reqProp: 'Faltando o parâmetro necessário "{0}", o que pode causar um erro.', emptyProp: 'A propriedade "{0}" não pode estar vazia.', diff --git a/packages/locale/lang/zh-CN.ts b/packages/locale/lang/zh-CN.ts index a7cb5ca7b8..c743df258e 100644 --- a/packages/locale/lang/zh-CN.ts +++ b/packages/locale/lang/zh-CN.ts @@ -19,7 +19,7 @@ export default { useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装', barUnableLink: '工具栏无法关联表格', expandContent: '展开行的插槽应该是 "content",请检查是否正确', - reqComp: '缺少 "{0}" 组件,请检查是否正确安装', + reqComp: '缺少 "{0}" 组件,请检查是否正确安装 https://vxetable.cn/#/start/useGlobal', reqModule: '缺少 "{0}" 模块', reqProp: '缺少必要的 "{0}" 参数,这可能会导致出现错误', emptyProp: '参数 "{0}" 不允许为空', diff --git a/packages/locale/lang/zh-TC.ts b/packages/locale/lang/zh-TC.ts index 2130d056e3..b9c89b9796 100644 --- a/packages/locale/lang/zh-TC.ts +++ b/packages/locale/lang/zh-TC.ts @@ -19,7 +19,7 @@ export default { useErr: '安裝 "{0}" 模組時發生錯誤,可能順序不正確,依賴的模組需要在Table之前安裝', barUnableLink: '工具欄無法關聯表格', expandContent: '展開行的插槽應該是 “content”,請檢查是否正確', - reqComp: '缺少 "{0}" 組件,请检查是否正确安装', + reqComp: '缺少 "{0}" 組件,请检查是否正确安装 https://vxetable.cn/#/start/useGlobal', reqModule: '缺少 "{0}" 模組', reqProp: '缺少必要的 "{0}" 參數,可能會導致出現錯誤', emptyProp: '參數 "{0}" 不允許為空', diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index d90f36fd4a..bfb12d288d 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -203,7 +203,8 @@ export default defineComponent({ row: null, column: null, content: null, - visible: false + visible: false, + currOpts: {} }, // 存放数据校验相关信息 validStore: { @@ -3514,7 +3515,8 @@ export default defineComponent({ row: null, column: null, content: null, - visible: false + visible: false, + currOpts: {} }) if ($tooltip && $tooltip.close) { $tooltip.close() @@ -5218,7 +5220,8 @@ export default defineComponent({ Object.assign(tooltipStore, { row, column, - visible: true + visible: true, + currOpts: {} }) nextTick(() => { const $tooltip = refTooltip.value @@ -5781,7 +5784,7 @@ export default defineComponent({ tooltipStore.row = null tooltipStore.column = column tooltipStore.visible = true - // tooltipStore.currOpts = { content: null } + tooltipStore.currOpts = iconParams nextTick(() => { const $tooltip = refTooltip.value if ($tooltip && $tooltip.open) { @@ -6850,7 +6853,7 @@ export default defineComponent({ const renderVN = () => { const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props - const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, tableData, tableColumn, tableGroupColumn, footerTableData, initStore, columnStore, filterStore, customStore } = reactData + const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, tableData, tableColumn, tableGroupColumn, footerTableData, initStore, columnStore, filterStore, customStore, tooltipStore } = reactData const { leftList, rightList } = columnStore const loadingSlot = slots.loading const tipConfig = computeTipConfig.value @@ -7054,10 +7057,9 @@ export default defineComponent({ * 工具提示 */ VxeUITooltipComponent - ? h(VxeUITooltipComponent, { - ref: refTooltip, - ...tipConfig as any - }) + ? h(VxeUITooltipComponent, Object.assign({ + ref: refTooltip + }, tipConfig, tooltipStore.currOpts)) : createCommentVNode(), /** * 校验提示