mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-02 12:59:47 +08:00
fix(form): table全屏后zindex问题
This commit is contained in:
parent
81e3d0a18e
commit
aa601f8703
@ -202,6 +202,7 @@ import {
|
||||
TMagicTableColumn,
|
||||
TMagicTooltip,
|
||||
TMagicUpload,
|
||||
useZIndex,
|
||||
} from '@tmagic/design';
|
||||
import { asyncLoadJs, sleep } from '@tmagic/utils';
|
||||
|
||||
@ -246,6 +247,8 @@ const emit = defineEmits(['change', 'select', 'addDiffCount']);
|
||||
let timer: any | null = null;
|
||||
const mForm = inject<FormState | undefined>('mForm');
|
||||
|
||||
const { nextZIndex } = useZIndex();
|
||||
|
||||
const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
||||
const excelBtn = ref<InstanceType<typeof TMagicUpload>>();
|
||||
const mTable = ref<HTMLDivElement>();
|
||||
@ -620,11 +623,14 @@ const toggleMode = () => {
|
||||
};
|
||||
|
||||
const toggleFullscreen = () => {
|
||||
if (!mTable.value) return;
|
||||
|
||||
if (isFullscreen.value) {
|
||||
mTable.value?.classList.remove('fixed');
|
||||
mTable.value.classList.remove('fixed');
|
||||
isFullscreen.value = false;
|
||||
} else {
|
||||
mTable.value?.classList.add('fixed');
|
||||
mTable.value.classList.add('fixed');
|
||||
mTable.value.style.zIndex = `${nextZIndex()}`;
|
||||
isFullscreen.value = true;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user