perf: perf context menu

This commit is contained in:
vben
2020-11-25 21:06:00 +08:00
parent 41d79008c5
commit 6e03e05032
16 changed files with 205 additions and 176 deletions

View File

@@ -22,7 +22,7 @@ export default defineComponent({
setup(props, { slots, emit, attrs }) {
const visibleRef = ref(false);
const propsRef = ref<Partial<ModalProps> | null>(null);
const modalWrapperRef = ref<any>(null);
const modalWrapperRef = ref<ComponentRef>(null);
// modal Bottom and top height
const extHeightRef = ref(0);
// Unexpanded height of the popup

View File

@@ -55,7 +55,7 @@ export default defineComponent({
emits: ['heightChange', 'getExtHeight'],
setup(props: ModalWrapperProps, { slots, emit }) {
const wrapperRef = ref<HTMLElement | null>(null);
const spinRef = ref<any>(null);
const spinRef = ref<ComponentRef>(null);
const realHeightRef = ref(0);
// 重试次数
// let tryCount = 0;
@@ -126,6 +126,8 @@ export default defineComponent({
await nextTick();
const spinEl = unref(spinRef);
if (!spinEl) return;
const spinContainerEl = spinEl.$el.querySelector('.ant-spin-container') as HTMLElement;
if (!spinContainerEl) return;