Skip to content

Commit f6ee24a

Browse files
committed
remove isLiteral option
1 parent ce4342b commit f6ee24a

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

src/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ CompilerProto.bindDirective = function (directive) {
435435

436436
// for empty or literal directives, simply call its bind()
437437
// and we're done.
438-
if (directive.isEmpty || directive.isLiteral) {
438+
if (directive.isEmpty || !directive._update) {
439439
if (directive.bind) directive.bind()
440440
return
441441
}

src/directive.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ function Directive (definition, expression, rawKey, compiler, node) {
4848
return
4949
}
5050

51-
// for literal directives, all we need
52-
// is the expression as the value.
53-
if (this.isLiteral) {
54-
this.value = expression.trim()
55-
return
56-
}
57-
5851
this.expression = expression.trim()
5952
this.rawKey = rawKey
6053

src/directives/repeat.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@ module.exports = {
220220
}
221221
})
222222
}
223-
// in case `$destroy` is called directly on a repeated vm
224-
// make sure the vm's data is properly removed
225-
// item.$compiler.observer.on('hook:afterDestroy', function () {
226-
// col.remove(data)
227-
// })
228223
}
229224
},
230225

test/functional/specs/repeated-items.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* global items */
2-
31
casper.test.begin('Repeated Items', 41, function (test) {
42

53
casper

test/unit/specs/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ describe('UNIT: API', function () {
142142
assert.notOk(el.getAttribute(testId + 'bind'), 'should have called unbind()')
143143
})
144144

145-
it('should create literal directive if given option', function () {
145+
it('should not bind directive if no update() is provided', function () {
146146
var called = false
147147
Vue.directive('test-literal', {
148-
isLiteral: true,
149148
bind: function () {
150149
called = true
151-
assert.strictEqual(this.value, 'hihi')
150+
assert.strictEqual(this.expression, 'hihi')
151+
assert.notOk(this.binding)
152152
}
153153
})
154154
new Vue({

0 commit comments

Comments
 (0)