陈帅
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
3 deletions
-
src/defaultSettings.js
-
src/global.js
|
|
|
@ -10,7 +10,7 @@ module.exports = { |
|
|
|
disableLocal: false, |
|
|
|
}, |
|
|
|
title: 'Ant Design Pro', |
|
|
|
pwa: true, |
|
|
|
pwa: false, |
|
|
|
// Your custom iconfont Symbol script Url
|
|
|
|
// eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
|
|
|
|
// 注意:如果需要图标多色,Iconfont 图标项目里要进行批量去色处理
|
|
|
|
|
|
|
|
@ -3,8 +3,6 @@ import { notification, Button, message } from 'antd'; |
|
|
|
import { formatMessage } from 'umi-plugin-react/locale'; |
|
|
|
import defaultSettings from './defaultSettings'; |
|
|
|
|
|
|
|
window.React = React; |
|
|
|
|
|
|
|
const { pwa } = defaultSettings; |
|
|
|
// if pwa is true
|
|
|
|
if (pwa) { |
|
|
|
@ -58,4 +56,9 @@ if (pwa) { |
|
|
|
onClose: async () => {}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else if ('serviceWorker' in navigator) { |
|
|
|
// eslint-disable-next-line compat/compat
|
|
|
|
navigator.serviceWorker.ready.then(registration => { |
|
|
|
registration.unregister(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|