@zhongguo168a/yxeditor-common 0.0.129 → 0.0.131
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.d.ts +2 -2
- package/dist/index.esm.js +21 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1350,8 +1350,8 @@ declare class ViewModel extends EventDispatcher {
|
|
|
1350
1350
|
/**
|
|
1351
1351
|
* 等待打开完成指令
|
|
1352
1352
|
*/
|
|
1353
|
-
waitOpenComplete(): void
|
|
1354
|
-
openComplete(): void;
|
|
1353
|
+
waitOpenComplete(...params: any): Promise<void>;
|
|
1354
|
+
protected openComplete(): void;
|
|
1355
1355
|
waitCloseComplete(): void;
|
|
1356
1356
|
closeComplete(): void;
|
|
1357
1357
|
protected _waitOpenComplete: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -4262,6 +4262,16 @@ function __decorate(decorators, target, key, desc) {
|
|
|
4262
4262
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4263
4263
|
}
|
|
4264
4264
|
|
|
4265
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
4266
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4267
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4268
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4269
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4270
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4271
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4272
|
+
});
|
|
4273
|
+
}
|
|
4274
|
+
|
|
4265
4275
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4266
4276
|
var e = new Error(message);
|
|
4267
4277
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -4471,8 +4481,17 @@ class ViewModel extends EventDispatcher {
|
|
|
4471
4481
|
/**
|
|
4472
4482
|
* 等待打开完成指令
|
|
4473
4483
|
*/
|
|
4474
|
-
waitOpenComplete() {
|
|
4475
|
-
this
|
|
4484
|
+
waitOpenComplete(...params) {
|
|
4485
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4486
|
+
this._waitOpenComplete = true;
|
|
4487
|
+
for (const element of params) {
|
|
4488
|
+
yield element();
|
|
4489
|
+
if (this.state == ViewState.Closed || this.state == ViewState.Closeing) {
|
|
4490
|
+
return;
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
this.openComplete();
|
|
4494
|
+
});
|
|
4476
4495
|
}
|
|
4477
4496
|
openComplete() {
|
|
4478
4497
|
if (this.state == ViewState.Opened) {
|