update docs

This commit is contained in:
Harvey Zack committed 2023-05-13 21:57:45 +08:00
1 parent 84c84e4cda
commit e3e42eb399
115 files changed
+279 -598

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import { throttle } from '../utils';
import { debounce } from '../utils';
export default function resizeInit(art, events) {
const { option, constructor } = art;
@@ -12,7 +12,7 @@ export default function resizeInit(art, events) {
notice.show = '';
});
const resizeFn = throttle(() => art.emit('resize'), constructor.RESIZE_TIME);
const resizeFn = debounce(() => art.emit('resize'), constructor.RESIZE_TIME);
events.proxy(window, ['orientationchange', 'resize'], () => resizeFn());
if (screen && screen.orientation && screen.orientation.onchange) {
events.proxy(screen.orientation, 'change', () => resizeFn());