diff --git a/src/layout/adder/AdderPage.tsx b/src/layout/adder/AdderPage.tsx index 4e22815..e2b3302 100644 --- a/src/layout/adder/AdderPage.tsx +++ b/src/layout/adder/AdderPage.tsx @@ -81,6 +81,7 @@ export default defineComponent(() => { const isGame = computed(() => layout.state.current === 0) const store = useAdderPageStore() const addTo = ref(layout.state.currentPage) + provide(AddToToken, addTo) onUnmounted(() => { store.type = 1 @@ -145,7 +146,27 @@ export default defineComponent(() => { /> - + { + if (store.type === 1) { + store.search(e) + } else if (store.type === 0) { + store.widgetSearchWords = e + } else if (store.type === 3) { + store.gameSearch = e + } + }} + class="w-[220px]" + placeholder={ + store.type === 0 + ? '搜索想要添加的组件' + : store.type === 1 + ? '搜索想要添加的网址导航' + : store.type === 2 + ? '' + : '搜索想要添加的游戏' + } + />