mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
feat(vue): add ionic vue beta (#22062)
This commit is contained in:
45
packages/vue/src/components/IonTabs.ts
Normal file
45
packages/vue/src/components/IonTabs.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import { h, defineComponent } from 'vue';
|
||||
import { IonRouterOutlet } from './IonRouterOutlet';
|
||||
|
||||
export const IonTabs = defineComponent({
|
||||
name: 'IonTabs',
|
||||
render() {
|
||||
const { $slots: slots } = this;
|
||||
return h(
|
||||
'ion-tabs',
|
||||
{
|
||||
style: {
|
||||
'display': 'flex',
|
||||
'position': 'absolute',
|
||||
'top': '0',
|
||||
'left': '0',
|
||||
'right': '0',
|
||||
'bottom': '0',
|
||||
'flex-direction': 'column',
|
||||
'width': '100%',
|
||||
'height': '100%',
|
||||
'contain': 'layout size style',
|
||||
'z-index': '0'
|
||||
},
|
||||
ref: 'ionTabsRef'
|
||||
},
|
||||
[
|
||||
h(
|
||||
'div',
|
||||
{
|
||||
class: 'tabs-inner',
|
||||
style: {
|
||||
'position': 'relative',
|
||||
'flex': '1',
|
||||
'contain': 'layout size style'
|
||||
}
|
||||
},
|
||||
[
|
||||
h(IonRouterOutlet, { tabs: true })
|
||||
]
|
||||
),
|
||||
...slots.default && slots.default()
|
||||
]
|
||||
)
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user