fix
							parent
							
								
									8aa56f7dad
								
							
						
					
					
						commit
						a670a5e718
					
				|  | @ -1,7 +1,7 @@ | |||
| import Tabs from './tabs' | ||||
| import TabPane from '../vc-tabs/src/TabPane' | ||||
| import TabContent from '../vc-tabs/src/TabContent' | ||||
| Tabs.TabPane = { ...TabPane, name: 'ATabPane' } | ||||
| Tabs.TabPane = { ...TabPane, name: 'ATabPane', __ANT_TAB_PANE: true } | ||||
| Tabs.TabContent = { ...TabContent, name: 'ATabContent' } | ||||
| export default Tabs | ||||
| export { TabPane, TabContent } | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| 
 | ||||
| import Tabs from '../vc-tabs/src/Tabs' | ||||
| import isFlexSupported from '../_util/isFlexSupported' | ||||
| import { hasProp, getComponentFromProp, getComponentName, isEmptyElement } from '../_util/props-util' | ||||
| import { hasProp, getComponentFromProp, getComponentName, isEmptyElement, getSlotOptions } from '../_util/props-util' | ||||
| import warning from '../_util/warning' | ||||
| export default { | ||||
|   name: 'ATabs', | ||||
|  | @ -112,9 +112,9 @@ export default { | |||
|     $slots.default && $slots.default.forEach((child) => { | ||||
|       if (isEmptyElement(child)) { return } | ||||
|       const { componentOptions } = child | ||||
|       const componentName = getComponentName(componentOptions) | ||||
|       warning(componentName === 'ATabPane', '`Tabs children just support TabPane') | ||||
|       if (componentOptions && componentName === 'TabPane') { | ||||
|       const __ANT_TAB_PANE = getSlotOptions(child).__ANT_TAB_PANE | ||||
|       warning(__ANT_TAB_PANE, '`Tabs children just support TabPane') | ||||
|       if (componentOptions && __ANT_TAB_PANE) { | ||||
|         componentOptions.propsData = componentOptions.propsData || {} | ||||
|         if (componentOptions.propsData.tab === undefined) { | ||||
|           const tab = (componentOptions.children || []).filter(({ data = {}}) => data.slot === 'tab') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 tjz
						tjz