暂存
This commit is contained in:
@@ -53,15 +53,25 @@ export function useColumnCount(onChange = () => {}) {
|
||||
onMounted(() => {
|
||||
columnCount.value = 2
|
||||
calcColumn()
|
||||
// if (process.client) {
|
||||
window.addEventListener('resize', calcColumn)
|
||||
// }
|
||||
try {
|
||||
// if (process.client) {
|
||||
window.addEventListener('resize', calcColumn)
|
||||
// }
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
// if (process.client) {
|
||||
window.removeEventListener('resize', calcColumn)
|
||||
// }
|
||||
try {
|
||||
// if (process.client) {
|
||||
window.removeEventListener('resize', calcColumn)
|
||||
// }
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 列数变化时执行回调
|
||||
|
||||
Reference in New Issue
Block a user