For 2-in-1 and tablet devices, the Tabs component should be set as a side navigation bar.
// code-linter.json5
{
"rules": {
"@cross-device-app-dev/sidebar-navigation": "warn"
}
} @Entry
@Component
struct Index {
build() {
Tabs() {
TabContent() {
}.tabBar("tab1")
TabContent() {
}.tabBar("tab2")
}.vertical(true)
}
} @Entry
@Component
struct Index {
build() {
Tabs() {
TabContent() {
}.tabBar("tab1")
TabContent() {
}.tabBar("tab2")
}
}
} plugin:@cross-device-app-dev/recommended plugin:@cross-device-app-dev/all
For details about how to configure Code Linter check rules, see Code Linter.