Explorar o código

update: correct the description of the regular expression

Huo Chunyang %!s(int64=7) %!d(string=hai) anos
pai
achega
e4b65df781
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      docs/art/8vue-reactive-dep-watch.md

+ 1 - 1
docs/art/8vue-reactive-dep-watch.md

@@ -616,7 +616,7 @@ const bailRE = /[^\w.$]/
 
 同时在 `parsePath` 函数开头有一段 `if` 语句,使用该正则来匹配传递给 `parsePath` 的参数 `path`,如果匹配则直接返回(`return`),且返回值是 `undefined`,也就是说如果 `path` 匹配正则 `bailRE` 那么最终 `this.getter` 将不是一个函数而是 `undefined`。那么这个正则是什么含义呢?这个正则将匹配一个位置,该位置满足三个条件:
 
-* 不是 `\w`,也就是说这个位置不能是 `字母` 或 `数字` 或 `下划线` 或 `汉字`
+* 不是 `\w`,也就是说这个位置不能是 `字母` 或 `数字` 或 `下划线`
 * 不是字符 `.`
 * 不是字符 `$`