Skip to content

Commit

Permalink
fix(grid): [grid] toolbar simple setting fix (#2268)
Browse files Browse the repository at this point in the history
* fix(grid): [grid] toolbar simple setting fix

* fix(grid): [grid] toolbar simple setting not sync
  • Loading branch information
gimmyhehe authored Oct 16, 2024
1 parent 4f9683f commit 7561208
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 33 deletions.
62 changes: 31 additions & 31 deletions packages/vue/src/grid-toolbar/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
4 changes: 3 additions & 1 deletion packages/vue/src/grid-toolbar/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -540,7 +543,6 @@ export default defineComponent({
})
}
},
// NEXT 未用到
updateColumn(fullColumn) {
this.tableFullColumn = fullColumn
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-grid",
"type": "module",
"version": "3.18.3",
"version": "3.18.4",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
6 changes: 6 additions & 0 deletions packages/vue/src/grid/src/table/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7561208

Please sign in to comment.