diff --git a/feature/src/languages/langs/en-US.ts b/feature/src/languages/langs/en-US.ts index 6c162a4..b897399 100644 --- a/feature/src/languages/langs/en-US.ts +++ b/feature/src/languages/langs/en-US.ts @@ -4,6 +4,7 @@ export default { market: { title: 'Market', search: 'Search Plugins', + searchResult: 'Search Results', explore: 'Explore', efficiency: 'Efficiency', searchTool: 'Search Tools', diff --git a/feature/src/languages/langs/zh-CN.ts b/feature/src/languages/langs/zh-CN.ts index af81a1f..82c238e 100644 --- a/feature/src/languages/langs/zh-CN.ts +++ b/feature/src/languages/langs/zh-CN.ts @@ -4,6 +4,7 @@ export default { market: { title: '插件市场', search: '搜索插件', + searchResult: '搜索结果', explore: '探索', efficiency: '效率', searchTool: '搜索工具', diff --git a/feature/src/store/index.ts b/feature/src/store/index.ts index 71adf6d..2d4e079 100644 --- a/feature/src/store/index.ts +++ b/feature/src/store/index.ts @@ -16,6 +16,7 @@ export default createStore({ state: { totalPlugins: [], localPlugins: [], + searchValue: '', }, mutations: { commonUpdate(state: any, payload) { @@ -23,6 +24,9 @@ export default createStore({ state[key] = payload[key]; }); }, + setSearchValue(state: any, payload) { + state.searchValue = payload; + }, }, actions: { async init({ commit }) { diff --git a/feature/src/views/market/components/result.vue b/feature/src/views/market/components/result.vue new file mode 100644 index 0000000..6a296f3 --- /dev/null +++ b/feature/src/views/market/components/result.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/feature/src/views/market/index.vue b/feature/src/views/market/index.vue index 8d15fd3..91d2f1b 100644 --- a/feature/src/views/market/index.vue +++ b/feature/src/views/market/index.vue @@ -73,6 +73,7 @@ import Worker from './components/worker.vue'; import Tools from './components/tools.vue'; import Dev from './components/devlopment.vue'; import Image from './components/image.vue'; +import Result from './components/result.vue'; const Components = { finder: Finder, @@ -81,6 +82,7 @@ const Components = { image: Image, tools: Tools, dev: Dev, + result: Result, }; const state = reactive({ @@ -93,6 +95,11 @@ const store = useStore(); const totalPlugins = computed(() => store.state.totalPlugins); const { searchValue, current } = toRefs(state); + +const onSearch = (searchValue: string) => { + state.current = ['result']; + store.commit('setSearchValue', searchValue); +};