forked from opentiny/tiny-vue
fix(grid): [grid] fix panel flash in page (#1903)
This commit is contained in:
parent
e271f5daa5
commit
b5b6cb4789
|
@ -1,34 +1,34 @@
|
||||||
{
|
{
|
||||||
"name": "@opentiny/vue-grid",
|
"name": "@opentiny/vue-grid",
|
||||||
"version": "3.18.0",
|
"type": "module",
|
||||||
|
"version": "3.18.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
"license": "MIT",
|
||||||
|
"sideEffects": false,
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"sideEffects": false,
|
|
||||||
"type": "module",
|
|
||||||
"devDependencies": {
|
|
||||||
"@opentiny-internal/vue-test-utils": "workspace:*",
|
|
||||||
"vitest": "^0.31.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm -w build:ui $npm_package_name",
|
"build": "pnpm -w build:ui $npm_package_name",
|
||||||
"//postversion": "pnpm build"
|
"//postversion": "pnpm build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@opentiny/vue-renderless": "workspace:~",
|
"@opentiny/vue-common": "workspace:~",
|
||||||
"@opentiny/vue-locale": "workspace:~",
|
|
||||||
"@opentiny/vue-modal": "workspace:~",
|
|
||||||
"@opentiny/vue-dropdown": "workspace:~",
|
"@opentiny/vue-dropdown": "workspace:~",
|
||||||
"@opentiny/vue-dropdown-item": "workspace:~",
|
"@opentiny/vue-dropdown-item": "workspace:~",
|
||||||
"@opentiny/vue-dropdown-menu": "workspace:~",
|
"@opentiny/vue-dropdown-menu": "workspace:~",
|
||||||
"@opentiny/vue-exception": "workspace:~",
|
"@opentiny/vue-exception": "workspace:~",
|
||||||
"@opentiny/vue-pager": "workspace:~",
|
|
||||||
"@opentiny/vue-icon": "workspace:~",
|
"@opentiny/vue-icon": "workspace:~",
|
||||||
"@opentiny/vue-tooltip": "workspace:~",
|
|
||||||
"@opentiny/vue-theme": "workspace:~",
|
|
||||||
"@opentiny/vue-tag": "workspace:~",
|
|
||||||
"@opentiny/vue-loading": "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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
/* eslint-disable vue/no-use-computed-property-like-method */
|
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* MIT License
|
||||||
*
|
*
|
||||||
|
@ -289,20 +288,25 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.popperJS && this.popperJS.destroy() && (this.popperJS = null)
|
if (this.popperJS) {
|
||||||
this.$nextTick(() => {
|
this.popperJS.destroy()
|
||||||
const { targetElemParentTr, id } = this.filterStore
|
this.popperJS = null
|
||||||
const reference = targetElemParentTr && targetElemParentTr.querySelector(`svg.tiny-grid-filter__btn.${id}`)
|
}
|
||||||
const popper = this.$el
|
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, {
|
this.popperJS = new PopperJS(reference, popper, {
|
||||||
placement: 'bottom-end'
|
placement: 'bottom-end',
|
||||||
}).update()
|
gpuAcceleration: false
|
||||||
}
|
})
|
||||||
})
|
popper.style.display = 'block'
|
||||||
|
})
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
// 基础清除选项
|
// 基础清除选项
|
||||||
renderBase() {
|
renderBase() {
|
||||||
|
|
Loading…
Reference in New Issue