chore: 升级依赖,相关兼容处理(主要是typescriptvue-tsc升级最新版)

This commit is contained in:
xiaoxian521
2025-01-09 15:55:45 +08:00
parent 02380f69e1
commit e1cd14a946
4 changed files with 575 additions and 598 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { h, onMounted, ref, useSlots } from "vue";
import { type TippyOptions, useTippy } from "vue-tippy";
import { h, onMounted, ref } from "vue";
import { type TippyOptions, type TippyContent, useTippy } from "vue-tippy";
defineOptions({
name: "ReText"
@@ -17,7 +17,10 @@ const props = defineProps({
}
});
const $slots = useSlots();
const slots = defineSlots<{
content: () => TippyContent;
default: () => any;
}>();
const textRef = ref();
const tippyFunc = ref();
@@ -33,7 +36,7 @@ const isTextEllipsis = (el: HTMLElement) => {
};
const getTippyProps = () => ({
content: h($slots.content || $slots.default),
content: h(slots.content || slots.default),
...props.tippyProps
});