@@ -86,10 +86,6 @@ export default {
86
86
onPrevClick,
87
87
onNextClick,
88
88
animated,
89
- destroyInactiveTabPane = false ,
90
- activeKey,
91
- defaultActiveKey,
92
- $slots,
93
89
tabBarGutter,
94
90
} = this
95
91
const children = filterEmpty ( this . $slots . default )
@@ -181,80 +177,15 @@ export default {
181
177
children : childrenWithClose . length > 0 ? childrenWithClose : children ,
182
178
__propsSymbol__ : Symbol ( ) ,
183
179
} ,
180
+ on : {
181
+ ...this . $listeners ,
182
+ change : this . handleChange ,
183
+ } ,
184
+ class : cls ,
184
185
}
185
186
return (
186
- < VcTabs
187
- { ...tabsProps }
188
- class = { cls }
189
- onChange = { this . handleChange }
190
- />
187
+ < VcTabs { ...tabsProps } />
191
188
)
192
- // const tabBarExtraContent = getComponentFromProp(this, 'tabBarExtraContent')
193
- // const children = []
194
- // $slots.default && $slots.default.forEach((child) => {
195
- // if (isEmptyElement(child)) { return }
196
- // const { componentOptions } = child
197
- // const __ANT_TAB_PANE = getSlotOptions(child).__ANT_TAB_PANE
198
- // warning(__ANT_TAB_PANE, '`Tabs children just support TabPane')
199
- // if (componentOptions && __ANT_TAB_PANE) {
200
- // componentOptions.propsData = componentOptions.propsData || {}
201
- // if (componentOptions.propsData.tab === undefined) {
202
- // const tab = (componentOptions.children || []).filter(({ data = {}}) => data.slot === 'tab')
203
- // componentOptions.propsData.tab = tab
204
- // }
205
- // children.push(child)
206
- // }
207
- // })
208
- // const tabBarProps = {
209
- // props: {
210
- // hideAdd,
211
- // removeTab: this.removeTab,
212
- // createNewTab: this.createNewTab,
213
- // inkBarAnimated,
214
- // tabBarGutter,
215
- // },
216
- // on: {
217
- // tabClick: onTabClick,
218
- // prevClick: onPrevClick,
219
- // nextClick: onNextClick,
220
- // },
221
- // style: tabBarStyle,
222
- // }
223
- // const tabContentProps = {
224
- // props: {
225
- // animated: tabPaneAnimated,
226
- // animatedWithMargin: true,
227
- // },
228
- // }
229
- // const tabsProps = {
230
- // props: {
231
- // prefixCls,
232
- // tabBarPosition: tabPosition,
233
- // tabBarProps: tabBarProps,
234
- // tabContentProps: tabContentProps,
235
- // destroyInactiveTabPane,
236
- // defaultActiveKey,
237
- // type,
238
- // },
239
- // on: {
240
- // change: this.handleChange,
241
- // tabClick: this.onTabClick,
242
- // },
243
- // }
244
- // if (hasProp(this, 'activeKey')) {
245
- // tabsProps.props.activeKey = activeKey
246
- // }
247
- // return (
248
- // <Tabs
249
- // class={cls}
250
- // {...tabsProps}
251
- // >
252
- // {children}
253
- // {tabBarExtraContent ? <template slot='tabBarExtraContent'>
254
- // {tabBarExtraContent}
255
- // </template> : null}
256
- // </Tabs>
257
- // )
258
189
} ,
259
190
}
260
191
0 commit comments