chore(vue): add eslint and prettier (#26635)

This commit is contained in:
Liam DeBeasi
2023-01-18 18:29:25 -05:00
committed by GitHub
parent 6d4c52aa5b
commit dc27736bd5
25 changed files with 5693 additions and 574 deletions

View File

@ -1,10 +1,15 @@
import { h, defineComponent, inject } from 'vue';
import { defineCustomElement } from '@ionic/core/components/ion-tab-button.js';
import { defineCustomElement } from "@ionic/core/components/ion-tab-button.js";
import { h, defineComponent, inject } from "vue";
export const IonTabButton = /*@__PURE__*/ defineComponent({
name: 'IonTabButton',
name: "IonTabButton",
props: {
_getTabState: { type: Function, default: () => { return {} } },
_getTabState: {
type: Function,
default: () => {
return {};
},
},
disabled: Boolean,
download: String,
href: String,
@ -12,13 +17,13 @@ export const IonTabButton = /*@__PURE__*/ defineComponent({
layout: String,
selected: Boolean,
tab: String,
target: String
target: String,
},
setup(props, { slots }) {
defineCustomElement();
// TODO(FW-2969): type
const ionRouter: any = inject('navManager');
const ionRouter: any = inject("navManager");
const onClick = (ev: Event) => {
if (ev.cancelable) {
ev.preventDefault();
@ -50,18 +55,18 @@ export const IonTabButton = /*@__PURE__*/ defineComponent({
ionRouter.resetTab(tab);
}
} else {
ionRouter.changeTab(tab, currentHref)
ionRouter.changeTab(tab, currentHref);
}
};
return () => {
return h(
'ion-tab-button',
"ion-tab-button",
{
onClick,
...props
...props,
},
slots.default && slots.default()
)
}
}
);
};
},
});