Просмотр исходного кода

use non-capturing regex in v-bind

Evan You 10 лет назад
Родитель
Сommit
67f5dcddc3
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      src/directives/public/bind.js

+ 2 - 3
src/directives/public/bind.js

@@ -8,11 +8,10 @@ const xlinkNS = 'http://www.w3.org/1999/xlink'
 const xlinkRE = /^xlink:/
 const xlinkRE = /^xlink:/
 
 
 // check for attributes that prohibit interpolations
 // check for attributes that prohibit interpolations
-const disallowedInterpAttrRE = /^v-|^:|^@|^(is|transition|transition-mode|debounce|track-by|stagger|enter-stagger|leave-stagger)$/
-
+const disallowedInterpAttrRE = /^v-|^:|^@|^(?:is|transition|transition-mode|debounce|track-by|stagger|enter-stagger|leave-stagger)$/
 // these attributes should also set their corresponding properties
 // these attributes should also set their corresponding properties
 // because they only affect the initial state of the element
 // because they only affect the initial state of the element
-const attrWithPropsRE = /^(value|checked|selected|muted)$/
+const attrWithPropsRE = /^(?:value|checked|selected|muted)$/
 
 
 // these attributes should set a hidden property for
 // these attributes should set a hidden property for
 // binding v-model to object values
 // binding v-model to object values