修改路径

This commit is contained in:
小海
2020-05-16 22:18:45 +08:00
parent abc792a561
commit 42177a7721
683 changed files with 92 additions and 18398 deletions

17
src/app/utils/util.ts Normal file
View File

@@ -0,0 +1,17 @@
class DataProperties {
static windowsMode: 'small' | 'middle' | 'large' = null;
}
export function windowWidthChange(func) {
DataProperties.windowsMode = window.innerWidth < 910 ? 'small' : (window.innerWidth > 1300 ? 'large' : 'middle');
// 监听宽度变化
window.addEventListener('resize', () => {
DataProperties.windowsMode = window.innerWidth < 910 ? 'small' : (window.innerWidth > 1300 ? 'large' : 'middle');
func();
});
}
export function windowsMode() {
return DataProperties.windowsMode;
}