The VOnsBackButton component can be used to display a back button in the navigation bar. By default, this component automatically finds its parent VOnsNavigator component and pops a page when pressed. However, this default behavior can be overriden by running event.preventDefault in a click handler (or using Vue’s .prevent shorthand modifier):
<v-ons-back-button @click.prevent="pageStack = [pageStack[0]]"></v-ons-back-button>
The previous code resets the pageStack to its first page instance instead of popping 1 single page. It assumes pageStack variable exists in the current context.
| 名前 | 型 / デフォルト値 | 概要 |
|---|---|---|
| modifier | String | バックボタンの見た目を指定します。 Optional. |
| Name | 概要 |
|---|---|
| material | Material Design style (翻訳中) |
| 名前 | 概要 |
|---|---|
| click | Normal click event. Useful to modify the component default action (pop 1 page). (翻訳中) |
Normal click event. Useful to modify the component default action (pop 1 page). (翻訳中)
| 名前 | 型 | 概要 |
|---|---|---|
| event | Object | Event object. (翻訳中) |
| event.preventDefault | Function | Avoids the default behavior. (翻訳中) |
Onsen UIに関する質問は、Stack Overflowにてonsen-uiタグを付与してください。Onsen UIチームはあなたの問題解決をお手伝いします。
バグ報告や機能要望については、GitHub Issuesに記載をお願いいたします。
あわせて、下記の情報も参考にしてください。