mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(nav): transitions
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.back-button.can-back-back,
|
||||
.can-go-back > ion-header .back-button,
|
||||
.back-button.show-back-button {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@ -35,15 +35,6 @@ export class BackButton {
|
||||
|
||||
@Element() el: HTMLElement;
|
||||
|
||||
|
||||
hostData() {
|
||||
return {
|
||||
class: {
|
||||
'show-back-button': !!this.defaultHref
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private onClick(ev: Event) {
|
||||
const nav = this.el.closest('ion-nav');
|
||||
if (nav && nav.canGoBack()) {
|
||||
@ -54,6 +45,14 @@ export class BackButton {
|
||||
}
|
||||
}
|
||||
|
||||
hostData() {
|
||||
return {
|
||||
class: {
|
||||
'show-back-button': !!this.defaultHref
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const backButtonIcon = this.icon || this.config.get('backButtonIcon', 'arrow-back');
|
||||
const backButtonText = this.text || this.config.get('backButtonText', this.mode === 'ios' ? 'Back' : '');
|
||||
|
||||
Reference in New Issue
Block a user