Skip to content

Commit b18252f

Browse files
committed
fix deprecation warnings
1 parent 6f8e6b3 commit b18252f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/deprecations.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ if (process.env.NODE_ENV !== 'production') {
106106
warn(
107107
'Mustache interpolations inside attributes: ' + name + '="' + value + '". ' +
108108
'This will be deprecated in 1.0.0. ' +
109-
'Use the "bind-" syntax instead.' + newBindingSyntaxLink
109+
'Use v-bind:attr="expression" instead.' + newBindingSyntaxLink
110110
)
111111
},
112112

113113
PROPS: function (attr, value) {
114114
warn(
115115
'Prop ' + attr + '="' + value + '": props no longer use mustache tags ' +
116-
'to indicate a dynamic binding. Use the "bind-" prefix instead.' +
117-
newBindingSyntaxLink
116+
'to indicate a dynamic binding. Use the "v-bind:prop-name" or the colon ' +
117+
'shorthand instead.' + newBindingSyntaxLink
118118
)
119119
},
120120

@@ -129,21 +129,23 @@ if (process.env.NODE_ENV !== 'production') {
129129
warn(
130130
'Prop ' + attr + '="' + value + '": literal props will no longer be ' +
131131
'auto-casted into booleans/numbers in 1.0.0 - they will all be treated ' +
132-
'as literal strings. Use "bind-" syntax for boolean/number literals instead.'
132+
'as literal strings. Use "v-bind" or the colon shorthand for ' +
133+
'boolean/number literals instead.'
133134
)
134135
},
135136

136137
BIND_IS: function () {
137138
warn(
138139
'<component is="{{view}}"> syntax will be deprecated in 1.0.0. Use ' +
139-
'<component bind-is="view"> instead.'
140+
'<component v-bind:is="view"> or <component :is="view"> instead.'
140141
)
141142
},
142143

143144
PARTIAL_NAME: function (id) {
144145
warn(
145146
'<partial name="' + id + '">: mustache interpolations inside attributes ' +
146-
'will be deprecated in 1.0.0. Use bind-name="expression" instead.'
147+
'will be deprecated in 1.0.0. Use v-bind:name="expression" or just ' +
148+
':name="expression" instead.'
147149
)
148150
},
149151

@@ -173,7 +175,7 @@ if (process.env.NODE_ENV !== 'production') {
173175
MODEL_EXP: function (exp) {
174176
warn(
175177
'Params "exp", "true-exp" and "false-exp" for v-model will be deprecated in 1.0.0. ' +
176-
'Use "bind-value", "bind-true-value" and "bind-false-value" instead.'
178+
'Use "v-bind:value", "v-bind:true-value" and "v-bind:false-value" instead.'
177179
)
178180
},
179181

0 commit comments

Comments
 (0)