vuejs提交表单
vue2表单加载 (vue2-form-loading)
A VueJS directive can be used with forms in order to disable submit button and make every input readonly after submitting.
VueJS指令可与表单一起使用,以禁用提交按钮并使提交后的每个输入均为只读。
安装 (Installation)
npm install --save vue2-form-loading
用法 (Usage)
import Vue from 'vue'
import formLoading from 'vue2-form-loading'
Vue.use(formLoading)
基本形式 (Basic form)
<form v-loading action="..." method="post">
<input type="text" name="" value="">
<input type="submit" value="Send">
</form>
使用自定义加载文本 (With custom loading text)
<form v-loading="'loading...'" action="..." method="post">
<input type="text" name="" value="">
<input type="submit" value="Send">
</form>
使用布尔玛 (Using Bulma)
<form v-loading="{class:'is-loading'}" action="..." method="...">
.
.
.
<button type="submit" class="button is-primary is-fullwidth">Send</button>
</form>
vuejs提交表单