Procházet zdrojové kódy

fix 修复因 ts 导致的 build error

pull/3/head
yupi před 2 roky
rodič
revize
54070b5bd2
1 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. +5
    -2
      src/components/SearchableTree.vue

+ 5
- 2
src/components/SearchableTree.vue Zobrazit soubor

@@ -51,7 +51,7 @@
<script setup lang="ts">
import { ref, watch } from "vue";

const props = defineProps<{ tree: InvokeTree }>();
const props = defineProps<{ tree?: InvokeTree }>();

const tree = ref(props.tree);
if (!tree.value) {
@@ -101,10 +101,13 @@ const generateList = (data: InvokeTreeNode[], preKey: string) => {
generateList(tree.value, "");

watch(searchValue, (value) => {
if (!tree?.value) {
return;
}
expandedKeys.value = dataList
.map((item: InvokeTreeNode) => {
if (item.title.indexOf(value) > -1) {
return getParentKey(item.key, tree.value);
return getParentKey(item.key, tree.value as InvokeTree);
}
return null;
})


Načítá se…
Zrušit
Uložit