暂存
This commit is contained in:
@@ -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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 列数变化时执行回调
|
// 列数变化时执行回调
|
||||||
|
|||||||
2
main.js
2
main.js
@@ -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
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user