Procházet zdrojové kódy

remove v-ref deprecation warning

Evan You před 10 roky
rodič
revize
84de2bcdca

+ 0 - 8
src/deprecations.js

@@ -23,14 +23,6 @@ if (process.env.NODE_ENV !== 'production') {
       )
     },
 
-    V_REF: function () {
-      warn(
-        'v-ref will no longer be a directive in 1.0.0; It will become a ' +
-        'special attribute without the prefix. Use "ref" instead.' +
-        newBindingSyntaxLink
-      )
-    },
-
     PARTIAL_NAME: function (id) {
       warn(
         '<partial name="' + id + '">: mustache interpolations inside attributes ' +

+ 2 - 8
src/directives/public/for.js

@@ -48,14 +48,8 @@ module.exports = {
     // check for trackby param
     this.idKey = this.param('track-by')
 
-    // TODO: only check ref in 1.0.0
-    // check v-ref
-    var ref = this.param(config.prefix + 'ref')
-    /* istanbul ignore if */
-    if (process.env.NODE_ENV !== 'production' && ref) {
-      _.deprecation.V_REF()
-    }
-    this.ref = ref || this.param('ref')
+    // check ref
+    this.ref = this.param('ref')
 
     // check for transition stagger
     var stagger = +this.param('stagger')

+ 1 - 1
test/unit/specs/misc_spec.js

@@ -34,7 +34,7 @@ describe('Misc', function () {
     var spy1 = jasmine.createSpy('attached')
     var spy2 = jasmine.createSpy('detached')
     var el = document.createElement('div')
-    el.innerHTML = '<outer v-ref="outter"><inner></inner></outer>'
+    el.innerHTML = '<outer ref="outter"><inner></inner></outer>'
     document.body.appendChild(el)
 
     var vm = new Vue({