mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-09 04:16:23 +08:00
21 lines
339 B
TypeScript
21 lines
339 B
TypeScript
import { reactive, toRefs } from "vue";
|
|
|
|
const searchManager = () => {
|
|
const state = reactive({
|
|
searchValue: "",
|
|
});
|
|
|
|
// search Input operation
|
|
const onSearch = (e) => {
|
|
const value = e.target.value;
|
|
state.searchValue = value;
|
|
};
|
|
|
|
return {
|
|
...toRefs(state),
|
|
onSearch,
|
|
};
|
|
};
|
|
|
|
export default searchManager;
|