O vue. Js, how to create a function
<meta charset="UTF-8">
Books management system management system & lt;/title>
<body>
Book number: & lt; Input type="text" v - model="a" & gt;
Book name: & lt; Input type="text" v - model="b" & gt;
Book prices: & lt; Input type="text" v - model="c" & gt;
Press: & lt; The select v - model="d" & gt;
Book number & lt;/th>
| The book name & lt;/th>
| Book prices & lt;/th>
| Press & lt;/th>
| Operation & lt;/th>
|
|
{{p.i d}} & lt;/td>
| {{p.n ame}} & lt;/td>
| {{p.p rice}} & lt;/td>
| {{p.c bs}} & lt;/td>
| |
<script>
Var=new vm Vue ({
El: "# app,"
Data: {
The message: "the books management system management system",
Prop: [{id: "1", the name: "vue. Js," price: "45", CBS: "high press"},
{id: "2", the name: "the MySQL database," price: "48," CBS: "people's posts and telecommunications publishing house"},
{id: "3", the name: "Java foundation," price: "35", CBS: "tsinghua university press"}
],
A: "'
B: "'
C: "'
D: "'
},
Methods: {
Create: function () {
This. Prop. Push ({id: enclosing a, name: this. B, price: this. C, CBS: this. D})
},
//resetLoginForm: function () {
//
//this. $refs. LoginFormRef. ResetFields ()
//},
Delect: function (index) {
This. Prop. Splice (index, 1);
},
//amend: the function () {
//this. Prop
//}
}
})
</script>