实现表单异步提交并显示消息

This commit is contained in:
F嘉阳
2018-02-08 10:32:34 +08:00
parent 06ba589dfd
commit 213cad2a74
14 changed files with 490 additions and 24 deletions

View File

@@ -0,0 +1,46 @@
var Main = {
data() {
return {
activeIndex: '1',
formInline: {
user: '',
region: ''
},
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
feedbackData:[
{
content:'bug',
time:'2018-2-3',
username:'root'
}
],
logData:[
{
ip:'127.0.0.1',
header:'bug',
time:'2018-2-3',
username:'root'
}
],
}
},
methods: {
handleSelect(key, keyPath) {
console.log(key, keyPath);
},
onSubmit() {
console.log('submit!');
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')