Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix problematic use of 'deprecated' in warnings #4043

Merged
merged 1 commit into from
Nov 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function processAttrs (el) {
if (expression) {
warn(
`${name}="${value}": ` +
'Interpolation inside attributes has been deprecated. ' +
'Interpolation inside attributes has been removed. ' +
'Use v-bind or the colon shorthand instead. For example, ' +
'instead of <div id="{{ val }}">, use <div :id="val">.'
)
Expand Down
5 changes: 3 additions & 2 deletions src/platforms/web/compiler/modules/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ function transformNode (el: ASTElement, options: CompilerOptions) {
if (expression) {
warn(
`class="${staticClass}": ` +
'Interpolation inside attributes has been deprecated. ' +
'Use v-bind or the colon shorthand instead.'
'Interpolation inside attributes has been removed. ' +
'Use v-bind or the colon shorthand instead. For example, ' +
'instead of <div class="{{ val }}">, use <div :class="val">.'
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/unit/modules/compiler/parser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('parser', () => {
expect(ast2.classBinding).toBe('class1')
// interpolation warning
parse('<p class="{{error}}">hello world</p>', baseOptions)
expect('Interpolation inside attributes has been deprecated').toHaveBeenWarned()
expect('Interpolation inside attributes has been removed').toHaveBeenWarned()
})

it('style binding', () => {
Expand Down Expand Up @@ -318,7 +318,7 @@ describe('parser', () => {
expect(ast1.attrs[2].value).toBe('"hello world"')
// interpolation warning
parse('<input type="text" name="field1" value="{{msg}}">', baseOptions)
expect('Interpolation inside attributes has been deprecated').toHaveBeenWarned()
expect('Interpolation inside attributes has been removed').toHaveBeenWarned()
})

if (!isIE) {
Expand Down