feat: add message float components

This commit is contained in:
Tim
2025-08-25 17:12:21 +08:00
parent 0ee58df868
commit b0eef220a6
5 changed files with 162 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
export const useMessageFloat = () =>
useState<{ open: boolean; path: string }>('message-float', () => ({
open: false,
path: '/message-box',
}))
export const openMessageFloat = (path: string) => {
const state = useMessageFloat()
state.value.open = true
state.value.path = path
}
export const closeMessageFloat = () => {
const state = useMessageFloat()
state.value.open = false
}