From db0bfc886314b193e7cb86a80b6c13b2743aa652 Mon Sep 17 00:00:00 2001 From: vben Date: Wed, 4 Nov 2020 21:39:06 +0800 Subject: [PATCH] fix(table): fix table type error --- .vscode/settings.json | 56 ++----------------------- CHANGELOG.zh_CN.md | 1 + src/components/Basic/src/BasicTitle.vue | 2 +- src/components/StrengthMeter/index.tsx | 1 + src/components/Table/src/BasicTable.vue | 2 +- src/utils/helper/vueHelper.ts | 9 +--- 6 files changed, 9 insertions(+), 62 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4dd8cce1..518b70fb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -136,6 +136,7 @@ "vetur.format.defaultFormatter.scss": "prettier", // 使用js-beautify-html格式化 "vetur.format.defaultFormatter.css": "prettier", // 使用js-beautify-html格式化 // "vetur.format.defaultFormatter.html": "prettyhtml", + "vetur.format.defaultFormatter.ts": "prettier-tslint", "vetur.format.defaultFormatter.js": "prettier", // "vetur.useWorkspaceDependencies": true, "vetur.format.defaultFormatterOptions": { @@ -150,22 +151,6 @@ "singleQuote": true // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号) } }, - // =========================================== - // ============= Material Icon Theme ========= - // =========================================== - "workbench.iconTheme": "material-icon-theme", // 主题色 - // =========================================== - // ============= stylus Supremacy ============ - // =========================================== - "stylusSupremacy.insertColons": false, // 是否插入冒号 - "stylusSupremacy.insertSemicolons": false, // 是否插入分号 - "stylusSupremacy.insertBraces": false, // 是否插入大括号 - //=========================================== - //============= koroFileHeaders =============== - //=========================================== - "fileheader.configObj": { - "autoAdd": false // 将该选项设置为true即可开启 - }, // 函数注释 //=========================================== //============= Code Runner ================= @@ -186,40 +171,7 @@ "prettier.requireConfig": true, "typescript.updateImportsOnFileMove.enabled": "always", "workbench.sideBar.location": "left", - "cSpell.enabledLanguageIds": [ - "asciidoc", - "c", - "cpp", - "csharp", - "css", - "git-commit", - "go", - "handlebars", - "haskell", - "html", - "jade", - "java", - "javascript", - "javascriptreact", - "json", - "jsonc", - "latex", - "less", - "markdown", - "php", - "plaintext", - "pug", - "python", - "restructuredtext", - "rust", - "scala", - "scss", - "text", - "typescript", - "typescriptreact", - "yaml", - "yml" - ], + "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, @@ -250,9 +202,7 @@ "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "cSpell.words": [ - "yfboilerplate" - ], + "editor.codeActionsOnSave": { "source.fixAll.eslint": true } diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 6c4940d2..a381952c 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -11,6 +11,7 @@ - 更新`ant-design-vue`版本为`beta13` - 更新`vite`版本为`rc.9` - 异常页调整 +- `BasicTitle` Color blocks are not displayed by default ### 🐛 Bug Fixes diff --git a/src/components/Basic/src/BasicTitle.vue b/src/components/Basic/src/BasicTitle.vue index 4a8573e1..8f4cec05 100644 --- a/src/components/Basic/src/BasicTitle.vue +++ b/src/components/Basic/src/BasicTitle.vue @@ -21,7 +21,7 @@ }, showSpan: { type: Boolean as PropType, - default: true, + default: false, }, }, setup() { diff --git a/src/components/StrengthMeter/index.tsx b/src/components/StrengthMeter/index.tsx index e444af62..46ca20c5 100644 --- a/src/components/StrengthMeter/index.tsx +++ b/src/components/StrengthMeter/index.tsx @@ -6,6 +6,7 @@ import { Input } from 'ant-design-vue'; import zxcvbn from 'zxcvbn'; import { extendSlots } from '/@/utils/helper/tsxHelper'; + import './index.less'; const prefixCls = 'strength-meter'; export default defineComponent({ diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue index 26c0e0c4..54e83a8b 100644 --- a/src/components/Table/src/BasicTable.vue +++ b/src/components/Table/src/BasicTable.vue @@ -219,7 +219,7 @@ pagination: PaginationProps, // @ts-ignore filters: Partial>, - sorter: SorterResult + sorter: SorterResult ) { const { clearSelectOnPageChange, sortFn } = unref(getMergeProps); if (clearSelectOnPageChange) { diff --git a/src/utils/helper/vueHelper.ts b/src/utils/helper/vueHelper.ts index 265e907c..347f548d 100644 --- a/src/utils/helper/vueHelper.ts +++ b/src/utils/helper/vueHelper.ts @@ -26,17 +26,12 @@ export function tryOnMounted(fn: () => void, sync = true) { } export function tryOnUnmounted(fn: () => Promise | void) { - if (getCurrentInstance()) { - onUnmounted(fn); - } + getCurrentInstance() && onUnmounted(fn); } export function tryTsxEmit(fn: (_instance: any) => Promise | void) { const instance = getCurrentInstance(); - - if (instance) { - fn.call(null, instance); - } + instance && fn.call(null, instance); } export function isInSetup() {