Skip to content

Commit f7e9d39

Browse files
committed
test(samples): update samples
1 parent 929b11a commit f7e9d39

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

samples/app/127.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ new Vue({
1414
1515
<StackLayout>
1616
<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"/>
1818
</StackLayout>
1919
</Page>
2020
</Frame>

samples/app/220.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Vue.config.silent = false
55

66
const CompButton = {
77
template: `
8-
<Button>{{label}}: {{counter}}</Button>
8+
<Button :text="\`\${label}: \${counter}\`" />
99
`,
1010
name: 'CompButton',
1111
props: ['label', 'counter'],
@@ -19,22 +19,23 @@ new Vue({
1919
counter: 0
2020
},
2121
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" />
2724
<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"/>
3027
</keep-alive>
31-
</StackLayout>
32-
</Page>
33-
</Frame>
28+
</StackLayout>
3429
`,
3530
created() {
3631
console.log(Vue.compile(this.$options.template).render.toString())
3732
},
33+
methods: {
34+
inc() {
35+
console.log('\n\n=========INC=========\n\n')
36+
this.counter++
37+
}
38+
},
3839
components: {
3940
CompButton
4041
}

samples/app/entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./v-show')

samples/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"main": "app-with-all-components.js",
2+
"main": "entry.js",
33
"name": "nativescript-vue-tests",
44
"version": "1.0.1",
55
"android": {

0 commit comments

Comments
 (0)