We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6528a4 commit c80b78bCopy full SHA for c80b78b
src/directives/public/show.js
@@ -1,24 +1,24 @@
1
import { attr } from '../../util'
2
import { applyTransition } from '../../transition'
3
4
-module.exports = {
+export default {
5
6
- bind: function () {
+ bind () {
7
// check else block
8
var next = this.el.nextElementSibling
9
if (next && attr(next, 'v-else') !== null) {
10
this.elseEl = next
11
}
12
},
13
14
- update: function (value) {
+ update (value) {
15
this.apply(this.el, value)
16
if (this.elseEl) {
17
this.apply(this.elseEl, !value)
18
19
20
21
- apply: function (el, value) {
+ apply (el, value) {
22
applyTransition(el, value ? 1 : -1, function () {
23
el.style.display = value ? '' : 'none'
24
}, this.vm)
0 commit comments