Fix: Should not use 'form' element to avoid request-cancel

Also fix default value for privacy option of board and pin.

Ref: https://stackoverflow.com/questions/12009423/what-does-status-canceled-for-a-resource-mean-in-chrome-developer-tools
This commit is contained in:
winkidney
2020-03-05 12:19:31 +08:00
parent 4afe16253e
commit 144c816be3
5 changed files with 14 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="board-modal">
<form action="">
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">{{ UIMeta.title }}</p>
@@ -61,7 +61,7 @@
</button>
</footer>
</div>
</form>
</div>
</div>
</template>
@@ -101,6 +101,8 @@ export default {
if (this.isEdit) {
this.UIMeta.title = 'Board Edit';
this.editModel.assignToForm(this.board);
} else {
this.createModel.form.private.value = false;
}
},
methods: {

View File

@@ -1,6 +1,6 @@
<template>
<div class="login-modal">
<form action="">
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">Login</p>
@@ -38,7 +38,7 @@
class="button is-primary">Login</button>
</footer>
</div>
</form>
</div>
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div class="signup-modal">
<form action="">
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">Sign Up</p>
@@ -59,7 +59,7 @@
class="button is-primary">Register</button>
</footer>
</div>
</form>
</div>
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div class="add2board-modal">
<form action="">
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">Add Pin to Board</p>
@@ -28,7 +28,7 @@
</button>
</footer>
</div>
</form>
</div>
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div class="pin-create-modal">
<form action="">
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">{{ editorMeta.title }}</p>
@@ -97,7 +97,7 @@
</button>
</footer>
</div>
</form>
</div>
</div>
</template>
@@ -168,12 +168,13 @@ export default {
this.pinModel.form.description.value = this.existedPin.description;
this.pinModel.form.tags.value = this.existedPin.tags;
this.pinModel.form.private.value = this.existedPin.private;
} else {
this.pinModel.form.private.value = false;
}
if (this.fromUrl) {
this.pinModel.form.url.value = this.fromUrl.url;
this.pinModel.form.referer.value = this.fromUrl.referer;
this.pinModel.form.description.value = this.fromUrl.description;
this.pinModel.form.private.value = false;
}
},
methods: {