docs: add some annotation

This commit is contained in:
xiaoxian521 2021-08-27 01:33:57 +08:00
parent a4d305868f
commit 3981c63e24
6 changed files with 17 additions and 11 deletions

View File

@ -82,6 +82,7 @@
</div>
</div>
<script>
// 此代码仅用于开发环境的友好提示项目打包前请去掉这段js代码 This code is only used as a friendly reminder of the development environment, please remove this js code before packaging the project
window.onload = function () {
(function () {
const ua = navigator.userAgent.toLowerCase();
@ -97,16 +98,18 @@
const el = document.querySelector("._develop");
if (browser && version >= 90) {
let success =
document.createTextNode("当前浏览器版本很适合开发!!! 😃");
el.appendChild(success);
} else {
let warn = document.createTextNode(
"当前浏览器版本不适合开发,建议使用最新版本的谷歌或者火狐浏览器!!!😯"
);
el.appendChild(warn);
el.style.color = "red";
if (el) {
if (browser && version >= 90) {
let success =
document.createTextNode("当前浏览器版本很适合开发!!! 😃");
el.appendChild(success);
} else {
let warn = document.createTextNode(
"当前浏览器版本不适合开发,建议使用最新版本的谷歌或者火狐浏览器!!!😯"
);
el.appendChild(warn);
el.style.color = "red";
}
}
return Sys;
})();

1
package-lock.json generated
View File

@ -65,6 +65,7 @@
"postcss": "^8.2.6",
"postcss-import": "^14.0.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"sass": "^1.38.0",
"sass-loader": "^12.1.0",
"typescript": "^4.2.4",

View File

@ -5,7 +5,7 @@
"scripts": {
"dev": "cross-env --max_old_space_size=4096 vite",
"serve": "cross-env --max_old_space_size=4096 vite",
"build": "cross-env vite build",
"build": "rimraf dist && cross-env vite build",
"preview": "vite preview",
"preview:build": "npm run build && vite preview",
"lint": "eslint --ext .js,.jsx,.vue,.ts,.tsx src",
@ -76,6 +76,7 @@
"postcss": "^8.2.6",
"postcss-import": "^14.0.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"sass": "^1.38.0",
"sass-loader": "^12.1.0",
"typescript": "^4.2.4",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

View File

@ -84,6 +84,7 @@ export default ({ command }: ConfigEnv): UserConfigExport => {
]
},
build: {
sourcemap: false,
brotliSize: false,
// 消除打包大小超过500kb警告
chunkSizeWarningLimit: 2000