From 746754401f3982de14a0481f4faa1de5dc55018b Mon Sep 17 00:00:00 2001 From: Gimmy <975402925@qq.com> Date: Tue, 15 Oct 2024 11:38:54 +0800 Subject: [PATCH 1/2] fix(grid): [grid] toolbar simple setting fix --- packages/vue/src/grid-toolbar/package.json | 62 +++++++++++----------- packages/vue/src/grid-toolbar/src/index.ts | 3 ++ 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/packages/vue/src/grid-toolbar/package.json b/packages/vue/src/grid-toolbar/package.json index 9e04f3227d..2470e9a2c9 100644 --- a/packages/vue/src/grid-toolbar/package.json +++ b/packages/vue/src/grid-toolbar/package.json @@ -1,50 +1,50 @@ { "name": "@opentiny/vue-grid-toolbar", - "version": "3.18.0", + "type": "module", + "version": "3.18.1", "description": "", + "license": "MIT", + "sideEffects": false, "main": "lib/index.js", "module": "index.ts", - "sideEffects": false, - "type": "module", - "devDependencies": { - "@opentiny-internal/vue-test-utils": "workspace:*", - "vitest": "^0.31.0" - }, "scripts": { "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-button": "workspace:~", - "@opentiny/vue-select": "workspace:~", - "@opentiny/vue-option": "workspace:~", - "@opentiny/vue-locale": "workspace:~", - "@opentiny/vue-modal": "workspace:~", - "@opentiny/vue-icon": "workspace:~", - "@opentiny/vue-grid": "workspace:~", - "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-layout": "workspace:~", - "@opentiny/vue-row": "workspace:~", - "@opentiny/vue-col": "workspace:~", "@opentiny/vue-alert": "workspace:~", - "@opentiny/vue-dialog-box": "workspace:~", - "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-split": "workspace:~", + "@opentiny/vue-button": "workspace:~", "@opentiny/vue-checkbox": "workspace:~", - "@opentiny/vue-radio": "workspace:~", "@opentiny/vue-checkbox-group": "workspace:~", - "@opentiny/vue-radio-group": "workspace:~", - "@opentiny/vue-search": "workspace:~", + "@opentiny/vue-col": "workspace:~", + "@opentiny/vue-common": "workspace:~", + "@opentiny/vue-dialog-box": "workspace:~", "@opentiny/vue-dropdown": "workspace:~", - "@opentiny/vue-dropdown-menu": "workspace:~", "@opentiny/vue-dropdown-item": "workspace:~", - "@opentiny/vue-tooltip": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-tabs": "workspace:~", - "@opentiny/vue-tab-item": "workspace:~", + "@opentiny/vue-dropdown-menu": "workspace:~", + "@opentiny/vue-grid": "workspace:~", + "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-input": "workspace:~", + "@opentiny/vue-layout": "workspace:~", + "@opentiny/vue-locale": "workspace:~", + "@opentiny/vue-modal": "workspace:~", + "@opentiny/vue-option": "workspace:~", "@opentiny/vue-popover": "workspace:~", + "@opentiny/vue-radio": "workspace:~", + "@opentiny/vue-radio-group": "workspace:~", + "@opentiny/vue-renderless": "workspace:~", + "@opentiny/vue-row": "workspace:~", + "@opentiny/vue-search": "workspace:~", + "@opentiny/vue-select": "workspace:~", + "@opentiny/vue-split": "workspace:~", + "@opentiny/vue-tab-item": "workspace:~", + "@opentiny/vue-tabs": "workspace:~", + "@opentiny/vue-theme": "workspace:~", + "@opentiny/vue-tooltip": "workspace:~", "@opentiny/vue-tree": "workspace:~" }, - "license": "MIT" -} \ No newline at end of file + "devDependencies": { + "@opentiny-internal/vue-test-utils": "workspace:*", + "vitest": "^0.31.0" + } +} diff --git a/packages/vue/src/grid-toolbar/src/index.ts b/packages/vue/src/grid-toolbar/src/index.ts index 73787586bb..4103b545b3 100644 --- a/packages/vue/src/grid-toolbar/src/index.ts +++ b/packages/vue/src/grid-toolbar/src/index.ts @@ -423,6 +423,9 @@ export default defineComponent({ custom && custom.updateSelectedTemplate(val) }, settingBtnClick() { + if (this.setting?.simple) { + return + } return this.setting && this.setting.customSetting ? this.setting.settingBtnClickFn() : this.handleClickCustomEvent() From d3e4eba771c61ce9df9817e133bf2ecbefb90609 Mon Sep 17 00:00:00 2001 From: Gimmy <975402925@qq.com> Date: Tue, 15 Oct 2024 15:35:10 +0800 Subject: [PATCH 2/2] fix(grid): [grid] toolbar simple setting not sync --- packages/vue/src/grid-toolbar/src/index.ts | 1 - packages/vue/src/grid/package.json | 2 +- packages/vue/src/grid/src/table/src/methods.ts | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/vue/src/grid-toolbar/src/index.ts b/packages/vue/src/grid-toolbar/src/index.ts index 4103b545b3..bdc65f2bd6 100644 --- a/packages/vue/src/grid-toolbar/src/index.ts +++ b/packages/vue/src/grid-toolbar/src/index.ts @@ -543,7 +543,6 @@ export default defineComponent({ }) } }, - // NEXT 未用到 updateColumn(fullColumn) { this.tableFullColumn = fullColumn }, diff --git a/packages/vue/src/grid/package.json b/packages/vue/src/grid/package.json index cdbc2d7a81..855df10be2 100644 --- a/packages/vue/src/grid/package.json +++ b/packages/vue/src/grid/package.json @@ -1,7 +1,7 @@ { "name": "@opentiny/vue-grid", "type": "module", - "version": "3.18.3", + "version": "3.18.4", "description": "", "license": "MIT", "sideEffects": false, diff --git a/packages/vue/src/grid/src/table/src/methods.ts b/packages/vue/src/grid/src/table/src/methods.ts index ede5071c95..a0500aa9ec 100644 --- a/packages/vue/src/grid/src/table/src/methods.ts +++ b/packages/vue/src/grid/src/table/src/methods.ts @@ -772,6 +772,12 @@ const Methods = { }) this.collectColumn = collectColumn } + + const toolbarVm = this.getVm('toolbar') + // 合并更新toolbar的Column配置 + if (toolbarVm) { + toolbarVm.updateColumn(fullColumn) + } this.$emit('update:customs', fullColumn) }, resetAll() {