File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ new Vue({
14
14
15
15
<StackLayout>
16
16
<Label v-if="foo" text="Enable" @tap="foo = false"/>
17
- <Label v-else text="Disable" @tap="foo = true"/>
17
+ <Label v-if="!foo" text="Disable" @tap="foo = true"/>
18
18
</StackLayout>
19
19
</Page>
20
20
</Frame>
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Vue.config.silent = false
5
5
6
6
const CompButton = {
7
7
template : `
8
- <Button>{{ label}}: {{ counter}}</Button >
8
+ <Button :text="\`\${ label}: \${ counter}\`" / >
9
9
` ,
10
10
name : 'CompButton' ,
11
11
props : [ 'label' , 'counter' ] ,
@@ -19,22 +19,23 @@ new Vue({
19
19
counter : 0
20
20
} ,
21
21
template : `
22
- <Frame>
23
- <Page>
24
- <ActionBar title="Issue #220" />
25
- <StackLayout>
26
- <Button @tap="counter++">{{counter}}</Button>
22
+ <StackLayout>
23
+ <Button @tap="inc" :text="counter" />
27
24
<keep-alive>
28
- <CompButton v-if="counter % 2" key="odd" label="Odd" :counter="counter" />
29
- <CompButton v-else key="even" label="Even" :counter="counter" />
25
+ <CompButton v-if="counter % 2 === 0 " key="odd" label="Odd" :counter="counter"/>
26
+ <CompButton v-else key="even" label="Even" :counter="counter"/>
30
27
</keep-alive>
31
- </StackLayout>
32
- </Page>
33
- </Frame>
28
+ </StackLayout>
34
29
` ,
35
30
created ( ) {
36
31
console . log ( Vue . compile ( this . $options . template ) . render . toString ( ) )
37
32
} ,
33
+ methods : {
34
+ inc ( ) {
35
+ console . log ( '\n\n=========INC=========\n\n' )
36
+ this . counter ++
37
+ }
38
+ } ,
38
39
components : {
39
40
CompButton
40
41
}
Original file line number Diff line number Diff line change
1
+ require ( './v-show' )
Original file line number Diff line number Diff line change 1
1
{
2
- "main" : " app-with-all-components .js" ,
2
+ "main" : " entry .js" ,
3
3
"name" : " nativescript-vue-tests" ,
4
4
"version" : " 1.0.1" ,
5
5
"android" : {
You can’t perform that action at this time.
0 commit comments