From 7b76945bff004e969bf409de1b7fed594a119b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=97=AD?= Date: Thu, 8 Jul 2021 23:20:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20perf=20TableAction.vue=E3=80=81build/u?= =?UTF-8?q?tils.ts=E3=80=81prettier.config.js=20(#868)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 优化 build 时 vite 模式判断 * perf: 优化 TableAction, 仅在 action.tooltip 存在的情况下 才使用 Tooltip 组件 * docs: 仅在 action.tooltip 存在的情况下 才使用 Tooltip 组件 * fix: 在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题 * docs: 修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题 --- CHANGELOG.zh_CN.md | 2 ++ build/utils.ts | 2 +- prettier.config.js | 2 +- .../Table/src/components/TableAction.vue | 22 ++++++++++--------- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index fb27e6e4..e5a67d9a 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -5,9 +5,11 @@ - 修复树形表格的带有展开图标的单元格的内容对齐问题 - 新增`headerTop`插槽 - **AppSearch** 修复可能会搜索隐藏菜单的问题 +- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件 - **其它** - 修复菜单默认折叠的配置不起作用的问题 - 修复`safari`浏览器报错导致网站打不开 + - 修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题 ### 🎫 Chores diff --git a/build/utils.ts b/build/utils.ts index 4a0ce500..f610363b 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -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; diff --git a/prettier.config.js b/prettier.config.js index 0c20bc90..b4e993ae 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -15,6 +15,6 @@ module.exports = { requirePragma: false, proseWrap: 'never', htmlWhitespaceSensitivity: 'strict', - endOfLine: 'lf', + endOfLine: 'auto', rangeStart: 0, }; diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue index 90ce43f1..ec4645fd 100644 --- a/src/components/Table/src/components/TableAction.vue +++ b/src/components/Table/src/components/TableAction.vue @@ -1,12 +1,16 @@