Skip to content

Commit

Permalink
阻止默认的点击表单提交执行 closes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
409915016 committed Nov 15, 2020
1 parent f3c277a commit 8bb1fc6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/pages/init/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ new Vue({
openSimpleModal(
'Error',
err.message,
`<button class="btn btn-primary" role="button">OK</button>`
`<button class="btn btn-primary" type="button" role="button">OK</button>`
)
})
}
}
})
})
4 changes: 2 additions & 2 deletions src/router-components/admin/Album.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@

<div class="form-group">
<div class="btn-group mr-2" role="group">
<button class="btn btn-primary" @click="submit">
<button class="btn btn-primary" type="button" @click="submit">
<span class="fa fa-check" aria-hidden="true"></span>
{{ "finish" | i18n }}
</button>
</div>

<div class="btn-group mr-2" role="group">
<button class="btn btn-danger" @click="Delete" v-if="!newer">
<button class="btn btn-danger" type="button" @click="Delete" v-if="!newer">
<span class="fa fa-remove"></span>
{{ "delete" | i18n }}
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/router-components/admin/Albums.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="input-group mb-3">
<input type="text" class="form-control" v-model="query" />
<div class="input-group-append">
<button class="btn" @click="search">
<button class="btn" type="button" @click="search">
<span class="fa fa-search" aria-hidden="true"></span>
{{ "search" | i18n }}
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/router-components/admin/Categories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="input-group mb-3">
<input type="text" class="form-control" v-model="query" />
<div class="input-group-append">
<button class="btn" @click="search">
<button class="btn" type="button" @click="search">
<span
class="fa fa-search"
aria-hidden="true"
Expand Down
4 changes: 2 additions & 2 deletions src/router-components/admin/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@

<div class="form-group">
<div class="btn-group mr-2" role="group">
<button class="btn btn-primary" @click="submit">
<button class="btn btn-primary" type="button" @click="submit">
<span class="fa fa-check" aria-hidden="true"></span>
{{ "finish" | i18n }}
</button>
</div>

<div class="btn-group mr-2" role="group">
<button class="btn btn-danger" @click="Delete" v-if="category._key">
<button class="btn btn-danger" type="button" @click="Delete" v-if="category._key">
<span class="fa fa-remove"></span>
{{ "delete" | i18n }}
</button>
Expand Down

0 comments on commit 8bb1fc6

Please sign in to comment.