mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(design): element-plus@2.2.22开始scrollbar.wrap$改成wrapRef
This commit is contained in:
parent
174695b94c
commit
62038c8c60
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="TMSelect">
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
|
||||
import { getConfig } from './config';
|
||||
|
||||
@ -55,9 +55,19 @@ const visibleHandler = (...args: any[]) => {
|
||||
|
||||
const scrollbarWrap = ref<HTMLDivElement | undefined>();
|
||||
|
||||
onMounted(() => {
|
||||
scrollbarWrap.value = select.value?.scrollbar?.wrap$;
|
||||
});
|
||||
const unWacth = watch(
|
||||
() => select.value?.scrollbar?.wrap$ || select.value?.scrollbar?.wrapRef,
|
||||
(wrap) => {
|
||||
if (!wrap) {
|
||||
return;
|
||||
}
|
||||
scrollbarWrap.value = wrap;
|
||||
unWacth();
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
scrollbarWrap,
|
||||
|
Loading…
x
Reference in New Issue
Block a user