Skip to content

Commit 609054e

Browse files
committed
remove bind.prop shorthand
1 parent 0f5bcdf commit 609054e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/parser/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ function processAttrs (el) {
336336
}
337337
if (bindRE.test(name)) { // v-bind
338338
name = name.replace(bindRE, '')
339-
if (name.charAt(0) === ':' || (modifiers && modifiers.prop)) {
339+
if (modifiers && modifiers.prop) {
340340
isProp = true
341-
name = camelize(name.replace(bindRE, ''))
341+
name = camelize(name)
342342
if (name === 'innerHtml') name = 'innerHTML'
343343
}
344344
if (isProp || platformMustUseProp(name)) {

test/unit/features/directives/bind.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('Directive v-bind', () => {
111111

112112
it('bind as prop', () => {
113113
const vm = new Vue({
114-
template: '<div><span v-bind:text-content.prop="foo"></span><span ::inner-html="bar"></span></div>',
114+
template: '<div><span v-bind:text-content.prop="foo"></span><span :inner-html.prop="bar"></span></div>',
115115
data: {
116116
foo: 'hello',
117117
bar: '<span>qux</span>'

0 commit comments

Comments
 (0)