知与行后台管理端

1234567891011121314151617181920212223242526272829
  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. if (!doc.addEventListener) return;
  17. win.addEventListener(resizeEvt, recalc, false);
  18. doc.addEventListener('DOMContentLoaded', recalc, false);
  19. })(document, window);
  20. export const dva = {
  21. config: {
  22. onError(e) {
  23. e.preventDefault();
  24. console.error(e);
  25. },
  26. },
  27. };