chore: perf TableAction.vue、build/utils.ts、prettier.config.js (#868)

* perf: 优化 build 时 vite 模式判断

* perf: 优化 TableAction, 仅在 action.tooltip 存在的情况下 才使用 Tooltip 组件

* docs: 仅在 action.tooltip 存在的情况下 才使用 Tooltip 组件

* fix: 在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题

* docs: 修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
This commit is contained in:
周旭
2021-07-08 23:20:49 +08:00
committed by GitHub
parent 540423ecf7
commit 7b76945bff
4 changed files with 16 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
*/
function getConfFiles() {
const script = process.env.npm_lifecycle_script;
const reg = new RegExp('--mode ([a-z]+) ');
const reg = new RegExp('--mode ([a-z]+)');
const result = reg.exec(script as string) as any;
if (result) {
const mode = result[1] as string;