Initial commit

This commit is contained in:
南宁网宿科技
2024-04-24 16:36:46 +08:00
commit 121348e011
991 changed files with 158700 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* 监听屏幕尺寸改变封装
*/
import { watch } from 'vue';
import { storeToRefs } from 'pinia';
import { useThemeStore } from '@/store/modules/theme';
export function onSizeChange(hook: Function) {
if (!hook) {
return;
}
const themeStore = useThemeStore();
const { contentWidth } = storeToRefs(themeStore);
watch(contentWidth, () => {
hook();
});
}