Преглед на файлове

删除模板里面的多余空格

zhangenming преди 6 години
родител
ревизия
e5b3e9264a
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      js/watcher.js
  2. 1 1
      mvvm.html

+ 1 - 1
js/watcher.js

@@ -7,7 +7,7 @@ function Watcher(vm, expOrFn, cb) {
     if (typeof expOrFn === 'function') {
         this.getter = expOrFn;
     } else {
-        this.getter = this.parseGetter(expOrFn);
+        this.getter = this.parseGetter(expOrFn.trim());
     }
 
     this.value = this.get();

+ 1 - 1
mvvm.html

@@ -13,7 +13,7 @@
         {{someStr}}
         <span v-text="child.someStr"></span>
     </p> -->
-    <p>{{getHelloWord}}</p>
+    <p>{{ getHelloWord }}</p>
     <p v-html="htmlStr"></p>
     <button v-on:click="clickBtn">change model</button>
 </div>