Merge remote-tracking branch 'origin/main' into feat-v4
commit
98be7071e5
|
@ -57,6 +57,31 @@
|
||||||
- ๐ ไผๅ Upload ๆไฝๆ้ฎ็ๆ ทๅผ็ป่ใ
|
- ๐ ไผๅ Upload ๆไฝๆ้ฎ็ๆ ทๅผ็ป่ใ
|
||||||
- ๐ ไฟฎๅค Switch ๅจๆ้ปไธป้ขไธๅ
ณ้ญๆถ็้ข่ฒ้ฎ้ขใ
|
- ๐ ไฟฎๅค Switch ๅจๆ้ปไธป้ขไธๅ
ณ้ญๆถ็้ข่ฒ้ฎ้ขใ
|
||||||
|
|
||||||
|
## 3.2.20
|
||||||
|
|
||||||
|
`2023-04-27`
|
||||||
|
|
||||||
|
- ๐ Optimize the repeated instantiation of Space subcomponents [#6500](https://github.com/vueComponent/ant-design-vue/issues/6500)
|
||||||
|
- ๐ Fix RangePicker does not support null value problem [#6510](https://github.com/vueComponent/ant-design-vue/issues/6510)
|
||||||
|
|
||||||
|
## 3.2.19
|
||||||
|
|
||||||
|
`2023-04-23`
|
||||||
|
|
||||||
|
- ๐ Fix antd.min.js file error
|
||||||
|
|
||||||
|
## 3.2.18
|
||||||
|
|
||||||
|
`2023-04-23`
|
||||||
|
|
||||||
|
- ๐ Fix the style of input addonAfter when Form disabled [#6403](https://github.com/vueComponent/ant-design-vue/issues/6403)
|
||||||
|
- ๐ Fix Upload class name error [#6413](https://github.com/vueComponent/ant-design-vue/issues/6413)
|
||||||
|
- ๐ Fix date component's week, quarter does not support format problem [#6385](https://github.com/vueComponent/ant-design-vue/issues/6385)
|
||||||
|
- ๐ Fix the problem that Select scrolls under Firefox [#6470](https://github.com/vueComponent/ant-design-vue/issues/6470)
|
||||||
|
- ๐ Button added focus and blur methods [#6483](https://github.com/vueComponent/ant-design-vue/issues/6483)
|
||||||
|
- ๐ Fix the problem that the container height changes after Select is selected [#6467](https://github.com/vueComponent/ant-design-vue/issues/6467)
|
||||||
|
- ๐ Fix Form name not taking effect [#6460](https://github.com/vueComponent/ant-design-vue/issues/6460)
|
||||||
|
|
||||||
## 3.2.17
|
## 3.2.17
|
||||||
|
|
||||||
`2023-04-04`
|
`2023-04-04`
|
||||||
|
|
|
@ -57,6 +57,31 @@
|
||||||
- ๐ ไผๅ Upload ๆไฝๆ้ฎ็ๆ ทๅผ็ป่ใ
|
- ๐ ไผๅ Upload ๆไฝๆ้ฎ็ๆ ทๅผ็ป่ใ
|
||||||
- ๐ ไฟฎๅค Switch ๅจๆ้ปไธป้ขไธๅ
ณ้ญๆถ็้ข่ฒ้ฎ้ขใ
|
- ๐ ไฟฎๅค Switch ๅจๆ้ปไธป้ขไธๅ
ณ้ญๆถ็้ข่ฒ้ฎ้ขใ
|
||||||
|
|
||||||
|
## 3.2.20
|
||||||
|
|
||||||
|
`2023-04-27`
|
||||||
|
|
||||||
|
- ๐ ไผๅ Space ๅญ็ปไปถ้ๅคๅฎไพๅ้ฎ้ข [#6500](https://github.com/vueComponent/ant-design-vue/issues/6500)
|
||||||
|
- ๐ ไฟฎๅค RangePicker ไธๆฏๆ็ฉบๅผ้ฎ้ข [#6510](https://github.com/vueComponent/ant-design-vue/issues/6510)
|
||||||
|
|
||||||
|
## 3.2.19
|
||||||
|
|
||||||
|
`2023-04-23`
|
||||||
|
|
||||||
|
- ๐ ไฟฎๅค antd.min.js ๆไปถ้่ฏฏ
|
||||||
|
|
||||||
|
## 3.2.18
|
||||||
|
|
||||||
|
`2023-04-23`
|
||||||
|
|
||||||
|
- ๐ ไฟฎๅค input addonAfter ๅจ Form diabled ๆถ็ๆ ทๅผ [#6403](https://github.com/vueComponent/ant-design-vue/issues/6403)
|
||||||
|
- ๐ ไฟฎๅค Upload ็ฑปๅ้่ฏฏ [#6413](https://github.com/vueComponent/ant-design-vue/issues/6413)
|
||||||
|
- ๐ ไฟฎๅคๆฅๆ็ปไปถ็ ๅจใๅญฃๅบฆ ไธๆฏๆ format ้ฎ้ข [#6385](https://github.com/vueComponent/ant-design-vue/issues/6385)
|
||||||
|
- ๐ ไฟฎๅค Select ๅจ Firefox ไธๆปๅจๆพ็คบๅผๅธธ้ฎ้ข [#6470](https://github.com/vueComponent/ant-design-vue/issues/6470)
|
||||||
|
- ๐ Button ๆฐๅข focusใblur ๆนๆณ [#6483](https://github.com/vueComponent/ant-design-vue/issues/6483)
|
||||||
|
- ๐ ไฟฎๅค Select ้ไธญๅๅฏผ่ดๅฎนๅจ้ซๅบฆๅๅ้ฎ้ข [#6467](https://github.com/vueComponent/ant-design-vue/issues/6467)
|
||||||
|
- ๐ ไฟฎๅค Form name ๆช็ๆ้ฎ้ข [#6460](https://github.com/vueComponent/ant-design-vue/issues/6460)
|
||||||
|
|
||||||
## 3.2.17
|
## 3.2.17
|
||||||
|
|
||||||
`2023-04-04`
|
`2023-04-04`
|
||||||
|
|
|
@ -110,8 +110,18 @@ const Affix = defineComponent({
|
||||||
const newState = {
|
const newState = {
|
||||||
status: AffixStatus.None,
|
status: AffixStatus.None,
|
||||||
} as AffixState;
|
} as AffixState;
|
||||||
const targetRect = getTargetRect(targetNode);
|
|
||||||
const placeholderRect = getTargetRect(placeholderNode.value as HTMLElement);
|
const placeholderRect = getTargetRect(placeholderNode.value as HTMLElement);
|
||||||
|
|
||||||
|
if (
|
||||||
|
placeholderRect.top === 0 &&
|
||||||
|
placeholderRect.left === 0 &&
|
||||||
|
placeholderRect.width === 0 &&
|
||||||
|
placeholderRect.height === 0
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const targetRect = getTargetRect(targetNode);
|
||||||
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop.value);
|
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop.value);
|
||||||
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom.value);
|
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom.value);
|
||||||
if (
|
if (
|
||||||
|
@ -122,27 +132,34 @@ const Affix = defineComponent({
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fixedTop !== undefined) {
|
if (fixedTop !== undefined) {
|
||||||
|
const width = `${placeholderRect.width}px`;
|
||||||
|
const height = `${placeholderRect.height}px`;
|
||||||
|
|
||||||
newState.affixStyle = {
|
newState.affixStyle = {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
top: fixedTop,
|
top: fixedTop,
|
||||||
width: placeholderRect.width + 'px',
|
width,
|
||||||
height: placeholderRect.height + 'px',
|
height,
|
||||||
};
|
};
|
||||||
newState.placeholderStyle = {
|
newState.placeholderStyle = {
|
||||||
width: placeholderRect.width + 'px',
|
width,
|
||||||
height: placeholderRect.height + 'px',
|
height,
|
||||||
};
|
};
|
||||||
} else if (fixedBottom !== undefined) {
|
} else if (fixedBottom !== undefined) {
|
||||||
|
const width = `${placeholderRect.width}px`;
|
||||||
|
const height = `${placeholderRect.height}px`;
|
||||||
|
|
||||||
newState.affixStyle = {
|
newState.affixStyle = {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
bottom: fixedBottom,
|
bottom: fixedBottom,
|
||||||
width: placeholderRect.width + 'px',
|
width,
|
||||||
height: placeholderRect.height + 'px',
|
height,
|
||||||
};
|
};
|
||||||
newState.placeholderStyle = {
|
newState.placeholderStyle = {
|
||||||
width: placeholderRect.width + 'px',
|
width,
|
||||||
height: placeholderRect.height + 'px',
|
height,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,27 +101,27 @@ describe('Menu', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should accept openKeys in mode vertical', async () => {
|
// it('should accept openKeys in mode vertical', async () => {
|
||||||
mount(
|
// mount(
|
||||||
{
|
// {
|
||||||
render() {
|
// render() {
|
||||||
return (
|
// return (
|
||||||
<Menu openKeys={['1']} mode="vertical">
|
// <Menu openKeys={['1']} mode="vertical">
|
||||||
<SubMenu key="1" title="submenu1">
|
// <SubMenu key="1" title="submenu1">
|
||||||
<Menu.Item key="submenu1">Option 1</Menu.Item>
|
// <Menu.Item key="submenu1">Option 1</Menu.Item>
|
||||||
<Menu.Item key="submenu2">Option 2</Menu.Item>
|
// <Menu.Item key="submenu2">Option 2</Menu.Item>
|
||||||
</SubMenu>
|
// </SubMenu>
|
||||||
<Menu.Item key="2">menu2</Menu.Item>
|
// <Menu.Item key="2">menu2</Menu.Item>
|
||||||
</Menu>
|
// </Menu>
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{ attachTo: 'body', sync: false },
|
// { attachTo: 'body', sync: false },
|
||||||
);
|
// );
|
||||||
await asyncExpect(() => {
|
// await asyncExpect(() => {
|
||||||
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
// expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
||||||
}, 100);
|
// }, 100);
|
||||||
});
|
// });
|
||||||
|
|
||||||
it('horizontal', async () => {
|
it('horizontal', async () => {
|
||||||
mount(
|
mount(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue';
|
import type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue';
|
||||||
import { defineComponent, computed, ref, watch } from 'vue';
|
import { defineComponent, computed, ref, watch, Fragment } from 'vue';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { filterEmpty } from '../_util/props-util';
|
import { filterEmpty } from '../_util/props-util';
|
||||||
import type { SizeType } from '../config-provider';
|
import type { SizeType } from '../config-provider';
|
||||||
|
@ -85,8 +85,8 @@ const Space = defineComponent({
|
||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
const { wrap, direction = 'horizontal' } = props;
|
const { wrap, direction = 'horizontal' } = props;
|
||||||
|
const children = slots.default?.();
|
||||||
const items = filterEmpty(slots.default?.());
|
const items = filterEmpty(children);
|
||||||
const len = items.length;
|
const len = items.length;
|
||||||
|
|
||||||
if (len === 0) {
|
if (len === 0) {
|
||||||
|
@ -99,6 +99,7 @@ const Space = defineComponent({
|
||||||
return (
|
return (
|
||||||
<div {...attrs} class={cn.value} style={[style.value, attrs.style as any]}>
|
<div {...attrs} class={cn.value} style={[style.value, attrs.style as any]}>
|
||||||
{items.map((child, index) => {
|
{items.map((child, index) => {
|
||||||
|
const originIndex = children.indexOf(child);
|
||||||
let itemStyle: CSSProperties = {};
|
let itemStyle: CSSProperties = {};
|
||||||
if (!supportFlexGap.value) {
|
if (!supportFlexGap.value) {
|
||||||
if (direction === 'vertical') {
|
if (direction === 'vertical') {
|
||||||
|
@ -116,7 +117,7 @@ const Space = defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<>
|
<Fragment key={originIndex}>
|
||||||
<div class={itemClassName} style={itemStyle}>
|
<div class={itemClassName} style={itemStyle}>
|
||||||
{child}
|
{child}
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +126,7 @@ const Space = defineComponent({
|
||||||
{split}
|
{split}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</>,
|
</Fragment>,
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,32 +67,32 @@ describe('Typography', () => {
|
||||||
const fullStr =
|
const fullStr =
|
||||||
'Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light';
|
'Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light';
|
||||||
|
|
||||||
it('should trigger update', async () => {
|
// xit('should trigger update', async () => {
|
||||||
const onEllipsis = jest.fn();
|
// const onEllipsis = jest.fn();
|
||||||
const wrapper = mount(Base, {
|
// const wrapper = mount(Base, {
|
||||||
props: {
|
// props: {
|
||||||
ellipsis: { onEllipsis },
|
// ellipsis: { onEllipsis },
|
||||||
component: 'p',
|
// component: 'p',
|
||||||
editable: true,
|
// editable: true,
|
||||||
content: fullStr,
|
// content: fullStr,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
await sleep(20);
|
// await sleep(20);
|
||||||
|
|
||||||
expect(wrapper.text()).toEqual('Bamboo is Little ...');
|
// expect(wrapper.text()).toEqual('Bamboo is Little ...');
|
||||||
expect(onEllipsis).toHaveBeenCalledWith(true);
|
// expect(onEllipsis).toHaveBeenCalledWith(true);
|
||||||
onEllipsis.mockReset();
|
// onEllipsis.mockReset();
|
||||||
wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
|
// wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
|
||||||
await sleep(300);
|
// await sleep(300);
|
||||||
expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
|
// expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
|
||||||
expect(onEllipsis).not.toHaveBeenCalled();
|
// expect(onEllipsis).not.toHaveBeenCalled();
|
||||||
|
|
||||||
wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
|
// wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
|
||||||
await sleep(20);
|
// await sleep(20);
|
||||||
expect(wrapper.find('p').text()).toEqual(fullStr);
|
// expect(wrapper.find('p').text()).toEqual(fullStr);
|
||||||
expect(onEllipsis).toHaveBeenCalledWith(false);
|
// expect(onEllipsis).toHaveBeenCalledWith(false);
|
||||||
});
|
// });
|
||||||
|
|
||||||
it('should middle ellipsis', async () => {
|
it('should middle ellipsis', async () => {
|
||||||
const suffix = '--suffix';
|
const suffix = '--suffix';
|
||||||
|
|
|
@ -123,6 +123,7 @@ function findTargetStr(val: string, index: number, segmentation: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const toDateWithValueFormat = (val: string | Dayjs, valueFormat: string) => {
|
const toDateWithValueFormat = (val: string | Dayjs, valueFormat: string) => {
|
||||||
|
if (!val) return null;
|
||||||
if (dayjs.isDayjs(val)) {
|
if (dayjs.isDayjs(val)) {
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// base rc-virtual-list 3.4.2
|
// base rc-virtual-list 3.4.13
|
||||||
import List from './List';
|
import List from './List';
|
||||||
|
|
||||||
export default List;
|
export default List;
|
||||||
|
|
Loadingโฆ
Reference in New Issue