|
|
|
@ -25,7 +25,7 @@ import {
|
|
|
|
|
import { OB } from "./3.ob"; |
|
|
|
|
import { Providers, _lazyCreateWidget } from "./5.inject"; |
|
|
|
|
import { DOM } from "./utils"; |
|
|
|
|
import { Events, emptyFn, pixFormat } from "./constant"; |
|
|
|
|
import { Events, pixFormat } from "./constant"; |
|
|
|
|
import { Plugin } from "./6.plugin"; |
|
|
|
|
import { _global } from "./0.foundation"; |
|
|
|
|
import { SystemProvider } from "./system"; |
|
|
|
@ -336,29 +336,6 @@ export class Widget extends OB {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
__watch(getter, handler, options) { |
|
|
|
|
if (_global.Fix) { |
|
|
|
|
this._watchers = this._watchers || []; |
|
|
|
|
const watcher = new Fix.Watcher( |
|
|
|
|
null, |
|
|
|
|
() => getter.call(this, this), |
|
|
|
|
(handler && |
|
|
|
|
((v) => { |
|
|
|
|
handler.call(this, this, v); |
|
|
|
|
})) || |
|
|
|
|
emptyFn, |
|
|
|
|
extend({ deep: true }, options) |
|
|
|
|
); |
|
|
|
|
this._watchers.push(() => { |
|
|
|
|
watcher.teardown(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return watcher.value; |
|
|
|
|
} else { |
|
|
|
|
return getter(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 初始化根节点 |
|
|
|
|
* @private |
|
|
|
|