Skip to content

fix(vue): update output target and resolve type issues #30239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweak
  • Loading branch information
christian-bromann committed Mar 11, 2025
commit 944de97198841e201a5b2ecf46e9e3bc6e57411a
58 changes: 38 additions & 20 deletions packages/vue/src/components/IonNav.ts
Original file line number Diff line number Diff line change
@@ -1,27 +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({
name: "IonNav",
/**
* The default values follow what is defined at
* https://ionicframework.com/docs/api/nav#properties
* otherwise the default values on the Web Component
* may be overridden. For example, if the default animated value
* is not `true` below, then Vue would default the prop to `false`
* which would override the Web Component default of `true`.
*/
props: {
animated: Boolean,
animation: Function,
root: [Function, Object, String],
rootParams: Object,
swipeGesture: Boolean,
},
setup(props) {
export const IonNav = /*@__PURE__*/ defineComponent<JSX.IonNav>(
(props: JSX.IonNav) => {
defineCustomElement();
const views = shallowRef([]);

Expand All @@ -39,4 +24,37 @@ export const IonNav = /*@__PURE__*/ defineComponent({
return h("ion-nav", { ...props, delegate }, views.value);
};
},
});
{
name: "IonNav",
/**
* The default values follow what is defined at
* https://ionicframework.com/docs/api/nav#properties
* otherwise the default values on the Web Component
* may be overridden. For example, if the default animated value
* is not `true` below, then Vue would default the prop to `false`
* which would override the Web Component default of `true`.
*/
props: {
animated: {
type: Boolean,
default: true,
},
animation: {
type: Function as unknown as PropType<AnimationBuilder>,
default: undefined,
},
root: {
type: [Function, Object, String],
default: undefined,
},
rootParams: {
type: Object,
default: undefined,
},
swipeGesture: {
type: Boolean,
default: undefined,
},
},
}
);