2
0
Evan You 10 жил өмнө
parent
commit
6d4f23cb56

+ 7 - 2
dist/vue.common.js

@@ -194,6 +194,11 @@ var config = {
    */
   errorHandler: null,
 
+  /**
+   * Ignore certain custom elements
+   */
+  ignoredElements: null,
+
   /**
    * Check if a tag is reserved so that it cannot be registered as a
    * component. This is platform-dependent and may be overwritten.
@@ -1801,7 +1806,7 @@ function renderElement(tag, data, namespace) {
       return createComponent(Ctor, data, parent, context, host, tag);
     } else {
       if (process.env.NODE_ENV !== 'production') {
-        if (!namespace && config.isUnknownElement(tag)) {
+        if (!namespace && !(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) && config.isUnknownElement(tag)) {
           warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.');
         }
       }
@@ -2752,7 +2757,7 @@ Object.defineProperty(Vue.prototype, '$isServer', {
   }
 });
 
-Vue.version = '2.0.0-alpha.3';
+Vue.version = '2.0.0-alpha.4';
 
 // attributes that should be using props for binding
 var mustUseProp = makeMap('value,selected,checked,muted');

+ 9 - 4
dist/vue.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.0.0-alpha.3
+ * Vue.js v2.0.0-alpha.4
  * (c) 2014-2016 Evan You
  * Released under the MIT License.
  */
@@ -203,6 +203,11 @@
      */
     errorHandler: null,
 
+    /**
+     * Ignore certain custom elements
+     */
+    ignoredElements: null,
+
     /**
      * Check if a tag is reserved so that it cannot be registered as a
      * component. This is platform-dependent and may be overwritten.
@@ -1808,7 +1813,7 @@
         return createComponent(Ctor, data, parent, context, host, tag);
       } else {
         if ("development" !== 'production') {
-          if (!namespace && config.isUnknownElement(tag)) {
+          if (!namespace && !(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) && config.isUnknownElement(tag)) {
             warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.');
           }
         }
@@ -2757,7 +2762,7 @@
     }
   });
 
-  Vue.version = '2.0.0-alpha.3';
+  Vue.version = '2.0.0-alpha.4';
 
   // attributes that should be using props for binding
   var mustUseProp = makeMap('value,selected,checked,muted');
@@ -5584,7 +5589,7 @@ var nodeOps = Object.freeze({
   // operators like typeof, instanceof and in are allowed
   var prohibitedKeywordRE = new RegExp('\\b' + ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + 'super,throw,while,yield,delete,export,import,return,switch,default,' + 'extends,finally,continue,debugger,function,arguments').split(',').join('\\b|\\b') + '\\b');
   // check valid identifier for v-for
-  var identRE = /[^\w$\.](?:[A-Za-z_$][\w$]*)/;
+  var identRE = /[A-Za-z_$][\w$]*/;
 
   // detect problematic expressions in a template
   function detectErrors(ast) {

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 1
dist/vue.min.js


+ 6 - 1
packages/vue-server-renderer/index.js

@@ -460,6 +460,11 @@ var config = {
    */
   errorHandler: null,
 
+  /**
+   * Ignore certain custom elements
+   */
+  ignoredElements: null,
+
   /**
    * Check if a tag is reserved so that it cannot be registered as a
    * component. This is platform-dependent and may be overwritten.
@@ -1943,7 +1948,7 @@ function renderElement(tag, data, namespace) {
       return createComponent(Ctor, data, parent, context, host, tag);
     } else {
       if (process.env.NODE_ENV !== 'production') {
-        if (!namespace && config.isUnknownElement(tag)) {
+        if (!namespace && !(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) && config.isUnknownElement(tag)) {
           warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.');
         }
       }

+ 1 - 1
packages/vue-server-renderer/package.json

@@ -1,6 +1,6 @@
 {
   "name": "vue-server-renderer",
-  "version": "2.0.0-alpha.3",
+  "version": "2.0.0-alpha.4",
   "description": "server renderer for Vue 2.0",
   "main": "index.js",
   "repository": {

+ 7 - 2
packages/vue-template-compiler/index.js

@@ -200,6 +200,11 @@ var config = {
    */
   errorHandler: null,
 
+  /**
+   * Ignore certain custom elements
+   */
+  ignoredElements: null,
+
   /**
    * Check if a tag is reserved so that it cannot be registered as a
    * component. This is platform-dependent and may be overwritten.
@@ -1808,7 +1813,7 @@ function renderElement(tag, data, namespace) {
       return createComponent(Ctor, data, parent, context, host, tag);
     } else {
       if (process.env.NODE_ENV !== 'production') {
-        if (!namespace && config.isUnknownElement(tag)) {
+        if (!namespace && !(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) && config.isUnknownElement(tag)) {
           warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.');
         }
       }
@@ -3851,7 +3856,7 @@ function compile$2(template, options) {
 // operators like typeof, instanceof and in are allowed
 var prohibitedKeywordRE = new RegExp('\\b' + ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + 'super,throw,while,yield,delete,export,import,return,switch,default,' + 'extends,finally,continue,debugger,function,arguments').split(',').join('\\b|\\b') + '\\b');
 // check valid identifier for v-for
-var identRE = /[^\w$\.](?:[A-Za-z_$][\w$]*)/;
+var identRE = /[A-Za-z_$][\w$]*/;
 
 // detect problematic expressions in a template
 function detectErrors(ast) {

+ 1 - 1
packages/vue-template-compiler/package.json

@@ -1,6 +1,6 @@
 {
   "name": "vue-template-compiler",
-  "version": "2.0.0-alpha.3",
+  "version": "2.0.0-alpha.4",
   "description": "template compiler for Vue 2.0",
   "main": "index.js",
   "repository": {

+ 1 - 1
src/core/index.js

@@ -8,6 +8,6 @@ Object.defineProperty(Vue.prototype, '$isServer', {
   get: () => config._isServer
 })
 
-Vue.version = '2.0.0-alpha.3'
+Vue.version = '2.0.0-alpha.4'
 
 export default Vue

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно