fix(grid): [grid] fix panel flash in page (#1903)

This commit is contained in:
gimmyhehe 2024-08-16 14:24:11 +08:00 committed by GitHub
parent e271f5daa5
commit b5b6cb4789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 29 deletions

View File

@ -1,34 +1,34 @@
{
"name": "@opentiny/vue-grid",
"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-renderless": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-dropdown": "workspace:~",
"@opentiny/vue-dropdown-item": "workspace:~",
"@opentiny/vue-dropdown-menu": "workspace:~",
"@opentiny/vue-exception": "workspace:~",
"@opentiny/vue-pager": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-tooltip": "workspace:~",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-tag": "workspace:~",
"@opentiny/vue-loading": "workspace:~",
"@opentiny/vue-common": "workspace:~"
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-pager": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-tag": "workspace:~",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-tooltip": "workspace:~"
},
"license": "MIT"
}
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}

View File

@ -1,5 +1,4 @@
/* eslint-disable vue/no-mutating-props */
/* eslint-disable vue/no-use-computed-property-like-method */
/**
* MIT License
*
@ -289,20 +288,25 @@ export default defineComponent({
}
}
this.popperJS && this.popperJS.destroy() && (this.popperJS = null)
this.$nextTick(() => {
const { targetElemParentTr, id } = this.filterStore
const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`)
const popper = this.$el
if (this.popperJS) {
this.popperJS.destroy()
this.popperJS = null
}
if (this.visible) {
this.$nextTick(() => {
const { targetElemParentTr, id } = this.filterStore
const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`)
const popper = this.$el
popper.style.zIndex = PopupManager.nextZIndex()
popper.style.zIndex = PopupManager.nextZIndex()
if (this.visible) {
this.popperJS = new PopperJS(reference, popper, {
placement: 'bottom-end'
}).update()
}
})
placement: 'bottom-end',
gpuAcceleration: false
})
popper.style.display = 'block'
})
}
}),
// 基础清除选项
renderBase() {