feat(ul): 顶部信息

This commit is contained in:
廖彦棋
2024-03-11 09:00:00 +08:00
parent 20915038a3
commit 14b277d813
3 changed files with 119 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
import { ref, type Ref } from "vue";
function useState<T>(defaultValue?: T): [Ref<T>, (newValue: T) => void] {
const state = ref<T>(defaultValue) as Ref<T>;
const setState = (newValue: T) => {
state.value = newValue;
};
return [state, setState];
}
export default useState;