'admin-20.12.24:更新element-plus为最新版本'

This commit is contained in:
lyt 2020-12-24 16:06:02 +08:00
parent 747e92f8e5
commit df677cf912
3 changed files with 11 additions and 14 deletions

View File

@ -1,5 +1,4 @@
import dotenv from 'dotenv';
export interface ViteEnv {
VITE_PORT: number;
VITE_OPEN: boolean;
@ -10,20 +9,12 @@ export function loadEnv(): ViteEnv {
const env = process.env.NODE_ENV;
const ret: any = {};
const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ,]
envList.forEach((e) => {
dotenv.config({
path: e,
});
});
envList.forEach((e) => { dotenv.config({ path: e }) });
for (const envName of Object.keys(process.env)) {
let realName = (process.env as any)[envName].replace(/\\n/g, '\n');
realName = realName === 'true' ? true : realName === 'false' ? false : realName;
if (envName === 'VITE_PORT') {
realName = Number(realName);
}
if (envName === 'VITE_OPEN') {
realName = Boolean(realName);
}
if (envName === 'VITE_PORT') realName = Number(realName);
if (envName === 'VITE_OPEN') realName = Boolean(realName);
ret[envName] = realName;
process.env[envName] = realName;
}

View File

@ -6,7 +6,7 @@
"build": "vite build"
},
"dependencies": {
"element-plus": "^1.0.1-beta.10",
"element-plus": "^v1.0.1-beta.14",
"vue": "^3.0.4"
},
"devDependencies": {

View File

@ -7,6 +7,12 @@
html,
body,
#app {
width: 100%;
margin: 0;
padding: 0;
height: 100%;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, SimSun, sans-serif;
font-weight: 400;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
}