# hz-admin-vite **Repository Path**: mayday97/hz-admin-vite ## Basic Information - **Project Name**: hz-admin-vite - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-18 - **Last Updated**: 2021-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 1.配置使用 @ 在 vite.config.ts中配置 import path from "path"; resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, ### 2.使用环境变量 .env 中以VITE_APP开头 使用以import.meta.env.VITE_APP ### 3.element 引入国际化 **此bug element已经在 1.0.2-beta.59(包含59)版本更新修改 使用方法详见 官方文档 import lang from 'element-plus/lib/locale/lang/zh-cn' import 'dayjs/locale/zh-cn' // 设置语言 // locale(lang) console.log(locale); 在开发环境中 locale 为一个函数,但是在生产环境中 却为一个对象 对象中含use 函数 详见 https://github.com/element-plus/element-plus/issues/2374 ### 4.安装eslint+prettier cnpm install eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-plugin-vue @typescript-eslint/parser @typescript-eslint/eslint-plugin -D