perf: 增强ReTypeit组件,支持插槽以及所有typeit配置项 (#922)

* perf: 增强typeit组件

* fix: update

* fix: delete invalid code
This commit is contained in:
一万
2024-02-21 13:31:05 +08:00
committed by GitHub
parent f6eaa8d6d8
commit f762587fa7
4 changed files with 72 additions and 46 deletions

View File

@@ -1,9 +1,13 @@
<script setup lang="ts">
import TypeIt from "@/components/ReTypeit";
import { TypeIt, type TypeItOptions } from "@/components/ReTypeit";
defineOptions({
name: "Typeit"
});
const options: TypeItOptions = {
strings: ["test1", "test2", "test3"]
};
</script>
<template>
@@ -13,6 +17,6 @@ defineOptions({
<span class="font-medium"> 打字机组件 </span>
</div>
</template>
<TypeIt :values="['test1', 'test2', 'test3']" />
<TypeIt :options="options" />
</el-card>
</template>