mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
fix: use same throw error utils function. (#2022)
* fix: use same throw error utils function. * Update tab-nav.vue Update error message. Co-authored-by: jeremywu <15975785+JeremyWuuuuu@users.noreply.github.com>
This commit is contained in:
parent
aca8a21f79
commit
ce2a9b10c8
@ -3,6 +3,7 @@ import { h, defineComponent, ref, inject, computed, onUpdated, onMounted, onBefo
|
||||
import { addResizeListener, removeResizeListener, ResizableElement } from '@element-plus/utils/resize-event'
|
||||
import { EVENT_CODE } from '@element-plus/utils/aria'
|
||||
import { on, off } from '@element-plus/utils/dom'
|
||||
import throwError from '@element-plus/utils/error'
|
||||
import TabBar from './tab-bar.vue'
|
||||
import { NOOP, capitalize } from '@vue/shared'
|
||||
import { RootTabs, Pane, ITabType } from './tabs.vue'
|
||||
@ -46,7 +47,7 @@ export default defineComponent({
|
||||
setup() {
|
||||
const rootTabs = inject<RootTabs>('rootTabs')
|
||||
if (!rootTabs) {
|
||||
throw new Error(`ElTabNav must use with ElTabs`)
|
||||
throwError('[ElTabNav]', `ElTabNav must be nested inside ElTabs`)
|
||||
}
|
||||
|
||||
const scrollable = ref<boolean | Scrollable>(false)
|
||||
|
Loading…
Reference in New Issue
Block a user