🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/tabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ Visually move the tab controls to the bottom by setting the prop `end`.
tab pane is the same height and fits completely within the visible viewport, otherwise the user
will need to scroll up to read the start of the tabbed content.

**Note:** _the `bottom` prop has been deprecated in favor of the `end` prop._

## Vertical tabs

Have the tab controls placed on the lefthand side by setting the `vertical` prop to `true`. Vertical
Expand Down Expand Up @@ -312,8 +310,6 @@ Use the `tabs-start` slot to place extra tab buttons before the content tab butt
**Note:** extra (contentless) tab buttons should be a `<b-nav-item>` or have a root element of
`<li>` and class `nav-item` for proper rendering and semantic markup.

**DEPRECATION:** The `tabs` slot has been deprecated. please use the `tabs-end` slot instead.

## Add custom content to tab title

If you want to add custom content to tab title, like HTML code, icons, or another non-interactive
Expand Down
4 changes: 0 additions & 4 deletions src/components/tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
"name": "tabs-end",
"description": "Additional tab buttons without tab content placed after content tab buttons"
},
{
"name": "tabs",
"description": "Deprecated. Use 'tabs-end' instead. Additional tab buttons without tab content."
},
{
"name": "empty",
"description": "Renders this slot if no tabs are present"
Expand Down
19 changes: 1 addition & 18 deletions src/components/tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import Vue from '../../utils/vue'
import idMixin from '../../mixins/id'
import normalizeSlotMixin from '../../mixins/normalize-slot'
import BVTransition from '../../utils/bv-transition'
import warn from '../../utils/warn'

const DEPRECATED_MSG = 'Setting prop "href" is deprecated. Use the <b-nav> component instead.'

// @vue/component
export const BTab = /*#__PURE__*/ Vue.extend({
Expand Down Expand Up @@ -60,16 +57,6 @@ export const BTab = /*#__PURE__*/ Vue.extend({
type: Boolean,
default: false
},
href: {
// This should be deprecated, as tabs are not navigation (URL) based
// <b-nav> + <b-card> + <router-view>/<nuxt-child> should be used instead
// We don't support router-links here
type: String,
default: '#',
// `deprecated` -> Don't use this prop
// `deprecation` -> Refers to a change in prop usage
deprecated: DEPRECATED_MSG
},
lazy: {
type: Boolean,
default: false
Expand Down Expand Up @@ -118,6 +105,7 @@ export const BTab = /*#__PURE__*/ Vue.extend({
// If activated post mount
this.activate()
} else {
/* istanbul ignore next */
if (!this.deactivate()) {
// Tab couldn't be deactivated, so we reset the synced active prop
// Deactivation will fail if no other tabs to activate
Expand All @@ -140,11 +128,6 @@ export const BTab = /*#__PURE__*/ Vue.extend({
this.registerTab()
// Initially show on mount if active and not disabled
this.show = this.localActive
// Deprecate use of `href` prop
if (this.href && this.href !== '#') {
/* istanbul ignore next */
warn(`b-tab: ${DEPRECATED_MSG}`)
}
},
updated() {
// Force the tab button content to update (since slots are not reactive)
Expand Down
21 changes: 5 additions & 16 deletions src/components/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ const BTabButtonHelper = /*#__PURE__*/ Vue.extend({
// Apply <b-tabs> `activeNavItemClass` styles when the tab is active
this.tab.localActive ? this.bvTabs.activeNavItemClass : null
],
props: {
href: this.tab.href, // To be deprecated to always be '#'
disabled: this.tab.disabled
},
props: { disabled: this.tab.disabled },
attrs: {
role: 'tab',
id: this.id,
Expand Down Expand Up @@ -165,10 +162,6 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
type: Boolean,
default: false
},
bottom: {
type: Boolean,
default: false
},
end: {
// Synonym for 'bottom'
type: Boolean,
Expand Down Expand Up @@ -650,20 +643,16 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
small: this.small
}
},
[
this.normalizeSlot('tabs-start') || h(false),
buttons,
this.normalizeSlot('tabs-end') || this.normalizeSlot('tabs') || h(false)
]
[this.normalizeSlot('tabs-start') || h(), buttons, this.normalizeSlot('tabs-end') || h()]
)
nav = h(
'div',
{
key: 'bv-tabs-nav',
class: [
{
'card-header': this.card && !this.vertical && !(this.end || this.bottom),
'card-footer': this.card && !this.vertical && (this.end || this.bottom),
'card-header': this.card && !this.vertical && !this.end,
'card-footer': this.card && !this.vertical && this.end,
'col-auto': this.vertical
},
this.navWrapperClass
Expand Down Expand Up @@ -705,7 +694,7 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
},
attrs: { id: this.safeId() }
},
[this.end || this.bottom ? content : h(), [nav], this.end || this.bottom ? h() : content]
[this.end ? content : h(), [nav], this.end ? h() : content]
)
}
})
Expand Down