feat(vue): add ionic vue beta (#22062)

This commit is contained in:
Liam DeBeasi
2020-09-10 15:20:49 -04:00
committed by GitHub
parent 74af3cb50b
commit 5ffa65f84a
48 changed files with 3949 additions and 26 deletions

View File

@ -0,0 +1,26 @@
import { h, inject, defineComponent } from 'vue';
export const IonBackButton = defineComponent({
name: 'IonBackButton',
setup(_, { attrs, slots }) {
const ionRouter: any = inject('navManager');
const onClick = () => {
const defaultHref = attrs['default-href'] || attrs['defaultHref'];
const routerAnimation = attrs['router-animation'] || attrs['routerAnimation'];
ionRouter.handleNavigateBack(defaultHref, routerAnimation);
}
return () => {
return h(
'ion-back-button',
{
onClick,
...attrs
},
slots.default && slots.default()
)
}
}
});