chore(Tabs): add deprecation warning (#9129)

* chore(Tabs): add deprecation warning

* chore: upd

* chore: upd
This commit is contained in:
neverland
2021-07-28 09:33:28 +08:00
committed by GitHub
parent a505a9a266
commit b7e6e68a92
5 changed files with 30 additions and 28 deletions
+6 -4
View File
@@ -6,6 +6,9 @@ import { Tab } from '../tab';
import { Tabs } from '../tabs';
import { Icon } from '../icon';
// Types
import type { TabsClickTabEventParams } from '../tabs/Tabs';
const [name, bem, t] = createNamespace('cascader');
export type CascaderOption = {
@@ -187,9 +190,8 @@ export default defineComponent({
const onClose = () => emit('close');
const onClickTab = (tabIndex: number, title: string) => {
emit('click-tab', tabIndex, title);
};
const onClickTab = ({ name, title }: TabsClickTabEventParams) =>
emit('click-tab', name, title);
const renderHeader = () => (
<div class={bem('header')}>
@@ -279,7 +281,7 @@ export default defineComponent({
color={props.activeColor}
swipeThreshold={0}
swipeable={props.swipeable}
onClick={onClickTab}
onClickTab={onClickTab}
>
{state.tabs.map(renderTab)}
</Tabs>