mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(button): goback attribute
This commit is contained in:
@@ -83,6 +83,7 @@ export class Button {
|
||||
*/
|
||||
@Prop() mode: 'ios' | 'md';
|
||||
|
||||
@Prop() goBack = false;
|
||||
/**
|
||||
* Emitted when the button has focus.
|
||||
*/
|
||||
@@ -148,7 +149,7 @@ export class Button {
|
||||
disabled={this.disabled}
|
||||
onFocus={this.onFocus.bind(this)}
|
||||
onKeyUp={this.onKeyUp.bind(this)}
|
||||
onClick={(ev) => openURL(this.href, ev)}
|
||||
onClick={(ev) => openURL(this.href, ev, this.goBack)}
|
||||
onBlur={this.onBlur.bind(this)}>
|
||||
<span class='button-inner'>
|
||||
<slot name='icon-only'></slot>
|
||||
|
||||
@@ -119,6 +119,11 @@ button with a border, or to `"solid"`. The default style is `"solid"` except ins
|
||||
a toolbar, where the default is `"clear"`.
|
||||
|
||||
|
||||
#### goBack
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### href
|
||||
|
||||
string
|
||||
@@ -210,6 +215,11 @@ button with a border, or to `"solid"`. The default style is `"solid"` except ins
|
||||
a toolbar, where the default is `"clear"`.
|
||||
|
||||
|
||||
#### go-back
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### href
|
||||
|
||||
string
|
||||
|
||||
Reference in New Issue
Block a user