Files
AlgerMusicPlayer/src/renderer/store/modules/search.ts
T

23 lines
439 B
TypeScript
Raw Normal View History

2025-03-19 22:48:28 +08:00
import { defineStore } from 'pinia';
import { ref } from 'vue';
export const useSearchStore = defineStore('search', () => {
const searchValue = ref('');
const searchType = ref(1);
const setSearchValue = (value: string) => {
searchValue.value = value;
};
const setSearchType = (type: number) => {
searchType.value = type;
};
return {
searchValue,
searchType,
setSearchValue,
setSearchType
};
});