|
@@ -0,0 +1,29 @@
|
|
1
|
+(function (doc, win) {
|
|
2
|
+ var docEl = doc.documentElement,
|
|
3
|
+ resizeEvt = 'onorientationchange' in window ? 'onorientationchange' : 'resize',
|
|
4
|
+ recalc = function () {
|
|
5
|
+ var clientWidth = docEl.clientWidth;
|
|
6
|
+ if (!clientWidth) return;
|
|
7
|
+ if (clientWidth < 1700) {
|
|
8
|
+ docEl.style.fontSize = '150px';
|
|
9
|
+ } else if ( 1700>=clientWidth>2000 ){
|
|
10
|
+ docEl.style.fontSize = '170px';
|
|
11
|
+ }else{
|
|
12
|
+ docEl.style.fontSize = '170px';
|
|
13
|
+ // docEl.style.fontSize = 100 * (clientWidth / 1400) + 'px';
|
|
14
|
+ }
|
|
15
|
+ };
|
|
16
|
+
|
|
17
|
+ if (!doc.addEventListener) return;
|
|
18
|
+ win.addEventListener(resizeEvt, recalc, false);
|
|
19
|
+ doc.addEventListener('DOMContentLoaded', recalc, false);
|
|
20
|
+})(document, window);
|
|
21
|
+
|
|
22
|
+export const dva = {
|
|
23
|
+ config: {
|
|
24
|
+ onError(e) {
|
|
25
|
+ e.preventDefault();
|
|
26
|
+ console.error(e);
|
|
27
|
+ },
|
|
28
|
+ },
|
|
29
|
+};
|