-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemartjs2.js
48 lines (27 loc) · 995 Bytes
/
codemartjs2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
var totalsold=0
var app1 = new Vue({
el: '#app1',
data: {
date:'' + new Date().toLocaleString(),
pizzasold:'10',
sold1:'',
selected:'Pizza sause',
todo1:[],
todo2:[],
options: [
{ text: 'Fresh Dough', value: 'Fresh Dough' },
{ text: 'Cheese', value: 'Cheese' },
{ text: 'Pizza sause', value: 'Pizza sause'},
{text: 'Thin Crust', value: 'Thin Crust'},
{text: 'Gluten-Free Dough', value: 'Gluten-Free Dough'}
]
},methods:{
solditems:function(){
var date=new Date();
app1.todo2.push({"u":this.selected,"v":this.pizzasold});
totalsold=totalsold+parseInt(this.pizzasold);
this.sold1=totalsold
app1.todo1.push({"x":this.date,"y":totalsold,"z":this.selected});
}
}
});