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