From 0f3ed32ec43da5a7f163db8bc40908e9af9374ac Mon Sep 17 00:00:00 2001 From: kimhorng Date: Mon, 11 Mar 2019 11:01:18 +0700 Subject: [PATCH] Vue value --- index.html | 10 ++++++++-- index.js | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 index.js diff --git a/index.html b/index.html index b43db43..d82ce7f 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,13 @@ -
- +
+

{{item}}

+ + +
+ + diff --git a/index.js b/index.js new file mode 100644 index 0000000..e4e9b01 --- /dev/null +++ b/index.js @@ -0,0 +1,14 @@ +var app = new Vue({ + el : '#app', + data: { + item: 0, + }, + methods:{ + incre(){ + this.item+=1; + }, + decre(){ + this.item-=1; + } + } +}); \ No newline at end of file