mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-04 15:19:18 +08:00
fix(editor): floating-box高度无法改变
This commit is contained in:
parent
3af247febb
commit
872c978b9b
@ -1,4 +1,4 @@
|
|||||||
import { computed, inject, ref, watchEffect } from 'vue';
|
import { computed, inject, ref, watch } from 'vue';
|
||||||
|
|
||||||
import type { Services } from '@editor/type';
|
import type { Services } from '@editor/type';
|
||||||
|
|
||||||
@ -9,10 +9,16 @@ export const useEditorContentHeight = () => {
|
|||||||
const editorContentHeight = computed(() => frameworkHeight.value - navMenuHeight.value);
|
const editorContentHeight = computed(() => frameworkHeight.value - navMenuHeight.value);
|
||||||
|
|
||||||
const height = ref(0);
|
const height = ref(0);
|
||||||
watchEffect(() => {
|
watch(
|
||||||
|
editorContentHeight,
|
||||||
|
() => {
|
||||||
if (height.value > 0 && height.value === editorContentHeight.value) return;
|
if (height.value > 0 && height.value === editorContentHeight.value) return;
|
||||||
height.value = editorContentHeight.value;
|
height.value = editorContentHeight.value;
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
height,
|
height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user