mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(vue): update output target and resolve type issues (#30239)
Issue number: fixes #30179 --------- ## What is the current behavior? There have been issues reported on version 8.4.3 related to the type information changing for Vue ## What is the new behavior? This patch updates the Vue components to be correctly types using a new version of the output target. ## Does this introduce a breaking change? - [ ] Yes - [x] No
This commit is contained in:

committed by
GitHub

parent
11554a5d35
commit
6dcb143307
@ -1,23 +1,12 @@
|
||||
import type { JSX } from "@ionic/core/components";
|
||||
import { defineCustomElement } from "ionicons/components/ion-icon.js";
|
||||
import type { PropType } from "vue";
|
||||
import { h, defineComponent } from "vue";
|
||||
|
||||
import { getConfig } from "../utils";
|
||||
|
||||
export const IonIcon = /*@__PURE__*/ defineComponent({
|
||||
name: "IonIcon",
|
||||
props: {
|
||||
color: String,
|
||||
flipRtl: Boolean,
|
||||
icon: String,
|
||||
ios: String,
|
||||
lazy: String,
|
||||
md: String,
|
||||
mode: String,
|
||||
name: String,
|
||||
size: String,
|
||||
src: String,
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
export const IonIcon = /*@__PURE__*/ defineComponent<JSX.IonIcon>(
|
||||
(props, { slots }) => {
|
||||
defineCustomElement();
|
||||
return () => {
|
||||
const { icon, ios, md, mode } = props;
|
||||
@ -47,4 +36,19 @@ export const IonIcon = /*@__PURE__*/ defineComponent({
|
||||
);
|
||||
};
|
||||
},
|
||||
});
|
||||
{
|
||||
name: "IonIcon",
|
||||
props: {
|
||||
color: { type: String as PropType<string> },
|
||||
flipRtl: { type: Boolean as PropType<boolean> },
|
||||
icon: { type: String as PropType<string> },
|
||||
ios: { type: String as PropType<string> },
|
||||
lazy: { type: Boolean as PropType<boolean> },
|
||||
md: { type: String as PropType<string> },
|
||||
mode: { type: String as PropType<string> },
|
||||
name: { type: String as PropType<string> },
|
||||
size: { type: String as PropType<string> },
|
||||
src: { type: String as PropType<string> },
|
||||
},
|
||||
}
|
||||
);
|
||||
|
@ -1,11 +1,12 @@
|
||||
import type { JSX, AnimationBuilder } from "@ionic/core/components";
|
||||
import { defineCustomElement } from "@ionic/core/components/ion-nav.js";
|
||||
import type { VNode } from "vue";
|
||||
import type { VNode, PropType } from "vue";
|
||||
import { defineComponent, h, shallowRef } from "vue";
|
||||
|
||||
import { VueDelegate } from "../framework-delegate";
|
||||
|
||||
export const IonNav = /*@__PURE__*/ defineComponent(
|
||||
(props) => {
|
||||
export const IonNav = /*@__PURE__*/ defineComponent<JSX.IonNav>(
|
||||
(props: JSX.IonNav) => {
|
||||
defineCustomElement();
|
||||
const views = shallowRef([]);
|
||||
|
||||
@ -39,7 +40,7 @@ export const IonNav = /*@__PURE__*/ defineComponent(
|
||||
default: true,
|
||||
},
|
||||
animation: {
|
||||
type: Function,
|
||||
type: Function as unknown as PropType<AnimationBuilder>,
|
||||
default: undefined,
|
||||
},
|
||||
root: {
|
||||
|
Reference in New Issue
Block a user