10000 Add `v-show` from #77. · rdlauer/nativescript-vue@69c17bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 69c17bc

Browse files
committed
Add v-show from nativescript-vue#77.
1 parent 462d062 commit 69c17bc

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import show from './show'
12
import view from './view'
23

34
export default {
4-
view: view
5+
show,
6+
view
57
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function show(el, show) {
2+
el.setAttribute('visibility', show ? 'visible' : 'collapsed')
3+
}
4+
5+
export default {
6+
inserted(el, { value }) {
7+
show(el, value)
8+
},
9+
update(el, { value }) {
10+
show(el, value)
11+
}
12+
}

0 commit comments

Comments
 (0)
0