Browse Source

Merge remote-tracking branch 'origin/main' into feat-v3.3

pull/5820/head
tangjinzhou 2 years ago
parent
commit
e42fdd7a06
  1. 19
      CHANGELOG.en-US.md
  2. 17
      CHANGELOG.zh-CN.md
  3. 2
      components/_util/transition.tsx
  4. 4
      components/input/inputProps.ts
  5. 27
      components/vc-table/Cell/index.tsx
  6. 13
      package.json
  7. 25
      scripts/commitizen.js

19
CHANGELOG.en-US.md

@ -44,6 +44,23 @@
- 💄 优化 Upload 操作按钮的样式细节。
- 🐞 修复 Switch 在暗黑主题下关闭时的颜色问题。
## 3.2.9
`2022-06-25`
- 🐞 Fix the flickering problem when the Select edge position is closed [8a659d](https://github.com/vueComponent/ant-design-vue/commit/8a659da84fb8c44620fa279d9d6d73d6bd93d1f7)
## 3.2.8
`2022-06-24`
- 🌟 Image add scroll wheel to zoom in and out [#5703](https://github.com/vueComponent/ant-design-vue/issues/5703)
- 🌟 ConfigProvider.config added getPopupContainer [62dc24](https://github.com/vueComponent/ant-design-vue/commit/62dc2402f37c0ca0514f5b8fbb363247f0216bb2)
- 🐞 Upload tooltip does not show issues [#5714](https://github.com/vueComponent/ant-design-vue/issues/5714)
- 🐞 Row gutter property type error [#5725](https://github.com/vueComponent/ant-design-vue/issues/5725)
- 🐞 Whether Typography is editable or not, the state is not reset after switching [#5743](https://github.com/vueComponent/ant-design-vue/issues/5743)
- 🐞 In DirectoryTree multi-selection mode, a single node should be selected when clicking (multi-selection only selects multiple nodes when pressing ctrl and shift keys) [#5732](https://github.com/vueComponent/ant-design-vue/ issues/5732)
## 3.2.7
`2022-06-13`
@ -495,7 +512,7 @@ Github:[https://github.com/surely-vue/table]
- 🐞 Fix the problem that TreeSelect selectable and checkable cannot be closed [#4838](https://github.com/vueComponent/ant-design-vue/issues/4838)
- 🐞 Fix the problem that Tabs cannot be scrolled on the mobile terminal [#4828](https://github.com/vueComponent/ant-design-vue/issues/4828)
- 🐞 Fix InputNumber does not trigger inspection under form [#4831](https://github.com/vueComponent/ant-design-vue/issues/4831)
- 🐞 Fix that when Select uses `<a-select-option>` to build a node, the automatic word segmentation fails [#4844](https://github.com/vueComponent/ant-design-vue/issues/4844)
- 🐞 Fix that when Select uses `\<a-select-option>` to build a node, the automatic word segmentation fails [#4844](https://github.com/vueComponent/ant-design-vue/issues/4844)
## 3.0.0-alpha.8

17
CHANGELOG.zh-CN.md

@ -44,6 +44,23 @@
- 💄 优化 Upload 操作按钮的样式细节。
- 🐞 修复 Switch 在暗黑主题下关闭时的颜色问题。
## 3.2.9
`2022-06-25`
- 🐞 修复 Select 边缘位置关闭时闪动问题 [8a659d](https://github.com/vueComponent/ant-design-vue/commit/8a659da84fb8c44620fa279d9d6d73d6bd93d1f7)
## 3.2.8
`2022-06-24`
- 🌟 Image 新增滚轮放大缩小 [#5703](https://github.com/vueComponent/ant-design-vue/issues/5703)
- 🌟 ConfigProvider.config 新增 getPopupContainer [62dc24](https://github.com/vueComponent/ant-design-vue/commit/62dc2402f37c0ca0514f5b8fbb363247f0216bb2)
- 🐞 Upload tooltip 不展示问题 [#5714](https://github.com/vueComponent/ant-design-vue/issues/5714)
- 🐞 Row gutter 属性类型错误 [#5725](https://github.com/vueComponent/ant-design-vue/issues/5725)
- 🐞 Typography 是否可编辑切换后,状态未重置问题 [#5743](https://github.com/vueComponent/ant-design-vue/issues/5743)
- 🐞 DirectoryTree 多选模式下,点击时应该选中单个节点(多选只有配合 ctrl、shift 按键时选中多个节点) [#5732](https://github.com/vueComponent/ant-design-vue/issues/5732)
## 3.2.7
`2022-06-13`

2
components/_util/transition.tsx

@ -41,7 +41,7 @@ export const getTransitionProps = (transitionName: string, opt: TransitionProps
enterActiveClass: `${transitionName}-enter ${transitionName}-enter-prepare`,
enterToClass: `${transitionName}-enter ${transitionName}-enter-active`,
leaveFromClass: ` ${transitionName}-leave`,
leaveActiveClass: `${transitionName}-leave`,
leaveActiveClass: `${transitionName}-leave ${transitionName}-leave-active`,
leaveToClass: `${transitionName}-leave ${transitionName}-leave-active`,
...opt,
}

4
components/input/inputProps.ts

@ -26,8 +26,8 @@ export interface ShowCountProps {
const textAreaProps = () => ({
...omit(inputProps(), ['prefix', 'addonBefore', 'addonAfter', 'suffix']),
rows: Number,
autosize: { type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined },
autoSize: { type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined },
autosize: { type: [Boolean, Object] as PropType<boolean | AutoSizeType>, default: undefined },
autoSize: { type: [Boolean, Object] as PropType<boolean | AutoSizeType>, default: undefined },
onResize: { type: Function as PropType<(size: { width: number; height: number }) => void> },
onCompositionstart: Function as PropType<CompositionEventHandler>,
onCompositionend: Function as PropType<CompositionEventHandler>,

27
components/vc-table/Cell/index.tsx

@ -1,7 +1,12 @@
import classNames from '../../_util/classNames';
import { flattenChildren, isValidElement, parseStyleText } from '../../_util/props-util';
import type { CSSProperties } from 'vue';
import { computed, defineComponent, isVNode, renderSlot } from 'vue';
import {
filterEmpty,
flattenChildren,
isValidElement,
parseStyleText,
} from '../../_util/props-util';
import type { CSSProperties, VNodeArrayChildren } from 'vue';
import { Text, computed, defineComponent, isVNode, renderSlot } from 'vue';
import type {
DataIndex,
@ -145,6 +150,18 @@ export default defineComponent<CellProps>({
additionalProps?.onMouseleave?.(event);
};
const getTitle = (vnodes: VNodeArrayChildren) => {
const vnode = filterEmpty(vnodes)[0];
if (isVNode(vnode)) {
if (vnode.type === Text) {
return vnode.children;
} else {
return Array.isArray(vnode.children) ? getTitle(vnode.children) : undefined;
}
} else {
return vnode;
}
};
return () => {
const {
prefixCls,
@ -298,8 +315,8 @@ export default defineComponent<CellProps>({
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
if (typeof childNode === 'string' || typeof childNode === 'number') {
title = childNode.toString();
} else if (isVNode(childNode) && typeof childNode.children === 'string') {
title = childNode.children;
} else if (isVNode(childNode)) {
title = getTitle([childNode]);
}
}

13
package.json

@ -118,8 +118,8 @@
"@types/postcss-load-config": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vitejs/plugin-vue": "^1.2.4",
"@vitejs/plugin-vue-jsx": "^1.1.6",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/babel-plugin-jsx": "^1.0.0",
"@vue/cli-plugin-eslint": "^5.0.0-0",
"@vue/compiler-sfc": "^3.2.0",
@ -149,6 +149,7 @@
"cross-env": "^7.0.0",
"css-loader": "^5.0.0",
"css-minimizer-webpack-plugin": "^3.0.0",
"cz-git": "^1.3.8",
"date-fns": "^2.24.0",
"diacritics": "^1.3.0",
"docsearch.js": "^2.6.3",
@ -240,7 +241,7 @@
"typescript": "~4.5.2",
"umi-request": "^1.3.5",
"url-loader": "^3.0.0",
"vite": "^2.3.8",
"vite": "^2.9.13",
"vue": "^3.2.0",
"vue-antd-md-loader": "^1.2.1-beta.1",
"vue-clipboard2": "0.3.3",
@ -298,5 +299,11 @@
"tags": "vetur/tags.json",
"attributes": "vetur/attributes.json"
},
"config": {
"commitizen": {
"path": "node_modules/cz-git",
"czConfig": "./scripts/commitizen.js"
}
},
"web-types": "vetur/web-types.json"
}

25
scripts/commitizen.js

@ -0,0 +1,25 @@
'use strict';
const { execSync } = require('child_process');
const fg = require('fast-glob');
const components = fg.sync('*', { cwd: 'components', onlyDirectories: true });
// precomputed scope
const scopeComplete = execSync('git status --porcelain || true')
.toString()
.trim()
.split('\n')
.find(r => ~r.indexOf('M '))
?.replace(/(\/)/g, '%%')
?.match(/components%%((\w|-)*)/)?.[1];
/** @type {import('cz-git').CommitizenGitOptions} */
module.exports = {
scopes: ['site', 'util', 'script', 'tool', ...components],
scopeFilters: ['__tests__', '_util'],
customScopesAlign: !scopeComplete ? 'top' : 'bottom',
defaultScope: scopeComplete,
maxHeaderLength: 100,
allowEmptyIssuePrefixs: false,
allowCustomIssuePrefixs: false,
};
Loading…
Cancel
Save