This commit is contained in:
2025-12-24 11:10:54 +08:00
parent e514536d1b
commit 75c9ea0c3c
2 changed files with 17 additions and 7 deletions

View File

@@ -53,15 +53,25 @@ export function useColumnCount(onChange = () => {}) {
onMounted(() => { onMounted(() => {
columnCount.value = 2 columnCount.value = 2
calcColumn() calcColumn()
try {
// if (process.client) { // if (process.client) {
window.addEventListener('resize', calcColumn) window.addEventListener('resize', calcColumn)
// } // }
} catch (error) {
}
}) })
onUnmounted(() => { onUnmounted(() => {
try {
// if (process.client) { // if (process.client) {
window.removeEventListener('resize', calcColumn) window.removeEventListener('resize', calcColumn)
// } // }
} catch (error) {
}
}) })
// 列数变化时执行回调 // 列数变化时执行回调

View File

@@ -28,7 +28,7 @@ import MyIcons from '@/components/My-icons/my-icons.vue';
import GlobalPopup from '@/components/GlobalPopup/GlobalPopup.vue' import GlobalPopup from '@/components/GlobalPopup/GlobalPopup.vue'
// import Tabbar from '@/components/tabbar/midell-box.vue' // import Tabbar from '@/components/tabbar/midell-box.vue'
// 自动导入 directives 目录下所有指令 // 自动导入 directives 目录下所有指令
console.log(lightAppJssdk)
const directives = import.meta.glob('./directives/*.js', { const directives = import.meta.glob('./directives/*.js', {
eager: true eager: true
}); });