This repository was archived by the owner on Dec 26, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11import Vue from 'vue'
22
33Vue . component ( 'container' , {
4+ props : [ 'state' ] ,
45 template : `
5- <div class="container">
6+ <div class="container" :state="state" >
67 <slot></slot>
78 </div>
89 ` ,
910} )
1011
1112Vue . component ( 'rotator' , {
13+ props : [ 'state' ] ,
1214 template : `
1315 <container>
1416 <v-touch
17+ :enabled="state"
1518 @rotatestart="start"
1619 @rotate="rotate"
1720 @doubletap="reset"
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ Vue.use(VueTouch)
2525new Vue ( {
2626 el : '#app' ,
2727 data : {
28- event : { }
28+ event : { } ,
29+ state : { rotate : true , doubletap : true }
2930 } ,
3031 methods : {
3132 test : function ( e ) {
Original file line number Diff line number Diff line change 2323 </v-touch> -->
2424 < pre > {{event}}</ pre >
2525
26- < rotator >
26+ < rotator :state =" state " >
2727 rotate me!
2828 </ rotator >
29+ < div >
30+ < button @click ="state.doubletap = !state.doubletap "> ({{state.doubletap ? 'enabled' : 'disabled' }})</ button >
31+ </ div >
32+ < pre > {{$data}}</ pre >
2933 </ div >
3034 < script src ="vendor.build.js "> </ script >
3135 < script src ="example.build.js "> </ script >
You can’t perform that action at this time.
0 commit comments