@byteluck-fe/model-driven-driven 2.5.8 → 2.5.9-beta.2

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/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # Driven
2
- 设计态引擎
3
-
4
- Builder.ts // 兼容旧版Designer,提供页面初始化
5
- constants.ts // 常量
6
- Designer.ts // 旧版designer的实现
7
- designerUtils.ts // 工具函数
8
- Driven.ts // 引擎
9
- EventLogic.ts // 事件管理
10
- index.ts
11
- Plugin.ts // 插件
12
- Store.ts // 仓库
13
- utils.ts // 工具
1
+ # Driven
2
+ 设计态引擎
3
+
4
+ Builder.ts // 兼容旧版Designer,提供页面初始化
5
+ constants.ts // 常量
6
+ Designer.ts // 旧版designer的实现
7
+ designerUtils.ts // 工具函数
8
+ Driven.ts // 引擎
9
+ EventLogic.ts // 事件管理
10
+ index.ts
11
+ Plugin.ts // 插件
12
+ Store.ts // 仓库
13
+ utils.ts // 工具
@@ -30,8 +30,8 @@ function _define_property(obj, key, value) {
30
30
  }
31
31
  return obj;
32
32
  }
33
- import Designer from "./Designer";
34
- import { CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
33
+ import Designer from './Designer';
34
+ import { CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
35
35
  export var Builder = /*#__PURE__*/ function() {
36
36
  "use strict";
37
37
  function Builder() {
@@ -79,7 +79,7 @@ export var Builder = /*#__PURE__*/ function() {
79
79
  // @ts-ignore
80
80
  var listview = this.designer.createControlInstance(// @ts-ignore
81
81
  CONTROL_TYPE.LIST_VIEW);
82
- listview.props.countType = "async";
82
+ listview.props.countType = 'async';
83
83
  var simpleSearch = this.designer.createControlInstance(// @ts-ignore
84
84
  CONTROL_TYPE.SIMPLE_SEARCH);
85
85
  var gridTable = this.designer.createControlInstance(// @ts-ignore
@@ -128,7 +128,7 @@ export var Builder = /*#__PURE__*/ function() {
128
128
  // @ts-ignore
129
129
  vueFormItem.props.isHideCaption = true;
130
130
  // @ts-ignore
131
- vueFormItem.props.controlExportName = "VuePage";
131
+ vueFormItem.props.controlExportName = 'VuePage';
132
132
  // @ts-ignore
133
133
  grid.children.push(vueFormItem);
134
134
  return grid;
@@ -252,10 +252,10 @@ function _ts_generator(thisArg, body) {
252
252
  };
253
253
  }
254
254
  }
255
- import { RegisterControls, controlHooksEmitter } from "@byteluck-fe/model-driven-core";
256
- import EventLogic from "./EventLogic";
257
- import { FieldTypes } from "@byteluck-fe/model-driven-shared";
258
- import { toSchema, getModelBindInfoList, checkSchema } from "./utils";
255
+ import { RegisterControls, controlHooksEmitter } from '@byteluck-fe/model-driven-core';
256
+ import EventLogic from './EventLogic';
257
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
258
+ import { toSchema, getModelBindInfoList, checkSchema } from './utils';
259
259
  var Designer = /*#__PURE__*/ function _target(RegisterControls) {
260
260
  "use strict";
261
261
  _inherits(Designer, RegisterControls);
@@ -263,7 +263,7 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
263
263
  function Designer() {
264
264
  _class_call_check(this, Designer);
265
265
  var _this;
266
- _this = _super.call(this, "Designer");
266
+ _this = _super.call(this, 'Designer');
267
267
  _define_property(_assert_this_initialized(_this), "toolbox", []);
268
268
  _define_property(_assert_this_initialized(_this), "services", {});
269
269
  _define_property(_assert_this_initialized(_this), "eventLogic", new EventLogic());
@@ -322,7 +322,7 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
322
322
  function getInitControl() {
323
323
  // @ts-ignore
324
324
  return [
325
- this.createControlInstance("grid")
325
+ this.createControlInstance('grid')
326
326
  ];
327
327
  }
328
328
  },
@@ -192,16 +192,16 @@ function _create_super(Derived) {
192
192
  return _possible_constructor_return(this, result);
193
193
  };
194
194
  }
195
- import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from "@byteluck-fe/model-driven-shared";
196
- import { findInstanceDataScopeParent, Store } from "./Store";
197
- import { Designer } from "./Designer";
198
- import EventLogic from "./EventLogic";
199
- import { checkSchema, generatePermissions, getModelBindInfoList, toSchema } from "./utils";
200
- import { Group, initSettings, Tab } from "@byteluck-fe/model-driven-settings";
195
+ import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from '@byteluck-fe/model-driven-shared';
196
+ import { findInstanceDataScopeParent, Store } from './Store';
197
+ import { Designer } from './Designer';
198
+ import EventLogic from './EventLogic';
199
+ import { checkSchema, generatePermissions, getModelBindInfoList, toSchema } from './utils';
200
+ import { Group, initSettings, Tab } from '@byteluck-fe/model-driven-settings';
201
201
  // 当前正在注册的插件名称
202
- var applyingPluginName = "";
203
- /**
204
- * 设计器驱动
202
+ var applyingPluginName = '';
203
+ /**
204
+ * 设计器驱动
205
205
  * */ var Driven = /*#__PURE__*/ function(Watcher) {
206
206
  "use strict";
207
207
  _inherits(Driven, Watcher);
@@ -213,20 +213,20 @@ var applyingPluginName = "";
213
213
  _define_property(_assert_this_initialized(_this), "mode", void 0);
214
214
  _define_property(_assert_this_initialized(_this), "isMounted", false);
215
215
  _define_property(_assert_this_initialized(_this), "id", genNonDuplicateId(8));
216
- /**
217
- * 控件可选的事件
216
+ /**
217
+ * 控件可选的事件
218
218
  * */ _define_property(_assert_this_initialized(_this), "eventLogic", void 0);
219
- /**
220
- * 处理数据存储,存放模型等
219
+ /**
220
+ * 处理数据存储,存放模型等
221
221
  * */ _define_property(_assert_this_initialized(_this), "store", void 0);
222
- /**
223
- * 额外参数存储
222
+ /**
223
+ * 额外参数存储
224
224
  */ _define_property(_assert_this_initialized(_this), "externalParams", void 0);
225
- /**
226
- * 处理instance,和schema存储
225
+ /**
226
+ * 处理instance,和schema存储
227
227
  * */ _define_property(_assert_this_initialized(_this), "designer", void 0);
228
- /**
229
- * 插件数组
228
+ /**
229
+ * 插件数组
230
230
  * */ _define_property(_assert_this_initialized(_this), "__plugins", void 0);
231
231
  _define_property(_assert_this_initialized(_this), "__pluginsApplied", false);
232
232
  _define_property(_assert_this_initialized(_this), "$options", void 0);
@@ -237,7 +237,7 @@ var applyingPluginName = "";
237
237
  // TODO 拿到permission_controls
238
238
  _define_property(_assert_this_initialized(_this), "generatePermissions", generatePermissions);
239
239
  _this.$options = Object.freeze(options);
240
- var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? false : _this_$options_autoMount, tmp = _this_$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _this_$options.schema, _this_$options_mode = _this_$options.mode, mode = _this_$options_mode === void 0 ? "form" : _this_$options_mode, tmp1 = _this_$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1;
240
+ var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? false : _this_$options_autoMount, tmp = _this_$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _this_$options.schema, _this_$options_mode = _this_$options.mode, mode = _this_$options_mode === void 0 ? 'form' : _this_$options_mode, tmp1 = _this_$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1;
241
241
  _this.eventLogic = new EventLogic();
242
242
  _this.designer = new DesignerClass();
243
243
  _this.store = new Store(_object_spread({
@@ -279,7 +279,7 @@ var applyingPluginName = "";
279
279
  var _plugin_pluginName;
280
280
  applyingPluginName = (_plugin_pluginName = plugin.pluginName) !== null && _plugin_pluginName !== void 0 ? _plugin_pluginName : plugin.constructor.name;
281
281
  plugin.apply(_this);
282
- applyingPluginName = "";
282
+ applyingPluginName = '';
283
283
  } catch (e) {
284
284
  error("".concat(applyingPluginName || plugin.constructor.name, " Plugin apply Error \n ").concat(e));
285
285
  }
@@ -326,7 +326,7 @@ var applyingPluginName = "";
326
326
  return;
327
327
  }
328
328
  this.setSelectedInstanceSetting();
329
- this.emit("select", {
329
+ this.emit('select', {
330
330
  instance: instance
331
331
  });
332
332
  }
@@ -348,7 +348,7 @@ var applyingPluginName = "";
348
348
  setting = this.concatSetting(setting, wrapSetting, instance.parent.id);
349
349
  }
350
350
  this.store.setSelectInstanceSettings(setting);
351
- this.callSelectedEffect("");
351
+ this.callSelectedEffect('');
352
352
  // 选中触发scopeEffect
353
353
  var payload = {
354
354
  from: null,
@@ -366,7 +366,7 @@ var applyingPluginName = "";
366
366
  var _settings_, _otherSettings_, _settings_1, _otherSettings_1;
367
367
  var result = settings;
368
368
  // tab
369
- if (((_settings_ = settings[0]) === null || _settings_ === void 0 ? void 0 : _settings_.type) === "tab" && ((_otherSettings_ = otherSettings[0]) === null || _otherSettings_ === void 0 ? void 0 : _otherSettings_.type) === "tab") {
369
+ if (((_settings_ = settings[0]) === null || _settings_ === void 0 ? void 0 : _settings_.type) === 'tab' && ((_otherSettings_ = otherSettings[0]) === null || _otherSettings_ === void 0 ? void 0 : _otherSettings_.type) === 'tab') {
370
370
  var tabSettings = settings;
371
371
  var otherTabSettings = otherSettings.slice(0);
372
372
  result = tabSettings.map(function(tab, index) {
@@ -389,7 +389,7 @@ var applyingPluginName = "";
389
389
  })));
390
390
  }
391
391
  // group
392
- } else if (((_settings_1 = settings[0]) === null || _settings_1 === void 0 ? void 0 : _settings_1.type) === "group" && ((_otherSettings_1 = otherSettings[0]) === null || _otherSettings_1 === void 0 ? void 0 : _otherSettings_1.type) === "group") {
392
+ } else if (((_settings_1 = settings[0]) === null || _settings_1 === void 0 ? void 0 : _settings_1.type) === 'group' && ((_otherSettings_1 = otherSettings[0]) === null || _otherSettings_1 === void 0 ? void 0 : _otherSettings_1.type) === 'group') {
393
393
  var groupSettings = settings;
394
394
  var otherGroupSettings = otherSettings;
395
395
  result = _to_consumable_array(this.formatGroupSetting(otherGroupSettings, settingFromId)).concat(_to_consumable_array(groupSettings));
@@ -456,7 +456,7 @@ var applyingPluginName = "";
456
456
  key: "setSelectedFieldItem",
457
457
  value: function setSelectedFieldItem(fieldItem) {
458
458
  this.store.setSelectedFieldItem(fieldItem);
459
- this.callSelectedEffect("dataBind", {
459
+ this.callSelectedEffect('dataBind', {
460
460
  fieldItem: fieldItem
461
461
  });
462
462
  }
@@ -479,10 +479,10 @@ var applyingPluginName = "";
479
479
  if (instance === null) return;
480
480
  var _instance = this.getInstance(instance);
481
481
  if (!_instance) return;
482
- /*
483
- 移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
484
- 事件是否区分move和add
485
- move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
482
+ /*
483
+ 移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
484
+ 事件是否区分move和add
485
+ move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
486
486
  */ var oldDataScopeParent = this.store.movingInstanceOldDataScopeParent;
487
487
  var newDataScopeParent = findInstanceDataScopeParent(_instance);
488
488
  var oldParent = this.store.movingInstanceOldParent;
@@ -504,9 +504,9 @@ var applyingPluginName = "";
504
504
  };
505
505
  this.callSelectedScopeEffect(payload);
506
506
  if (oldParent) {
507
- this.emit("moved", _object_spread({}, payload));
507
+ this.emit('moved', _object_spread({}, payload));
508
508
  } else {
509
- this.emit("joined", _object_spread({}, payload));
509
+ this.emit('joined', _object_spread({}, payload));
510
510
  }
511
511
  }
512
512
  },
@@ -523,7 +523,7 @@ var applyingPluginName = "";
523
523
  // return instanceId
524
524
  // }
525
525
  // return this.store.instanceIdMap.get(instanceId)
526
- if (typeof instanceId === "string") {
526
+ if (typeof instanceId === 'string') {
527
527
  return this.store.instanceIdMap.get(instanceId);
528
528
  }
529
529
  return instanceId;
@@ -566,13 +566,13 @@ var applyingPluginName = "";
566
566
  return;
567
567
  }
568
568
  // 修改dataBind的时候要更新 fieldCodeMap
569
- if (propName.startsWith("dataBind")) {
569
+ if (propName.startsWith('dataBind')) {
570
570
  this.store.updateDataFieldCodeMap(instance);
571
571
  }
572
572
  if (instance.id === ((_this_store_selected = this.store.selected) === null || _this_store_selected === void 0 ? void 0 : _this_store_selected.id)) {
573
573
  this.callSelectedEffect(propName, payload);
574
574
  }
575
- this.emit("updated", {
575
+ this.emit('updated', {
576
576
  instance: instance,
577
577
  propName: propName,
578
578
  value: value
@@ -582,11 +582,11 @@ var applyingPluginName = "";
582
582
  {
583
583
  key: "updateInstanceProps",
584
584
  value: function updateInstanceProps(instance, props, payload) {
585
- var prevKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
586
585
  var _this = this;
586
+ var prevKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : '';
587
587
  Object.entries(props).forEach(function(param) {
588
588
  var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
589
- var propName = "".concat(prevKey ? prevKey + "." : "").concat(key);
589
+ var propName = "".concat(prevKey ? prevKey + '.' : '').concat(key);
590
590
  if (isObject(value)) {
591
591
  _this.updateInstanceProps(instance, value, payload, propName);
592
592
  } else {
@@ -607,8 +607,8 @@ var applyingPluginName = "";
607
607
  },
608
608
  {
609
609
  key: "removeInstance",
610
- value: /**
611
- * 删除控件
610
+ value: /**
611
+ * 删除控件
612
612
  * */ function removeInstance(instance) {
613
613
  // 删除实例,并触发事件 removed
614
614
  var parent = instance.parent;
@@ -622,7 +622,7 @@ var applyingPluginName = "";
622
622
  });
623
623
  index > -1 && parentList.splice(index, 1);
624
624
  this.store.getFlatInstances();
625
- this.emit("removed", {
625
+ this.emit('removed', {
626
626
  instance: instance,
627
627
  index: index,
628
628
  parent: parent
@@ -647,8 +647,8 @@ var applyingPluginName = "";
647
647
  },
648
648
  {
649
649
  key: "updateInstanceType",
650
- value: /**
651
- * 修改控件类型
650
+ value: /**
651
+ * 修改控件类型
652
652
  * */ function updateInstanceType(instance, type) {
653
653
  var schema = instance.toSchema();
654
654
  var newInstance = this.createInstance(type, {
@@ -707,16 +707,16 @@ var applyingPluginName = "";
707
707
  },
708
708
  {
709
709
  key: "assertInstance",
710
- value: /**
711
- * 判断控件的类型,返回当前控件的正确类型
710
+ value: /**
711
+ * 判断控件的类型,返回当前控件的正确类型
712
712
  * */ function assertInstance(instance, types) {
713
713
  return isString(types) ? instance.type === types : types.includes(instance.type);
714
714
  }
715
715
  },
716
716
  {
717
717
  key: "getInstanceInListControl",
718
- value: /**
719
- * 控件在列表控件内,如明细子表或列表控件
718
+ value: /**
719
+ * 控件在列表控件内,如明细子表或列表控件
720
720
  * */ function getInstanceInListControl(instance) {
721
721
  var _instance = instance;
722
722
  while(_instance){
@@ -744,8 +744,8 @@ var applyingPluginName = "";
744
744
  {
745
745
  key: "callSelectedEffect",
746
746
  value: function callSelectedEffect(effectKey) {
747
- var payload = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
748
747
  var _this = this;
748
+ var payload = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
749
749
  this.store.selectedInstanceSettingItems.forEach(function(setting) {
750
750
  setting.callEffect(effectKey, _this, _object_spread({
751
751
  control: _this.store.selected
@@ -756,8 +756,8 @@ var applyingPluginName = "";
756
756
  {
757
757
  key: "callSelectedScopeEffect",
758
758
  value: function callSelectedScopeEffect() {
759
- var payload = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
760
759
  var _this = this;
760
+ var payload = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
761
761
  this.store.selectedInstanceSettingItems.forEach(function(setting) {
762
762
  setting.callScopeEffect(_this, _object_spread({
763
763
  control: _this.store.selected
@@ -787,7 +787,7 @@ var applyingPluginName = "";
787
787
  ]);
788
788
  return Driven;
789
789
  }(Watcher);
790
- /**
791
- * 控件事件定义
790
+ /**
791
+ * 控件事件定义
792
792
  * */ _define_property(Driven, "EventLogic", EventLogic);
793
793
  export { Driven };
@@ -1,2 +1,2 @@
1
- import { EventLogic } from "@byteluck-fe/model-driven-shared";
1
+ import { EventLogic } from '@byteluck-fe/model-driven-shared';
2
2
  export default EventLogic;
package/dist/esm/Store.js CHANGED
@@ -95,51 +95,51 @@ function _unsupported_iterable_to_array(o, minLen) {
95
95
  if (n === "Map" || n === "Set") return Array.from(n);
96
96
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
97
97
  }
98
- import { DataBind } from "@byteluck-fe/model-driven-core";
99
- import { hasChildrenControl, hasHeaderControl } from "./designerUtils";
100
- import { Group } from "@byteluck-fe/model-driven-settings";
101
- import { CONTROL_BASE_TYPE, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
98
+ import { DataBind } from '@byteluck-fe/model-driven-core';
99
+ import { hasChildrenControl, hasHeaderControl } from './designerUtils';
100
+ import { Group } from '@byteluck-fe/model-driven-settings';
101
+ import { CONTROL_BASE_TYPE, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
102
102
  // 维护当前selected,。。 selectedControlSetting
103
103
  export var Store = /*#__PURE__*/ function() {
104
104
  "use strict";
105
105
  function Store(options) {
106
106
  _class_call_check(this, Store);
107
- /**
108
- * 页面控件实例树
107
+ /**
108
+ * 页面控件实例树
109
109
  * */ _define_property(this, "instance", void 0);
110
- /**
111
- * 拍平的控件数组
110
+ /**
111
+ * 拍平的控件数组
112
112
  * */ _define_property(this, "flatInstances", void 0);
113
- /**
114
- * 控件id组成的map
113
+ /**
114
+ * 控件id组成的map
115
115
  * */ _define_property(this, "instanceIdMap", void 0);
116
- /**
117
- * dataCode和fieldCode组成的map
118
- * {
119
- * [主表dataCode]: {
120
- * [fieldCode]: 控件
121
- * },
122
- * [子表dataCode]: {
123
- * [fieldCode]: 控件
124
- * }
125
- * }
116
+ /**
117
+ * dataCode和fieldCode组成的map
118
+ * {
119
+ * [主表dataCode]: {
120
+ * [fieldCode]: 控件
121
+ * },
122
+ * [子表dataCode]: {
123
+ * [fieldCode]: 控件
124
+ * }
125
+ * }
126
126
  * */ _define_property(this, "dataFieldCodeMap", void 0);
127
- /**
128
- * 当前选中的控件
127
+ /**
128
+ * 当前选中的控件
129
129
  * */ _define_property(this, "selected", null);
130
- /**
131
- * 当前选中的数据作用域控件
130
+ /**
131
+ * 当前选中的数据作用域控件
132
132
  * */ _define_property(this, "selectedInstanceDataScopeParent", null);
133
133
  _define_property(this, "selectedDataScopeFlatInstances", []);
134
- /**
135
- * 当前选中控件的setting
134
+ /**
135
+ * 当前选中控件的setting
136
136
  * */ _define_property(this, "selectedInstanceSetting", []);
137
137
  _define_property(this, "selectedInstanceSettingItems", []);
138
- /**
139
- * 当前选中控件的数据模型
138
+ /**
139
+ * 当前选中控件的数据模型
140
140
  * */ _define_property(this, "selectedFieldItem", null);
141
- /**
142
- * 扩展字段,比如appId,dataCode等
141
+ /**
142
+ * 扩展字段,比如appId,dataCode等
143
143
  * */ _define_property(this, "external", {});
144
144
  _define_property(this, "movingInstance", null);
145
145
  _define_property(this, "movingInstanceOldParent", null);
@@ -155,8 +155,8 @@ export var Store = /*#__PURE__*/ function() {
155
155
  _create_class(Store, [
156
156
  {
157
157
  key: "selectedRules",
158
- get: /**
159
- * 当前选中控件的rules
158
+ get: /**
159
+ * 当前选中控件的rules
160
160
  * */ function get() {
161
161
  if (!this.selected) {
162
162
  return null;
@@ -166,8 +166,8 @@ export var Store = /*#__PURE__*/ function() {
166
166
  },
167
167
  {
168
168
  key: "selectedAntdRules",
169
- get: /**
170
- * 当前选中控件的antd rules
169
+ get: /**
170
+ * 当前选中控件的antd rules
171
171
  * */ function get() {
172
172
  var rules = this.selectedRules;
173
173
  if (!rules) {
@@ -1,4 +1,4 @@
1
- import { CONTROL_TYPE, FieldTypes } from "@byteluck-fe/model-driven-shared";
1
+ import { CONTROL_TYPE, FieldTypes } from '@byteluck-fe/model-driven-shared';
2
2
  // 使用ObjectDataBind 的控件
3
3
  export var objectDataBindControlTypes = [
4
4
  CONTROL_TYPE.AMOUNT,
@@ -7,27 +7,27 @@ export var objectDataBindControlTypes = [
7
7
  ];
8
8
  export var objectDataBindKeyToFieldType = {
9
9
  amount: {
10
- caption: "金额",
10
+ caption: '金额',
11
11
  fieldType: FieldTypes.DECIMAL
12
12
  },
13
13
  currency: {
14
- caption: "币种",
14
+ caption: '币种',
15
15
  fieldType: FieldTypes.VARCHAR
16
16
  },
17
17
  result: {
18
- caption: "结果",
18
+ caption: '结果',
19
19
  fieldType: FieldTypes.DECIMAL
20
20
  },
21
21
  unit: {
22
- caption: "单位",
22
+ caption: '单位',
23
23
  fieldType: FieldTypes.VARCHAR
24
24
  },
25
25
  min: {
26
- caption: "开始时间",
26
+ caption: '开始时间',
27
27
  fieldType: FieldTypes.TIMESTAMP
28
28
  },
29
29
  max: {
30
- caption: "结束时间",
30
+ caption: '结束时间',
31
31
  fieldType: FieldTypes.TIMESTAMP
32
32
  }
33
33
  };
@@ -1,9 +1,9 @@
1
- import { CONTROL_BASE_TYPE, CONTROL_TYPE, isArray } from "@byteluck-fe/model-driven-shared";
1
+ import { CONTROL_BASE_TYPE, CONTROL_TYPE, isArray } from '@byteluck-fe/model-driven-shared';
2
2
  export function hasChildrenControl(instance) {
3
- return "children" in instance && isArray(instance.children);
3
+ return 'children' in instance && isArray(instance.children);
4
4
  }
5
5
  export function hasHeaderControl(instance) {
6
- return "headers" in instance.props && isArray(instance.props.headers);
6
+ return 'headers' in instance.props && isArray(instance.props.headers);
7
7
  }
8
8
  export function loopFormControl(control, callback) {
9
9
  if (Array.isArray(control)) {
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import Designer from "./Designer";
1
+ import Designer from './Designer';
2
2
  export { Designer };
3
- export * from "./utils";
4
- export * from "./Builder";
5
- export * from "./designerUtils";
6
- export * from "./Driven";
7
- export * from "./Store";
3
+ export * from './utils';
4
+ export * from './Builder';
5
+ export * from './designerUtils';
6
+ export * from './Driven';
7
+ export * from './Store';