Skip to content

Commit c80b78b

Browse files
committed
v-show
1 parent b6528a4 commit c80b78b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/directives/public/show.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { attr } from '../../util'
22
import { applyTransition } from '../../transition'
33

4-
module.exports = {
4+
export default {
55

6-
bind: function () {
6+
bind () {
77
// check else block
88
var next = this.el.nextElementSibling
99
if (next && attr(next, 'v-else') !== null) {
1010
this.elseEl = next
1111
}
1212
},
1313

14-
update: function (value) {
14+
update (value) {
1515
this.apply(this.el, value)
1616
if (this.elseEl) {
1717
this.apply(this.elseEl, !value)
1818
}
1919
},
2020

21-
apply: function (el, value) {
21+
apply (el, value) {
2222
applyTransition(el, value ? 1 : -1, function () {
2323
el.style.display = value ? '' : 'none'
2424
}, this.vm)

0 commit comments

Comments
 (0)