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>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="TMSelect">
|
<script setup lang="ts" name="TMSelect">
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { getConfig } from './config';
|
import { getConfig } from './config';
|
||||||
|
|
||||||
@ -55,9 +55,19 @@ const visibleHandler = (...args: any[]) => {
|
|||||||
|
|
||||||
const scrollbarWrap = ref<HTMLDivElement | undefined>();
|
const scrollbarWrap = ref<HTMLDivElement | undefined>();
|
||||||
|
|
||||||
onMounted(() => {
|
const unWacth = watch(
|
||||||
scrollbarWrap.value = select.value?.scrollbar?.wrap$;
|
() => select.value?.scrollbar?.wrap$ || select.value?.scrollbar?.wrapRef,
|
||||||
});
|
(wrap) => {
|
||||||
|
if (!wrap) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scrollbarWrap.value = wrap;
|
||||||
|
unWacth();
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
scrollbarWrap,
|
scrollbarWrap,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user