前后端接口对接

This commit is contained in:
2025-09-22 17:44:31 +08:00
commit fb974f1100
44 changed files with 4801 additions and 0 deletions

33
src/utils/useDialog.ts Normal file
View File

@@ -0,0 +1,33 @@
import { ref } from 'vue';
/**
* Dialog控制Hook
* @returns visible显隐状态、show显示、hide隐藏、toggle切换
*/
export function useDialog(initialVisible:boolean = false): {
visible: import('vue').Ref<boolean>,
show: () => void,
hide: () => void,
toggle: () => void
} {
const visible = ref(initialVisible);
const show = () => {
visible.value = true;
};
const hide = () => {
visible.value = false;
};
const toggle = () => {
visible.value = !visible.value;
};
return {
visible,
show,
hide,
toggle
};
}