From 2ce3f44403a37f734cf0d689edefb33ab847a0b5 Mon Sep 17 00:00:00 2001 From: gitplus Date: Tue, 14 Sep 2021 22:09:24 +0800 Subject: [PATCH 1/6] fix(tag): prefixCls value (#4649) --- components/tag/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tag/index.tsx b/components/tag/index.tsx index 65dba5162..965d499d1 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -86,11 +86,11 @@ const Tag = defineComponent({ const renderCloseIcon = () => { if (closable) { return closeIcon ? ( -
+
{closeIcon}
) : ( - + ); } return null; From 3b8b19ea8c16b8fe76bfcd59c29f106b28fcb43f Mon Sep 17 00:00:00 2001 From: ajuner <106791576@qq.com> Date: Wed, 15 Sep 2021 13:31:59 +0800 Subject: [PATCH 2/6] fix: tree-select clear button render (#4655) --- components/vc-tree-select/src/Base/BaseSelector.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-tree-select/src/Base/BaseSelector.jsx b/components/vc-tree-select/src/Base/BaseSelector.jsx index fa3a899e4..97b9ddb66 100644 --- a/components/vc-tree-select/src/Base/BaseSelector.jsx +++ b/components/vc-tree-select/src/Base/BaseSelector.jsx @@ -99,7 +99,7 @@ export default function () { vcTreeSelect: { onSelectorClear }, } = this; - if (!allowClear || !selectorValueList.length || !selectorValueList[0].value) { + if (!allowClear || !selectorValueList.length) { return null; } const clearIcon = getComponent(this, 'clearIcon'); From 27b258c29be8dff20f0b34868cd6db7f173e2a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A1=E5=B1=B1=E7=94=B5=E8=BD=A6?= Date: Wed, 15 Sep 2021 15:14:46 +0800 Subject: [PATCH 3/6] fix(useForm): immdiate validate doesn't work (#4646) --- components/form/useForm.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/form/useForm.ts b/components/form/useForm.ts index 75983d5ea..a6ebaa99a 100644 --- a/components/form/useForm.ts +++ b/components/form/useForm.ts @@ -332,16 +332,20 @@ function useForm( return info; }; let oldModel = initialModel; + let isFirstTime = true; const modelFn = (model: { [x: string]: any }) => { const names = []; rulesKeys.value.forEach(key => { const prop = getPropByPath(model, key, false); const oldProp = getPropByPath(oldModel, key, false); - if (!isEqual(prop.v, oldProp.v)) { + const isFirstValidation = isFirstTime && options?.immediate && prop.isValid; + + if (isFirstValidation || !isEqual(prop.v, oldProp.v)) { names.push(key); } }); validate(names, { trigger: 'change' }); + isFirstTime = false; oldModel = cloneDeep(model); }; From 7236fc253b26dbd3f393f7e34781fd4c76c69936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=9D=92=E5=B7=9D?= <46062972+ShenQingchuan@users.noreply.github.com> Date: Fri, 17 Sep 2021 16:13:26 +0800 Subject: [PATCH 4/6] fix: ModalFuncProps types which can be string text (#4664) --- components/modal/Modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 09dbca361..3036d159b 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -95,9 +95,9 @@ export interface ModalFuncProps { prefixCls?: string; class?: string; visible?: boolean; - title?: (() => VNodeTypes) | VNodeTypes; + title?: string | (() => VNodeTypes) | VNodeTypes; closable?: boolean; - content?: (() => VNodeTypes) | VNodeTypes; + content?: string | (() => VNodeTypes) | VNodeTypes; // TODO: find out exact types onOk?: (...args: any[]) => any; onCancel?: (...args: any[]) => any; @@ -105,9 +105,9 @@ export interface ModalFuncProps { cancelButtonProps?: ButtonPropsType; centered?: boolean; width?: string | number; - okText?: (() => VNodeTypes) | VNodeTypes; + okText?: string | (() => VNodeTypes) | VNodeTypes; okType?: LegacyButtonType; - cancelText?: (() => VNodeTypes) | VNodeTypes; + cancelText?: string | (() => VNodeTypes) | VNodeTypes; icon?: (() => VNodeTypes) | VNodeTypes; /* Deprecated */ iconType?: string; From 5d990afe2721a983daa29e8ef10051530c114a5a Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 17 Sep 2021 16:45:02 +0800 Subject: [PATCH 5/6] release 2.2.8 --- CHANGELOG.en-US.md | 12 ++++++++++++ CHANGELOG.zh-CN.md | 12 ++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index ef12a42d1..6ccf6ed5a 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -10,6 +10,18 @@ --- +## 2.2.8 + +`2021-09-17` + +- 🌟 Upload method supports patch [#4637](https://github.com/vueComponent/ant-design-vue/issues/4637) +- 🌟 List gutter supports array [d2b721](https://github.com/vueComponent/ant-design-vue/commit/d2b72143f0e15c8716b4ea8f68b2b72eff5cf510) +- 🐞 Fix Modal type error [#4632](https://github.com/vueComponent/ant-design-vue/issues/4632) +- 🐞 Fix the problem that AutoComplete cannot reset undefined [741718](https://github.com/vueComponent/ant-design-vue/commit/741718a0f92c790266e7a07d8d129c5673344a7e) +- 🐞 Fix the missing style of Tag closed icon [#4649](https://github.com/vueComponent/ant-design-vue/issues/4649) +- 🐞 Fix the problem that the TreeSelect clear button does not display under special conditions [#4655](https://github.com/vueComponent/ant-design-vue/issues/4655) +- 🐞 Fix useForm immdiate not working issue [#4646](https://github.com/vueComponent/ant-design-vue/issues/4646) + ## 2.2.7 `2021-09-08` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index eed3d5a58..4e37097b1 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -10,6 +10,18 @@ --- +## 2.2.8 + +`2021-09-17` + +- 🌟 Upload method 支持 patch [#4637](https://github.com/vueComponent/ant-design-vue/issues/4637) +- 🌟 List gutter 支持数组 [d2b721](https://github.com/vueComponent/ant-design-vue/commit/d2b72143f0e15c8716b4ea8f68b2b72eff5cf510) +- 🐞 修复 Modal 类型错误 [#4632](https://github.com/vueComponent/ant-design-vue/issues/4632) +- 🐞 修复 AutoComplete 无法重置 undefined 问题 [741718](https://github.com/vueComponent/ant-design-vue/commit/741718a0f92c790266e7a07d8d129c5673344a7e) +- 🐞 修复 Tag 关闭图标样式丢失问题 [#4649](https://github.com/vueComponent/ant-design-vue/issues/4649) +- 🐞 修复 TreeSelect 清楚按钮在特殊条件下不显示问题 [#4655](https://github.com/vueComponent/ant-design-vue/issues/4655) +- 🐞 修复 useForm immdiate 不生效问题 [#4646](https://github.com/vueComponent/ant-design-vue/issues/4646) + ## 2.2.7 `2021-09-08` diff --git a/package.json b/package.json index 891b1109f..22de2a53f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-vue", - "version": "2.2.7", + "version": "2.2.8", "title": "Ant Design Vue", "description": "An enterprise-class UI design language and Vue-based implementation", "keywords": [ From 2e5e146f0c763cf0f815e8692b77cfaae0b88a89 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 17 Sep 2021 21:59:17 +0800 Subject: [PATCH 6/6] chore: update ignorePlugin --- webpack.build.conf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.build.conf.js b/webpack.build.conf.js index 1da4ffd91..821494643 100644 --- a/webpack.build.conf.js +++ b/webpack.build.conf.js @@ -8,7 +8,9 @@ const { webpack } = getWebpackConfig; // http://stackoverflow.com/q/25384360 function ignoreMomentLocale(webpackConfig) { delete webpackConfig.module.noParse; - webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)); + webpackConfig.plugins.push( + new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }), + ); } function addLocales(webpackConfig) {