Skip to content

Commit 088fec3

Browse files
committed
warn deprecated is="{{view}}" syntax
1 parent 27f5c11 commit 088fec3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/deprecations.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ if (process.env.NODE_ENV !== 'production') {
149149
'Computed property "' + name + '": computed properties are not cached by ' +
150150
'default in 1.0.0. You only need to enable cache for particularly expensive ones.'
151151
)
152+
},
153+
154+
BIND_IS: function () {
155+
warn(
156+
'<component is="{{view}}"> syntax will be depreacted in 1.0.0. Use ' +
157+
'<component bind-is="view"> instead.'
158+
)
152159
}
153160

154161
}

src/util/component.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ exports.checkComponent = function (el, options) {
1616
// dynamic syntax
1717
var exp = el.getAttribute('is')
1818
if (exp != null) {
19+
if (process.env.NODE_ENV !== 'production' && /{{.*}}/.test(exp)) {
20+
_.deprecation.BIND_IS()
21+
}
1922
el.removeAttribute('is')
2023
} else {
2124
exp = el.getAttribute('bind-is')

0 commit comments

Comments
 (0)