Merge remote-tracking branch 'origin/main' into feat-v4
						commit
						98be7071e5
					
				|  | @ -57,6 +57,31 @@ | |||
|   - 💄 优化 Upload 操作按钮的样式细节。 | ||||
| - 🐞 修复 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 | ||||
| 
 | ||||
| `2023-04-04` | ||||
|  |  | |||
|  | @ -57,6 +57,31 @@ | |||
|   - 💄 优化 Upload 操作按钮的样式细节。 | ||||
| - 🐞 修复 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 | ||||
| 
 | ||||
| `2023-04-04` | ||||
|  |  | |||
|  | @ -110,8 +110,18 @@ const Affix = defineComponent({ | |||
|       const newState = { | ||||
|         status: AffixStatus.None, | ||||
|       } as AffixState; | ||||
|       const targetRect = getTargetRect(targetNode); | ||||
|       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 fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom.value); | ||||
|       if ( | ||||
|  | @ -122,27 +132,34 @@ const Affix = defineComponent({ | |||
|       ) { | ||||
|         return; | ||||
|       } | ||||
| 
 | ||||
|       if (fixedTop !== undefined) { | ||||
|         const width = `${placeholderRect.width}px`; | ||||
|         const height = `${placeholderRect.height}px`; | ||||
| 
 | ||||
|         newState.affixStyle = { | ||||
|           position: 'fixed', | ||||
|           top: fixedTop, | ||||
|           width: placeholderRect.width + 'px', | ||||
|           height: placeholderRect.height + 'px', | ||||
|           width, | ||||
|           height, | ||||
|         }; | ||||
|         newState.placeholderStyle = { | ||||
|           width: placeholderRect.width + 'px', | ||||
|           height: placeholderRect.height + 'px', | ||||
|           width, | ||||
|           height, | ||||
|         }; | ||||
|       } else if (fixedBottom !== undefined) { | ||||
|         const width = `${placeholderRect.width}px`; | ||||
|         const height = `${placeholderRect.height}px`; | ||||
| 
 | ||||
|         newState.affixStyle = { | ||||
|           position: 'fixed', | ||||
|           bottom: fixedBottom, | ||||
|           width: placeholderRect.width + 'px', | ||||
|           height: placeholderRect.height + 'px', | ||||
|           width, | ||||
|           height, | ||||
|         }; | ||||
|         newState.placeholderStyle = { | ||||
|           width: placeholderRect.width + 'px', | ||||
|           height: placeholderRect.height + 'px', | ||||
|           width, | ||||
|           height, | ||||
|         }; | ||||
|       } | ||||
| 
 | ||||
|  |  | |||
|  | @ -101,27 +101,27 @@ describe('Menu', () => { | |||
|     }); | ||||
|   }); | ||||
| 
 | ||||
|   it('should accept openKeys in mode vertical', async () => { | ||||
|     mount( | ||||
|       { | ||||
|         render() { | ||||
|           return ( | ||||
|             <Menu openKeys={['1']} mode="vertical"> | ||||
|               <SubMenu key="1" title="submenu1"> | ||||
|                 <Menu.Item key="submenu1">Option 1</Menu.Item> | ||||
|                 <Menu.Item key="submenu2">Option 2</Menu.Item> | ||||
|               </SubMenu> | ||||
|               <Menu.Item key="2">menu2</Menu.Item> | ||||
|             </Menu> | ||||
|           ); | ||||
|         }, | ||||
|       }, | ||||
|       { attachTo: 'body', sync: false }, | ||||
|     ); | ||||
|     await asyncExpect(() => { | ||||
|       expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none'); | ||||
|     }, 100); | ||||
|   }); | ||||
|   // it('should accept openKeys in mode vertical', async () => {
 | ||||
|   //   mount(
 | ||||
|   //     {
 | ||||
|   //       render() {
 | ||||
|   //         return (
 | ||||
|   //           <Menu openKeys={['1']} mode="vertical">
 | ||||
|   //             <SubMenu key="1" title="submenu1">
 | ||||
|   //               <Menu.Item key="submenu1">Option 1</Menu.Item>
 | ||||
|   //               <Menu.Item key="submenu2">Option 2</Menu.Item>
 | ||||
|   //             </SubMenu>
 | ||||
|   //             <Menu.Item key="2">menu2</Menu.Item>
 | ||||
|   //           </Menu>
 | ||||
|   //         );
 | ||||
|   //       },
 | ||||
|   //     },
 | ||||
|   //     { attachTo: 'body', sync: false },
 | ||||
|   //   );
 | ||||
|   //   await asyncExpect(() => {
 | ||||
|   //     expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
 | ||||
|   //   }, 100);
 | ||||
|   // });
 | ||||
| 
 | ||||
|   it('horizontal', async () => { | ||||
|     mount( | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| 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 { filterEmpty } from '../_util/props-util'; | ||||
| import type { SizeType } from '../config-provider'; | ||||
|  | @ -85,8 +85,8 @@ const Space = defineComponent({ | |||
|     }); | ||||
|     return () => { | ||||
|       const { wrap, direction = 'horizontal' } = props; | ||||
| 
 | ||||
|       const items = filterEmpty(slots.default?.()); | ||||
|       const children = slots.default?.(); | ||||
|       const items = filterEmpty(children); | ||||
|       const len = items.length; | ||||
| 
 | ||||
|       if (len === 0) { | ||||
|  | @ -99,6 +99,7 @@ const Space = defineComponent({ | |||
|       return ( | ||||
|         <div {...attrs} class={cn.value} style={[style.value, attrs.style as any]}> | ||||
|           {items.map((child, index) => { | ||||
|             const originIndex = children.indexOf(child); | ||||
|             let itemStyle: CSSProperties = {}; | ||||
|             if (!supportFlexGap.value) { | ||||
|               if (direction === 'vertical') { | ||||
|  | @ -116,7 +117,7 @@ const Space = defineComponent({ | |||
|             } | ||||
| 
 | ||||
|             return wrapSSR( | ||||
|               <> | ||||
|               <Fragment key={originIndex}> | ||||
|                 <div class={itemClassName} style={itemStyle}> | ||||
|                   {child} | ||||
|                 </div> | ||||
|  | @ -125,7 +126,7 @@ const Space = defineComponent({ | |||
|                     {split} | ||||
|                   </span> | ||||
|                 )} | ||||
|               </>, | ||||
|               </Fragment>, | ||||
|             ); | ||||
|           })} | ||||
|         </div> | ||||
|  |  | |||
|  | @ -67,32 +67,32 @@ describe('Typography', () => { | |||
|       const fullStr = | ||||
|         '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 () => { | ||||
|         const onEllipsis = jest.fn(); | ||||
|         const wrapper = mount(Base, { | ||||
|           props: { | ||||
|             ellipsis: { onEllipsis }, | ||||
|             component: 'p', | ||||
|             editable: true, | ||||
|             content: fullStr, | ||||
|           }, | ||||
|         }); | ||||
|       // xit('should trigger update', async () => {
 | ||||
|       //   const onEllipsis = jest.fn();
 | ||||
|       //   const wrapper = mount(Base, {
 | ||||
|       //     props: {
 | ||||
|       //       ellipsis: { onEllipsis },
 | ||||
|       //       component: 'p',
 | ||||
|       //       editable: true,
 | ||||
|       //       content: fullStr,
 | ||||
|       //     },
 | ||||
|       //   });
 | ||||
| 
 | ||||
|         await sleep(20); | ||||
|       //   await sleep(20);
 | ||||
| 
 | ||||
|         expect(wrapper.text()).toEqual('Bamboo is Little ...'); | ||||
|         expect(onEllipsis).toHaveBeenCalledWith(true); | ||||
|         onEllipsis.mockReset(); | ||||
|         wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } }); | ||||
|         await sleep(300); | ||||
|         expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...'); | ||||
|         expect(onEllipsis).not.toHaveBeenCalled(); | ||||
|       //   expect(wrapper.text()).toEqual('Bamboo is Little ...');
 | ||||
|       //   expect(onEllipsis).toHaveBeenCalledWith(true);
 | ||||
|       //   onEllipsis.mockReset();
 | ||||
|       //   wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
 | ||||
|       //   await sleep(300);
 | ||||
|       //   expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
 | ||||
|       //   expect(onEllipsis).not.toHaveBeenCalled();
 | ||||
| 
 | ||||
|         wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } }); | ||||
|         await sleep(20); | ||||
|         expect(wrapper.find('p').text()).toEqual(fullStr); | ||||
|         expect(onEllipsis).toHaveBeenCalledWith(false); | ||||
|       }); | ||||
|       //   wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
 | ||||
|       //   await sleep(20);
 | ||||
|       //   expect(wrapper.find('p').text()).toEqual(fullStr);
 | ||||
|       //   expect(onEllipsis).toHaveBeenCalledWith(false);
 | ||||
|       // });
 | ||||
| 
 | ||||
|       it('should middle ellipsis', async () => { | ||||
|         const suffix = '--suffix'; | ||||
|  |  | |||
|  | @ -123,6 +123,7 @@ function findTargetStr(val: string, index: number, segmentation: string) { | |||
| } | ||||
| 
 | ||||
| const toDateWithValueFormat = (val: string | Dayjs, valueFormat: string) => { | ||||
|   if (!val) return null; | ||||
|   if (dayjs.isDayjs(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'; | ||||
| 
 | ||||
| export default List; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 tangjinzhou
						tangjinzhou