@zhongguo168a/yxeditor-common 0.0.152 → 0.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +0 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -4454,20 +4454,17 @@ class ViewModel extends EventDispatcher {
|
|
|
4454
4454
|
* 如果返回 null,表示主动取消 [cancel]
|
|
4455
4455
|
*/
|
|
4456
4456
|
wait() {
|
|
4457
|
-
this._result = false;
|
|
4458
4457
|
switch (this.state) {
|
|
4459
4458
|
case ViewState.Opening:
|
|
4460
4459
|
return new Promise((resolve, reject) => {
|
|
4461
4460
|
let opened = () => {
|
|
4462
4461
|
this.off("opened", this, opened);
|
|
4463
4462
|
this.off("closed", this, opened);
|
|
4464
|
-
this._result = true;
|
|
4465
4463
|
resolve(this);
|
|
4466
4464
|
};
|
|
4467
4465
|
let canceled = () => {
|
|
4468
4466
|
this.off("opened", this, opened);
|
|
4469
4467
|
this.off("closed", this, opened);
|
|
4470
|
-
this._result = false;
|
|
4471
4468
|
resolve(this);
|
|
4472
4469
|
};
|
|
4473
4470
|
this.on("opened", this, opened);
|
|
@@ -4477,14 +4474,12 @@ class ViewModel extends EventDispatcher {
|
|
|
4477
4474
|
return new Promise((resolve, reject) => {
|
|
4478
4475
|
let opened = () => {
|
|
4479
4476
|
this.off("closed", this, opened);
|
|
4480
|
-
this._result = true;
|
|
4481
4477
|
resolve(this);
|
|
4482
4478
|
};
|
|
4483
4479
|
this.on("closed", this, opened);
|
|
4484
4480
|
});
|
|
4485
4481
|
default:
|
|
4486
4482
|
return new Promise((resolve, reject) => {
|
|
4487
|
-
this._result = true;
|
|
4488
4483
|
resolve(this);
|
|
4489
4484
|
});
|
|
4490
4485
|
}
|