Skip to content

Commit 9780be8

Browse files
committed
remove warning for v-el; add warning for v-class and v-style
1 parent 05c51bb commit 9780be8

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

src/compiler/compile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,10 @@ function compileDirectives (attrs, options) {
585585
_.deprecation.V_TRANSITION()
586586
} else if (dirName === 'attr') {
587587
_.deprecation.V_ATTR()
588-
} else if (dirName === 'el') {
589-
_.deprecation.V_EL()
588+
} else if (dirName === 'class') {
589+
_.deprecation.V_CLASS()
590+
} else if (dirName === 'style') {
591+
_.deprecation.V_STYLE()
590592
}
591593

592594
}

src/deprecations.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if (process.env.NODE_ENV !== 'production') {
55
_.warn('{DEPRECATION} ' + msg)
66
}
77

8-
var newBindingSyntaxLink = ' See https://github.com/yyx990803/vue/issues/1173 for details.'
8+
var newBindingSyntaxLink = ' See https://github.com/yyx990803/vue/issues/1325 for details.'
99

1010
_.deprecation = {
1111

@@ -59,13 +59,6 @@ if (process.env.NODE_ENV !== 'production') {
5959
)
6060
},
6161

62-
V_EL: function () {
63-
warn(
64-
'v-el will no longer be a directive in 1.0.0. Use the "$$.id" special syntax instead. ' +
65-
'See https://github.com/yyx990803/vue/issues/1292 for details.'
66-
)
67-
},
68-
6962
DIR_ARGS: function (exp) {
7063
warn(
7164
exp + ': Directive arguments will be moved into the attribute name in 1.0.0 - ' +
@@ -102,6 +95,20 @@ if (process.env.NODE_ENV !== 'production') {
10295
)
10396
},
10497

98+
V_CLASS: function () {
99+
warn(
100+
'v-class will be deprecated in 1.0.0. Use v-bind:class or just :class instead.' +
101+
newBindingSyntaxLink
102+
)
103+
},
104+
105+
V_STYLE: function () {
106+
warn(
107+
'v-style will be deprecated in 1.0.0. Use v-bind:style or just :style instead.' +
108+
newBindingSyntaxLink
109+
)
110+
},
111+
105112
ATTR_INTERPOLATION: function (name, value) {
106113
warn(
107114
'Mustache interpolations inside attributes: ' + name + '="' + value + '". ' +

0 commit comments

Comments
 (0)