Skip to content

Commit ef048f4

Browse files
committed
test: add test app for v-show
1 parent 3e50a90 commit ef048f4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

samples/app/v-show.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const Vue = require('./nativescript-vue')
2+
3+
Vue.config.debug = true
4+
Vue.config.silent = false
5+
6+
new Vue({
7+
data: {
8+
foo: true
9+
},
10+
template: `
11+
<Frame>
12+
<Page>
13+
<ActionBar title="Issue #127" />
14+
15+
<StackLayout>
16+
<Button @tap="foo = !foo" :text="foo"/>
17+
<Label v-show="foo" text="Enable" @tap="foo = false" style="padding: 50; background: red;"/>
18+
<Label v-show="!foo" text="Disable" @tap="foo = true" style="padding: 50; background: blue;"/>
19+
</StackLayout>
20+
</Page>
21+
</Frame>
22+
`,
23+
created() {
24+
console.log(Vue.compile(this.$options.template).render.toString())
25+
}
26+
}).$start()

0 commit comments

Comments
 (0)