|
@@ -48,6 +48,14 @@ export class Scope {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 产生一个当前模块有效的唯一id
|
|
|
+ * @param key 唯一编号
|
|
|
+ */
|
|
|
+ uid(key) {
|
|
|
+ return this.id + key
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 以对话框模式打开当前模块
|
|
|
* @param sender 发送者(按钮或Scope对象)
|
|
|
* @param vjsonOption 界面覆盖选项(可以为空)
|
|
@@ -176,6 +184,28 @@ export class Scope {
|
|
|
this._handle.close()
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取 viewModel 里包含的数据(只读)
|
|
|
+ */
|
|
|
+ get data() {
|
|
|
+ return this.viewModel.getData()
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 寻找模块内所有的 xtype 对应的对象
|
|
|
+ * @param xtypeKey
|
|
|
+ */
|
|
|
+ down(xtypeKey) {
|
|
|
+ return this._handle.down(xtypeKey)
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取所有设置过 Reference 名称的组件
|
|
|
+ */
|
|
|
+ get refs() {
|
|
|
+ return this._handle.getReferences()
|
|
|
+ }
|
|
|
+
|
|
|
constructor({model, vjson}) {
|
|
|
const that = this
|
|
|
this.model = model
|
|
@@ -245,13 +275,6 @@ export class Scope {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取所有设置过 Reference 名称的组件
|
|
|
- */
|
|
|
- get refs() {
|
|
|
- return this._handle.getReferences()
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 模块载入完成之后的回调
|
|
|
*/
|
|
|
onLoad() {
|
|
@@ -293,13 +316,6 @@ export class Scope {
|
|
|
onDestroy() {
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 产生一个当前模块有效的唯一id
|
|
|
- * @param key 唯一编号
|
|
|
- */
|
|
|
- uid(key) {
|
|
|
- return this.id + key
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|