fix Bug or esLink formatting

This commit is contained in:
Ah jung
2021-07-22 13:47:44 +08:00
parent f6be8f521e
commit 7f81152793
172 changed files with 10553 additions and 9031 deletions

View File

@@ -1,23 +1,23 @@
import { ref, onMounted, onUnmounted } from 'vue'
import { debounce } from 'lodash'
import { ref, onMounted, onUnmounted } from 'vue';
import { debounce } from 'lodash';
/**
* description: 获取页面宽度
*/
export function useDomWidth() {
const domWidth = ref(window.innerWidth)
const domWidth = ref(window.innerWidth);
function resize() {
domWidth.value = document.body.clientWidth
}
function resize() {
domWidth.value = document.body.clientWidth;
}
onMounted(() => {
window.addEventListener('resize', debounce(resize, 80))
})
onUnmounted(() => {
window.removeEventListener('resize', resize)
})
onMounted(() => {
window.addEventListener('resize', debounce(resize, 80));
});
onUnmounted(() => {
window.removeEventListener('resize', resize);
});
return domWidth
return domWidth;
}