File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ module.exports = function (config) {
1919 ignore : [
2020 'test/' ,
2121 'src/compiler/parser/html-parser.js' ,
22- 'src/core/instance/proxy.js'
22+ 'src/core/instance/proxy.js' ,
23+ 'src/sfc/deindent.js'
2324 ]
2425 } ] ]
2526 }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export default class Watcher {
2727 deep : boolean ;
2828 user : boolean ;
2929 lazy : boolean ;
30+ sync : boolean ;
3031 dirty : boolean ;
3132 active : boolean ;
3233 deps : Array < Dep > ;
@@ -48,6 +49,7 @@ export default class Watcher {
4849 this . deep = ! ! options . deep
4950 this . user = ! ! options . user
5051 this . lazy = ! ! options . lazy
52+ this . sync = ! ! options . sync
5153 this . expression = expOrFn . toString ( )
5254 this . cb = cb
5355 this . id = ++ uid // uid for batching
@@ -167,8 +169,11 @@ export default class Watcher {
167169 * Will be called when a dependency changes.
168170 */
169171 update ( ) {
172+ /* istanbul ignore else */
170173 if ( this . lazy ) {
171174 this . dirty = true
175+ } else if ( this . sync ) {
176+ this . run ( )
172177 } else {
173178 queueWatcher ( this )
174179 }
You can’t perform that action at this time.
0 commit comments