mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 17:31:02 +08:00
refactor(components): [tabs] add deprecated mark to activeName (#8590)
This commit is contained in:
parent
5678464c57
commit
59392fa194
@ -1,4 +1,5 @@
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
nextTick,
|
||||
provide,
|
||||
@ -18,7 +19,7 @@ import { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'
|
||||
import ElIcon from '@element-plus/components/icon'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { tabsRootContextKey } from '@element-plus/tokens'
|
||||
import { useNamespace } from '@element-plus/hooks'
|
||||
import { useDeprecated, useNamespace } from '@element-plus/hooks'
|
||||
import TabNav from './tab-nav'
|
||||
import type { TabNavInstance } from './tab-nav'
|
||||
import type { TabsPaneContext } from '@element-plus/tokens'
|
||||
@ -135,6 +136,18 @@ export default defineComponent({
|
||||
emit('tab-add')
|
||||
}
|
||||
|
||||
useDeprecated(
|
||||
{
|
||||
from: '"activeName"',
|
||||
replacement: '"model-value" or "v-model"',
|
||||
scope: 'ElTabs',
|
||||
version: '2.3.0',
|
||||
ref: 'https://element-plus.org/en-US/component/tabs.html#attributes',
|
||||
type: 'Attribute',
|
||||
},
|
||||
computed(() => !!props.activeName)
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.activeName,
|
||||
(modelValue) => setCurrentName(modelValue)
|
||||
|
Loading…
Reference in New Issue
Block a user