mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(all): enable strictPropertyInitialization
This commit is contained in:
@ -11,28 +11,28 @@ export class Tabs implements NavOutlet {
|
||||
|
||||
private ids = -1;
|
||||
private transitioning = false;
|
||||
private tabsId: number = (++tabIds);
|
||||
private leavingTab: HTMLIonTabElement | undefined;
|
||||
private tabsId = (++tabIds);
|
||||
private leavingTab?: HTMLIonTabElement;
|
||||
|
||||
@Element() el: HTMLElement;
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
@State() tabs: HTMLIonTabElement[] = [];
|
||||
@State() selectedTab: HTMLIonTabElement | undefined;
|
||||
@State() selectedTab?: HTMLIonTabElement;
|
||||
|
||||
@Prop({ context: 'config' }) config: Config;
|
||||
@Prop({ context: 'document' }) doc: Document;
|
||||
@Prop({ context: 'config' }) config!: Config;
|
||||
@Prop({ context: 'document' }) doc!: Document;
|
||||
|
||||
/**
|
||||
* The color to use from your Sass `$colors` map.
|
||||
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
* For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
*/
|
||||
@Prop() color: string;
|
||||
@Prop() color!: string;
|
||||
|
||||
/**
|
||||
* A unique name for the tabs
|
||||
*/
|
||||
@Prop() name: string;
|
||||
@Prop() name?: string;
|
||||
|
||||
/**
|
||||
* If true, the tabbar
|
||||
@ -42,17 +42,17 @@ export class Tabs implements NavOutlet {
|
||||
/**
|
||||
* Set the tabbar layout: `icon-top`, `icon-start`, `icon-end`, `icon-bottom`, `icon-hide`, `title-hide`.
|
||||
*/
|
||||
@Prop({ mutable: true }) tabbarLayout: string;
|
||||
@Prop({ mutable: true }) tabbarLayout?: string;
|
||||
|
||||
/**
|
||||
* Set position of the tabbar: `top`, `bottom`.
|
||||
*/
|
||||
@Prop({ mutable: true }) tabbarPlacement: string;
|
||||
@Prop({ mutable: true }) tabbarPlacement?: string;
|
||||
|
||||
/**
|
||||
* If true, show the tab highlight bar under the selected tab.
|
||||
*/
|
||||
@Prop({ mutable: true }) tabbarHighlight: boolean;
|
||||
@Prop({ mutable: true }) tabbarHighlight?: boolean;
|
||||
|
||||
/**
|
||||
* If true, the tabs will be translucent.
|
||||
@ -64,14 +64,14 @@ export class Tabs implements NavOutlet {
|
||||
|
||||
@Prop() scrollable = false;
|
||||
|
||||
@Prop({ mutable: true }) useRouter: boolean;
|
||||
@Prop({ mutable: true }) useRouter = false;
|
||||
|
||||
/**
|
||||
* Emitted when the tab changes.
|
||||
*/
|
||||
@Event() ionChange: EventEmitter;
|
||||
@Event() ionNavWillChange: EventEmitter<void>;
|
||||
@Event() ionNavDidChange: EventEmitter<void>;
|
||||
@Event() ionChange!: EventEmitter;
|
||||
@Event() ionNavWillChange!: EventEmitter<void>;
|
||||
@Event() ionNavDidChange!: EventEmitter<void>;
|
||||
|
||||
componentWillLoad() {
|
||||
if (!this.useRouter) {
|
||||
|
||||
@ -10,7 +10,7 @@ export interface Route {
|
||||
})
|
||||
export class TranslucentPageTab {
|
||||
|
||||
@Element() element: HTMLElement;
|
||||
@Element() element!: HTMLElement;
|
||||
|
||||
getTabs() {
|
||||
return this.element.closest('ion-tabs');
|
||||
|
||||
Reference in New Issue
Block a user