mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
feat(router-link): add router-link and deprecate anchor (#18620)
This commit is contained in:
60
core/src/components.d.ts
vendored
60
core/src/components.d.ts
vendored
@ -244,10 +244,6 @@ export namespace Components {
|
||||
*/
|
||||
'color'?: Color;
|
||||
/**
|
||||
* This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want).
|
||||
*/
|
||||
'download': string | undefined;
|
||||
/**
|
||||
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
||||
*/
|
||||
'href': string | undefined;
|
||||
@ -259,10 +255,6 @@ export namespace Components {
|
||||
* When using a router, it specifies the transition direction when navigating to another page using `href`.
|
||||
*/
|
||||
'routerDirection': RouterDirection;
|
||||
/**
|
||||
* Specifies where to display the linked URL. Only applies when an `href` is provided. Special keywords: `"_blank"`, `"_self"`, `"_parent"`, `"_top"`.
|
||||
*/
|
||||
'target': string | undefined;
|
||||
}
|
||||
interface IonApp {}
|
||||
interface IonAvatar {}
|
||||
@ -2007,6 +1999,24 @@ export namespace Components {
|
||||
*/
|
||||
'useHash': boolean;
|
||||
}
|
||||
interface IonRouterLink {
|
||||
/**
|
||||
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
|
||||
*/
|
||||
'color'?: Color;
|
||||
/**
|
||||
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
||||
*/
|
||||
'href': string | undefined;
|
||||
/**
|
||||
* Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
|
||||
*/
|
||||
'rel': string | undefined;
|
||||
/**
|
||||
* When using a router, it specifies the transition direction when navigating to another page using `href`.
|
||||
*/
|
||||
'routerDirection': RouterDirection;
|
||||
}
|
||||
interface IonRouterOutlet {
|
||||
/**
|
||||
* If `true`, the router-outlet should animate the transition of components.
|
||||
@ -3160,6 +3170,12 @@ declare global {
|
||||
new (): HTMLIonRouterElement;
|
||||
};
|
||||
|
||||
interface HTMLIonRouterLinkElement extends Components.IonRouterLink, HTMLStencilElement {}
|
||||
var HTMLIonRouterLinkElement: {
|
||||
prototype: HTMLIonRouterLinkElement;
|
||||
new (): HTMLIonRouterLinkElement;
|
||||
};
|
||||
|
||||
interface HTMLIonRouterOutletElement extends Components.IonRouterOutlet, HTMLStencilElement {}
|
||||
var HTMLIonRouterOutletElement: {
|
||||
prototype: HTMLIonRouterOutletElement;
|
||||
@ -3387,6 +3403,7 @@ declare global {
|
||||
'ion-route': HTMLIonRouteElement;
|
||||
'ion-route-redirect': HTMLIonRouteRedirectElement;
|
||||
'ion-router': HTMLIonRouterElement;
|
||||
'ion-router-link': HTMLIonRouterLinkElement;
|
||||
'ion-router-outlet': HTMLIonRouterOutletElement;
|
||||
'ion-row': HTMLIonRowElement;
|
||||
'ion-searchbar': HTMLIonSearchbarElement;
|
||||
@ -3557,10 +3574,6 @@ declare namespace LocalJSX {
|
||||
*/
|
||||
'color'?: Color;
|
||||
/**
|
||||
* This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want).
|
||||
*/
|
||||
'download'?: string | undefined;
|
||||
/**
|
||||
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
||||
*/
|
||||
'href'?: string | undefined;
|
||||
@ -3572,10 +3585,6 @@ declare namespace LocalJSX {
|
||||
* When using a router, it specifies the transition direction when navigating to another page using `href`.
|
||||
*/
|
||||
'routerDirection'?: RouterDirection;
|
||||
/**
|
||||
* Specifies where to display the linked URL. Only applies when an `href` is provided. Special keywords: `"_blank"`, `"_self"`, `"_parent"`, `"_top"`.
|
||||
*/
|
||||
'target'?: string | undefined;
|
||||
}
|
||||
interface IonApp extends JSXBase.HTMLAttributes<HTMLIonAppElement> {}
|
||||
interface IonAvatar extends JSXBase.HTMLAttributes<HTMLIonAvatarElement> {}
|
||||
@ -5218,6 +5227,24 @@ declare namespace LocalJSX {
|
||||
*/
|
||||
'useHash'?: boolean;
|
||||
}
|
||||
interface IonRouterLink extends JSXBase.HTMLAttributes<HTMLIonRouterLinkElement> {
|
||||
/**
|
||||
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
|
||||
*/
|
||||
'color'?: Color;
|
||||
/**
|
||||
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
||||
*/
|
||||
'href'?: string | undefined;
|
||||
/**
|
||||
* Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
|
||||
*/
|
||||
'rel'?: string | undefined;
|
||||
/**
|
||||
* When using a router, it specifies the transition direction when navigating to another page using `href`.
|
||||
*/
|
||||
'routerDirection'?: RouterDirection;
|
||||
}
|
||||
interface IonRouterOutlet extends JSXBase.HTMLAttributes<HTMLIonRouterOutletElement> {
|
||||
/**
|
||||
* If `true`, the router-outlet should animate the transition of components.
|
||||
@ -6036,6 +6063,7 @@ declare namespace LocalJSX {
|
||||
'ion-route': IonRoute;
|
||||
'ion-route-redirect': IonRouteRedirect;
|
||||
'ion-router': IonRouter;
|
||||
'ion-router-link': IonRouterLink;
|
||||
'ion-router-outlet': IonRouterOutlet;
|
||||
'ion-row': IonRow;
|
||||
'ion-searchbar': IonSearchbar;
|
||||
|
Reference in New Issue
Block a user