@zhongguo168a/yxeditor-common 0.0.63 → 0.0.66
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 +11 -1
- package/dist/index.esm.js +62 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalTextAlignment, VerticalTextAlignment, Scheduler,
|
|
1
|
+
import { HorizontalTextAlignment, VerticalTextAlignment, Scheduler, Prefab, Node, ISchedulable, AssetManager, Asset, SpriteAtlas, Camera, Canvas, Vec2, Vec3, Vec4, Widget, UITransform, math } from 'cc';
|
|
2
2
|
|
|
3
3
|
interface IError {
|
|
4
4
|
isCancel(): boolean;
|
|
@@ -1185,6 +1185,11 @@ declare class RouteView extends EventDispatcher {
|
|
|
1185
1185
|
openComplete(): void;
|
|
1186
1186
|
waitCloseComplete(): void;
|
|
1187
1187
|
closeComplete(): void;
|
|
1188
|
+
/**
|
|
1189
|
+
*
|
|
1190
|
+
* @param asset 通过此方法创建的节点,自动添加 RouteComponent 到节点上
|
|
1191
|
+
*/
|
|
1192
|
+
createNode(asset: Prefab): void;
|
|
1188
1193
|
protected _waitOpenComplete: boolean;
|
|
1189
1194
|
protected _waitCloseComplete: boolean;
|
|
1190
1195
|
get controller(): RouteController;
|
|
@@ -1304,6 +1309,11 @@ declare class ViewRepo extends ViewDict {
|
|
|
1304
1309
|
getByRoute(route: Route): RouteView;
|
|
1305
1310
|
listByRoutePath(path: string): ViewList;
|
|
1306
1311
|
listByTags(tags: string[]): ViewList;
|
|
1312
|
+
/**
|
|
1313
|
+
*
|
|
1314
|
+
* @param target 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
|
|
1315
|
+
*/
|
|
1316
|
+
tailNode(node: Node): RouteView;
|
|
1307
1317
|
protected getController(name: string): RouteController;
|
|
1308
1318
|
protected _indexLayer: {};
|
|
1309
1319
|
protected _indexRoute: {};
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalTextAlignment, VerticalTextAlignment, director, macro, Scheduler, math, instantiate, SpriteAtlas, Size, Vec2, Rect, SpriteFrame, path, assetManager, ImageAsset, JsonAsset, TextAsset, Asset, Texture2D, find, Canvas, Node, Vec3, Vec4, resources, UITransform, Widget } from 'cc';
|
|
1
|
+
import { HorizontalTextAlignment, VerticalTextAlignment, director, macro, Scheduler, math, instantiate, _decorator, Component, SpriteAtlas, Size, Vec2, Rect, SpriteFrame, path, assetManager, ImageAsset, JsonAsset, TextAsset, Asset, Texture2D, find, Canvas, Node, Vec3, Vec4, resources, UITransform, Widget } from 'cc';
|
|
2
2
|
|
|
3
3
|
class NetUtil {
|
|
4
4
|
// 获取URL的参数对象
|
|
@@ -3760,6 +3760,42 @@ class UIObjectRepo extends Dictionary {
|
|
|
3760
3760
|
*/
|
|
3761
3761
|
var uirepo = new UIObjectRepo();
|
|
3762
3762
|
|
|
3763
|
+
/******************************************************************************
|
|
3764
|
+
Copyright (c) Microsoft Corporation.
|
|
3765
|
+
|
|
3766
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
3767
|
+
purpose with or without fee is hereby granted.
|
|
3768
|
+
|
|
3769
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3770
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3771
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3772
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3773
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3774
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3775
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
3776
|
+
***************************************************************************** */
|
|
3777
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
3778
|
+
|
|
3779
|
+
|
|
3780
|
+
function __decorate(decorators, target, key, desc) {
|
|
3781
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3782
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3783
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3784
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
3788
|
+
var e = new Error(message);
|
|
3789
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
3790
|
+
};
|
|
3791
|
+
|
|
3792
|
+
const { ccclass, property, menu } = _decorator;
|
|
3793
|
+
let RouteComponent = class RouteComponent extends Component {
|
|
3794
|
+
};
|
|
3795
|
+
RouteComponent = __decorate([
|
|
3796
|
+
ccclass('RouteComponent')
|
|
3797
|
+
], RouteComponent);
|
|
3798
|
+
|
|
3763
3799
|
class ViewList extends List {
|
|
3764
3800
|
}
|
|
3765
3801
|
/**
|
|
@@ -3850,6 +3886,21 @@ class ViewRepo extends ViewDict {
|
|
|
3850
3886
|
});
|
|
3851
3887
|
return list;
|
|
3852
3888
|
}
|
|
3889
|
+
/**
|
|
3890
|
+
*
|
|
3891
|
+
* @param target 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
|
|
3892
|
+
*/
|
|
3893
|
+
tailNode(node) {
|
|
3894
|
+
let current = node;
|
|
3895
|
+
while (current != null) {
|
|
3896
|
+
let com = node.getComponent(RouteComponent);
|
|
3897
|
+
if (com) {
|
|
3898
|
+
return com.routeView;
|
|
3899
|
+
}
|
|
3900
|
+
current = node.parent;
|
|
3901
|
+
}
|
|
3902
|
+
return null;
|
|
3903
|
+
}
|
|
3853
3904
|
getController(name) {
|
|
3854
3905
|
return ctrlrepo.get(name);
|
|
3855
3906
|
}
|
|
@@ -4055,6 +4106,16 @@ class RouteView extends EventDispatcher {
|
|
|
4055
4106
|
this._onClosed(this);
|
|
4056
4107
|
}
|
|
4057
4108
|
}
|
|
4109
|
+
/**
|
|
4110
|
+
*
|
|
4111
|
+
* @param asset 通过此方法创建的节点,自动添加 RouteComponent 到节点上
|
|
4112
|
+
*/
|
|
4113
|
+
createNode(asset) {
|
|
4114
|
+
let node = instantiate(asset);
|
|
4115
|
+
this.node = node;
|
|
4116
|
+
let com = node.addComponent(RouteComponent);
|
|
4117
|
+
com.routeView = this;
|
|
4118
|
+
}
|
|
4058
4119
|
get controller() {
|
|
4059
4120
|
return this._controller;
|
|
4060
4121
|
}
|