@byteluck-fe/model-driven-driven 2.23.0-beta.6 → 2.23.0-beta.7
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/esm/Driven.js +26 -26
- package/dist/index.umd.js +20 -20
- package/package.json +6 -6
package/dist/esm/Driven.js
CHANGED
|
@@ -189,24 +189,24 @@ import { Group, initSettings, Tab } from '@byteluck-fe/model-driven-settings';
|
|
|
189
189
|
import { RulesMessage, DEFAULT_LOCALE } from '@byteluck-fe/model-driven-shared';
|
|
190
190
|
// 当前正在注册的插件名称
|
|
191
191
|
var applyingPluginName = '';
|
|
192
|
-
/**
|
|
193
|
-
* 设计器驱动
|
|
192
|
+
/**
|
|
193
|
+
* 设计器驱动
|
|
194
194
|
* */ var Driven = /*#__PURE__*/ function(Watcher) {
|
|
195
195
|
"use strict";
|
|
196
196
|
_inherits(Driven, Watcher);
|
|
197
197
|
function Driven(options) {
|
|
198
198
|
_class_call_check(this, Driven);
|
|
199
199
|
var _this;
|
|
200
|
-
_this = _call_super(this, Driven), _define_property(_this, "mode", void 0), _define_property(_this, "isMounted", false), _define_property(_this, "id", genNonDuplicateId(8)), /**
|
|
201
|
-
* 控件可选的事件
|
|
202
|
-
* */ _define_property(_this, "eventLogic", void 0), /**
|
|
203
|
-
* 处理数据存储,存放模型等
|
|
204
|
-
* */ _define_property(_this, "store", void 0), /**
|
|
205
|
-
* 额外参数存储
|
|
206
|
-
*/ _define_property(_this, "externalParams", void 0), /**
|
|
207
|
-
* 处理instance,和schema存储
|
|
208
|
-
* */ _define_property(_this, "designer", void 0), /**
|
|
209
|
-
* 插件数组
|
|
200
|
+
_this = _call_super(this, Driven), _define_property(_this, "mode", void 0), _define_property(_this, "isMounted", false), _define_property(_this, "id", genNonDuplicateId(8)), /**
|
|
201
|
+
* 控件可选的事件
|
|
202
|
+
* */ _define_property(_this, "eventLogic", void 0), /**
|
|
203
|
+
* 处理数据存储,存放模型等
|
|
204
|
+
* */ _define_property(_this, "store", void 0), /**
|
|
205
|
+
* 额外参数存储
|
|
206
|
+
*/ _define_property(_this, "externalParams", void 0), /**
|
|
207
|
+
* 处理instance,和schema存储
|
|
208
|
+
* */ _define_property(_this, "designer", void 0), /**
|
|
209
|
+
* 插件数组
|
|
210
210
|
* */ _define_property(_this, "__plugins", void 0), _define_property(_this, "__pluginsApplied", false), _define_property(_this, "$options", void 0), // TODO 拿到schema
|
|
211
211
|
_define_property(_this, "getSchema", toSchema), // TODO 拿到model_bind_info_list
|
|
212
212
|
_define_property(_this, "getModelBindInfoList", getModelBindInfoList), // TODO 拿到permission_controls
|
|
@@ -475,10 +475,10 @@ var applyingPluginName = '';
|
|
|
475
475
|
if (instance === null) return;
|
|
476
476
|
var _instance = this.getInstance(instance);
|
|
477
477
|
if (!_instance) return;
|
|
478
|
-
/*
|
|
479
|
-
移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
|
|
480
|
-
事件是否区分move和add
|
|
481
|
-
move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
|
|
478
|
+
/*
|
|
479
|
+
移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
|
|
480
|
+
事件是否区分move和add
|
|
481
|
+
move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
|
|
482
482
|
*/ var oldDataScopeParent = this.store.movingInstanceOldDataScopeParent;
|
|
483
483
|
var newDataScopeParent = findInstanceDataScopeParent(_instance);
|
|
484
484
|
var oldParent = this.store.movingInstanceOldParent;
|
|
@@ -603,8 +603,8 @@ var applyingPluginName = '';
|
|
|
603
603
|
},
|
|
604
604
|
{
|
|
605
605
|
key: "removeInstance",
|
|
606
|
-
value: /**
|
|
607
|
-
* 删除控件
|
|
606
|
+
value: /**
|
|
607
|
+
* 删除控件
|
|
608
608
|
* */ function removeInstance(instance) {
|
|
609
609
|
// 删除实例,并触发事件 removed
|
|
610
610
|
var parent = instance.parent;
|
|
@@ -643,8 +643,8 @@ var applyingPluginName = '';
|
|
|
643
643
|
},
|
|
644
644
|
{
|
|
645
645
|
key: "updateInstanceType",
|
|
646
|
-
value: /**
|
|
647
|
-
* 修改控件类型
|
|
646
|
+
value: /**
|
|
647
|
+
* 修改控件类型
|
|
648
648
|
* */ function updateInstanceType(instance, type) {
|
|
649
649
|
var schema = instance.toSchema();
|
|
650
650
|
var newInstance = this.createInstance(type, {
|
|
@@ -702,16 +702,16 @@ var applyingPluginName = '';
|
|
|
702
702
|
},
|
|
703
703
|
{
|
|
704
704
|
key: "assertInstance",
|
|
705
|
-
value: /**
|
|
706
|
-
* 判断控件的类型,返回当前控件的正确类型
|
|
705
|
+
value: /**
|
|
706
|
+
* 判断控件的类型,返回当前控件的正确类型
|
|
707
707
|
* */ function assertInstance(instance, types) {
|
|
708
708
|
return isString(types) ? instance.type === types : types.includes(instance.type);
|
|
709
709
|
}
|
|
710
710
|
},
|
|
711
711
|
{
|
|
712
712
|
key: "getInstanceInListControl",
|
|
713
|
-
value: /**
|
|
714
|
-
* 控件在列表控件内,如明细子表或列表控件
|
|
713
|
+
value: /**
|
|
714
|
+
* 控件在列表控件内,如明细子表或列表控件
|
|
715
715
|
* */ function getInstanceInListControl(instance) {
|
|
716
716
|
var _instance = instance;
|
|
717
717
|
while(_instance){
|
|
@@ -782,7 +782,7 @@ var applyingPluginName = '';
|
|
|
782
782
|
]);
|
|
783
783
|
return Driven;
|
|
784
784
|
}(Watcher);
|
|
785
|
-
/**
|
|
786
|
-
* 控件事件定义
|
|
785
|
+
/**
|
|
786
|
+
* 控件事件定义
|
|
787
787
|
* */ _define_property(Driven, "EventLogic", EventLogic);
|
|
788
788
|
export { Driven };
|