@gct-paas/design 0.1.6-dev.0 → 0.1.6-dev.10

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.
Files changed (29) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/loader.esm.min.js +1 -1
  3. package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.mjs +7 -0
  4. package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +3 -0
  5. package/es/components/field-transfer/components/Transfer/FieldTransfer.mjs +9 -0
  6. package/es/components/field-transfer/components/Transfer/TransferTree.mjs +1 -0
  7. package/es/components/field-transfer/components/Transfer/TreeItem.mjs +3 -2
  8. package/es/components/field-transfer/less/AdvancedTransfer.css +2 -2
  9. package/es/components/field-transfer/less/FieldCascader.css +8 -8
  10. package/es/components/field-transfer/less/TransferTree.css +3 -3
  11. package/es/components/field-transfer/less/TreeItem.css +79 -14
  12. package/es/create-app-vue.d.ts +1 -1
  13. package/es/create-app-vue.mjs +1 -1
  14. package/es/hooks/design-view/layout/useToolkit.mjs +4 -1
  15. package/es/hooks/design-view/page/usePage.mjs +1 -1
  16. package/es/hooks/design-view/widget/useSelectedWidget.mjs +1 -0
  17. package/es/hooks/design-view/widget/useWidget.mjs +8 -0
  18. package/es/hooks/use-model-field/use-model-field.mjs +3 -0
  19. package/es/hooks/widgets/useAsyncFields.mjs +3 -0
  20. package/es/index.mjs +1 -1
  21. package/es/props/design-plugin-props.d.ts +64 -0
  22. package/es/props/{index.mjs → design-plugin-props.mjs} +1 -1
  23. package/es/props/index.d.ts +1 -64
  24. package/es/schema/common-config/base-button-config.mjs +4 -0
  25. package/es/schema/common-config/display-editor-config.mjs +4 -0
  26. package/es/schema/modal/modal.mjs +4 -0
  27. package/es/store/view/design-view.store.mjs +2 -1
  28. package/es/utils/schema/index.mjs +4 -0
  29. package/package.json +11 -11
@@ -5,16 +5,23 @@ import { createVNode, defineComponent, watch } from "vue";
5
5
  var AdvancedColumnSetting_default = /* @__PURE__ */ defineComponent({
6
6
  name: "AdvancedColumnSetting",
7
7
  props: {
8
+ /** 所有字段 */
8
9
  fields: {
9
10
  type: Array,
10
11
  required: true
11
12
  },
13
+ /** 树形数据 */
12
14
  columns: Array,
15
+ /** 是否启用多级表头 */
13
16
  useMultiLevelTHead: Boolean,
17
+ /** 是否刷新数据 */
14
18
  isResetData: Boolean,
19
+ /** 是否支持拖拽 */
15
20
  draggable: Boolean,
21
+ /** 穿梭框标题集合 */
16
22
  titles: Array,
17
23
  maxEnableCount: Number,
24
+ /** 回调方法 */
18
25
  onColumnsChange: Function
19
26
  },
20
27
  setup(props, { expose }) {
@@ -9,14 +9,17 @@ var noSearchData = "/extras-assets/design-view/pic_noresult.svg";
9
9
  var AdvancedTransfer_default = /* @__PURE__ */ defineComponent({
10
10
  name: "AdvancedTransfer",
11
11
  props: {
12
+ /** 数据源 */
12
13
  dataSource: {
13
14
  type: Array,
14
15
  required: true
15
16
  },
17
+ /** useTreeData */
16
18
  treeObj: {
17
19
  type: Object,
18
20
  required: true
19
21
  },
22
+ /** 穿梭框标题集合 */
20
23
  titles: {
21
24
  type: Array,
22
25
  default() {
@@ -9,17 +9,26 @@ var FieldTransfer_default = /* @__PURE__ */ defineComponent({
9
9
  name: "FieldTransfer",
10
10
  props: {
11
11
  objFields: Object,
12
+ /** 选中的字段数组 */
12
13
  value: Array,
14
+ /** 穿梭框标题集合 */
13
15
  titles: Array,
14
16
  maxEnableCount: Number,
15
17
  disabledFieldKey: Array,
18
+ /** 包含的字段 */
16
19
  containFieldType: Array,
20
+ /** 包含的字段Key */
17
21
  containFieldKey: Array,
22
+ /**包含的字段创建类型 */
18
23
  containCreateType: Array,
24
+ /** 排除的字段Key */
19
25
  excludeFieldKey: Array,
26
+ /** 排除的字段 */
20
27
  excludeFieldType: Array,
28
+ /**过滤函数 */
21
29
  filterFieldByFunction: Function,
22
30
  onChange: Function,
31
+ /** 是否支持拖拽 */
23
32
  draggable: Boolean
24
33
  },
25
34
  setup(props) {
@@ -10,6 +10,7 @@ var noSearchData = "/extras-assets/design-view/pic_noresult.svg";
10
10
  var TransferTree_default = /* @__PURE__ */ defineComponent({
11
11
  name: "TransferTree",
12
12
  props: {
13
+ /** useTreeData */
13
14
  treeObj: {
14
15
  type: Object,
15
16
  required: true
@@ -1,5 +1,5 @@
1
1
  import '../../less/TreeItem.css';/* empty css */
2
- import { t } from "@gct-paas/core";
2
+ import { t, useNamespace } from "@gct-paas/core";
3
3
  import { computed, createVNode, defineComponent } from "vue";
4
4
  import { Tooltip } from "ant-design-vue";
5
5
  //#region src/components/field-transfer/components/Transfer/TreeItem.tsx
@@ -13,11 +13,12 @@ var TreeItem_default = /* @__PURE__ */ defineComponent({
13
13
  draggable: Boolean
14
14
  },
15
15
  setup(props) {
16
+ const ns = useNamespace("field-transfer-tree-item");
16
17
  const editing = computed(() => {
17
18
  return props.node.isNew;
18
19
  });
19
20
  return () => {
20
- return createVNode("div", { "class": "tree-item-container" }, [createVNode("div", { "class": "tree-title" }, [createVNode(Tooltip, { "title": props.node.tooltip }, { default: () => [createVNode("span", null, [props.node.title || "-"])] })]), !editing.value && props.draggable && !props.node?.disabled && !props.node?._preset && createVNode("div", { "class": "operation-container" }, [createVNode(Tooltip, { "title": t("sys.component.fieldTransfer.move") }, { default: () => [createVNode("i", { "class": ["iconfont", "icon-drag"] }, null)] })])]);
21
+ return createVNode("div", { "class": ns.b() }, [createVNode("div", { "class": ns.e("title") }, [createVNode(Tooltip, { "title": props.node.tooltip }, { default: () => [createVNode("span", null, [props.node.title || "-"])] })]), !editing.value && props.draggable && !props.node?.disabled && !props.node?._preset && createVNode("div", { "class": ns.e("operation") }, [createVNode(Tooltip, { "title": t("sys.component.fieldTransfer.move") }, { default: () => [createVNode("i", { "class": ["iconfont", "icon-drag"] }, null)] })])]);
21
22
  };
22
23
  }
23
24
  });
@@ -3,16 +3,16 @@
3
3
  width: 100%;
4
4
  height: 100%;
5
5
  padding: 16px;
6
- border: 1px solid #f0f0f0;
7
6
  background-color: #fafafa;
7
+ border: 1px solid #f0f0f0;
8
8
  }
9
9
  .advanced-transfer-container .ant-transfer-list-body {
10
10
  height: 340px;
11
11
  }
12
12
  .advanced-transfer-container .ant-transfer-list-body .field-title {
13
13
  overflow: hidden;
14
- color: #333;
15
14
  text-overflow: ellipsis;
15
+ color: #333;
16
16
  white-space: nowrap;
17
17
  }
18
18
  .advanced-transfer-container .ant-transfer-list-body .field-title .field-icon {
@@ -5,16 +5,16 @@
5
5
  outline: none;
6
6
  }
7
7
  .field-cascader .bread {
8
- color: #333;
9
8
  display: inline-block;
10
9
  line-height: 32px;
10
+ color: #333;
11
11
  }
12
12
  .field-cascader .bread .field-cascader-title {
13
13
  color: #666;
14
14
  }
15
15
  .field-cascader .last-name {
16
- color: #333;
17
16
  margin-left: 4px;
17
+ color: #333;
18
18
  }
19
19
  .field-cascader .down-icon {
20
20
  color: #bfbfbf;
@@ -26,32 +26,32 @@
26
26
  max-width: 60vw;
27
27
  }
28
28
  .field-popup-cascader .ant-cascader-menu-item {
29
- padding: 0;
30
29
  min-width: 160px;
30
+ padding: 0;
31
31
  }
32
32
  .field-popup-cascader .ant-cascader-menu-item .ant-cascader-menu-item-content {
33
33
  display: flex;
34
34
  align-items: center;
35
35
  }
36
36
  .field-popup-cascader .ant-cascader-menu-item .field-ops {
37
+ flex: 1;
37
38
  padding-right: 0;
38
- line-height: 32px;
39
39
  padding-left: 16px;
40
- flex: 1;
40
+ line-height: 32px;
41
41
  }
42
42
  .field-popup-cascader .ant-cascader-menu-item .field-ops .field-ops-name .field-ops-desc {
43
43
  color: rgba(0, 0, 0, 0.45);
44
44
  }
45
45
  .field-popup-cascader .ant-cascader-menu-item .iconfont {
46
- font-size: 12px;
47
- padding-right: 8px;
48
46
  flex-shrink: 0;
47
+ padding-right: 8px;
48
+ font-size: 12px;
49
49
  color: rgba(0, 0, 0, 0.45);
50
50
  }
51
51
  .field-popup-cascader .ant-cascader-menu-item .ant-cascader-menu-item-expand-icon {
52
52
  display: none;
53
53
  }
54
54
  .field-popup-cascader .ant-cascader-menu-item.ant-cascader-menu-item-disabled {
55
- cursor: default;
56
55
  color: #c3c3c3;
56
+ cursor: default;
57
57
  }
@@ -17,8 +17,8 @@
17
17
  justify-content: center;
18
18
  width: 16px;
19
19
  height: 16px;
20
- color: #bfbfbf;
21
20
  font-size: 14px;
21
+ color: #bfbfbf;
22
22
  }
23
23
  .transfer-tree-container .tree-wrapper {
24
24
  flex: 1;
@@ -65,13 +65,13 @@
65
65
  opacity: 0;
66
66
  }
67
67
  .transfer-tree-container .ant-tree-switcher {
68
- display: none;
69
68
  position: relative;
70
69
  top: -1px;
70
+ display: none;
71
71
  align-self: center;
72
72
  width: 20px;
73
- background: transparent;
74
73
  color: rgba(0, 0, 0, 0.45);
74
+ background: transparent;
75
75
  }
76
76
  .transfer-tree-container .ant-tree-checkbox {
77
77
  margin-top: 0;
@@ -1,29 +1,94 @@
1
- .tree-item-container {
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-field-transfer-tree-item {
2
66
  position: relative;
3
67
  display: flex;
4
68
  align-items: center;
5
69
  }
6
- .tree-item-container:hover .operation-container {
70
+ .gct-field-transfer-tree-item:hover .gct-field-transfer-tree-item__operation {
7
71
  opacity: 1;
8
72
  }
9
- .tree-item-container .tree-title {
10
- word-break: keep-all;
11
- white-space: nowrap;
12
- overflow: hidden;
13
- text-overflow: ellipsis;
73
+ .gct-field-transfer-tree-item__title {
14
74
  flex: 1;
15
75
  width: 1px;
16
- }
17
- .tree-item-container .operation-container {
18
- opacity: 0;
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ word-break: keep-all;
19
79
  white-space: nowrap;
80
+ }
81
+
82
+ .gct-field-transfer-tree-item__operation {
20
83
  color: #8c8c8c;
84
+ white-space: nowrap;
85
+ opacity: 0;
21
86
  }
22
- .tree-item-container .operation-container .iconfont {
23
- color: #bfbfbf;
87
+ .gct-field-transfer-tree-item__operation .iconfont {
24
88
  margin: 0 4px;
25
89
  font-size: 12px;
90
+ color: #bfbfbf;
26
91
  }
27
- .tree-item-container .operation-container .iconfont:hover {
92
+ .gct-field-transfer-tree-item__operation .iconfont:hover {
28
93
  color: #595959;
29
- }
94
+ }
@@ -5,4 +5,4 @@ import { App } from 'vue';
5
5
  * @export
6
6
  * @param {App} app Vue 应用实例
7
7
  */
8
- export declare function designCreateAppVue(app: App): Promise<void>;
8
+ export declare function designCreateAppVue(app: App): void;
@@ -7,7 +7,7 @@ import editor_default from "./editor/index.mjs";
7
7
  * @export
8
8
  * @param {App} app Vue 应用实例
9
9
  */
10
- async function designCreateAppVue(app) {
10
+ function designCreateAppVue(app) {
11
11
  app.use(components_default);
12
12
  app.use(editor_default);
13
13
  }
@@ -179,7 +179,10 @@ var instance = class ComponentUtils {
179
179
  _buildKitCategory(platform, suiteKey) {
180
180
  const design = this._getDesignerRegister(platform);
181
181
  const list = !suiteKey ? [] : design.getProviders().filter((designer) => {
182
- if (designer.kit && designer.kit.length > 0) return designer.kit.includes(suiteKey);
182
+ if (designer.kit && designer.kit.length > 0) {
183
+ if (designer.kit.includes("*")) return true;
184
+ return designer.kit.includes(suiteKey);
185
+ }
183
186
  return false;
184
187
  }).map((designer) => designer.schema);
185
188
  return {
@@ -43,7 +43,7 @@ async function loadPageInfo(app) {
43
43
  };
44
44
  else pageInfo.value = platform.value === Platform.WEB ? await _api.apaas.webpage.getInfo({ id: _gct.store.context.pid }) : platform.value === Platform.PAD ? await _api.apaas.padPage.getInfo({ id: _gct.store.context.pid }) : await _api.apaas.mobilePage.getInfo({ id: _gct.store.context.pid });
45
45
  const all = [];
46
- all.push(KitPkgUtil.loadDesign(_gct.store.appInfo.suiteKey).then((module) => {
46
+ if (_gct.store.appInfo.suiteKey) all.push(KitPkgUtil.loadDesign(_gct.store.appInfo.suiteKey).then((module) => {
47
47
  if (module) module.setupApp(app);
48
48
  }));
49
49
  const _configs = [];
@@ -201,6 +201,7 @@ function useSelectedWidget() {
201
201
  formModelKey: focusFormRef.value?.props?.model,
202
202
  formId: focusFormRef.value?.id,
203
203
  nodeType: focusFormRef.value.props?.nodeType,
204
+ /**子表关联父模型 */
204
205
  refParentModelkey: focusFormRef.value.props?.refParentModelkey
205
206
  };
206
207
  return {
@@ -71,20 +71,28 @@ function useWidget(props) {
71
71
  }
72
72
  /**widget-wrapper通用的props */
73
73
  var widgetWrapperProps = {
74
+ /**组件 */
74
75
  widget: { type: Object },
76
+ /**父组件 */
75
77
  parentWidget: { type: Object },
78
+ /**父组件List */
76
79
  parentList: { type: Array },
80
+ /**在父组件列表的下标 */
77
81
  indexOfParentList: { type: Number },
82
+ /** 是否隐藏操作按钮 */
78
83
  hideAction: { type: Boolean },
84
+ /** 显示哪些操作按钮 */
79
85
  actionTypes: { type: Array },
80
86
  action: { type: Object },
81
87
  deleteCallback: { type: Function },
88
+ /**是否开启悬浮虚线 */
82
89
  showHoverLine: {
83
90
  type: Boolean,
84
91
  default: false
85
92
  }
86
93
  };
87
94
  var widgetProps = {
95
+ /**组件 */
88
96
  widget: {
89
97
  type: Object,
90
98
  require: true,
@@ -95,8 +95,11 @@ function useModelField(scope = SCOPEINFO.FIELD_FORM) {
95
95
  bindFieldKey: item.key,
96
96
  bindModelKey: item.bindInfo,
97
97
  belongModelKey: item.modelKey,
98
+ /**模型链路 */
98
99
  modelLink: link,
100
+ /**字段链路 */
99
101
  fieldLink: fieldLinks,
102
+ /**关联源模型的模型类型 */
100
103
  refOriginFieldType: fieldType
101
104
  }),
102
105
  modelLink: link,
@@ -134,8 +134,11 @@ function useAsyncOperateField() {
134
134
  }
135
135
  }
136
136
  return {
137
+ /** 同步字段属性 */
137
138
  asyncFieldAttr,
139
+ /** 同步字段信息 */
138
140
  asyncFieldInfo,
141
+ /** 断开子表字段同步 */
139
142
  unBindAsyncStatus
140
143
  };
141
144
  }
package/es/index.mjs CHANGED
@@ -91,7 +91,7 @@ import { DesignNode } from "./data/design-node/design-node.mjs";
91
91
  import { DesignContainerNode } from "./data/design-container-node/design-container-node.mjs";
92
92
  import { DesignEditorNode } from "./data/design-editor-node/design-editor-node.mjs";
93
93
  import "./data/index.mjs";
94
- import { nodeContainerProps, nodeEditorProps, nodeProps } from "./props/index.mjs";
94
+ import { nodeContainerProps, nodeEditorProps, nodeProps } from "./props/design-plugin-props.mjs";
95
95
  import { NodeBaseProvider } from "./provider/node-base/node-base.provider.mjs";
96
96
  import { DesignEditorNodeProvider } from "./provider/design-editor-node/design-editor-node.provider.mjs";
97
97
  import "./provider/index.mjs";
@@ -0,0 +1,64 @@
1
+ import { IDesignEditorNode, IDesignNode } from '@gct-paas/schema';
2
+ import { PropType } from 'vue';
3
+ /**
4
+ * 节点类型组件输入参数
5
+ */
6
+ export declare const nodeProps: {
7
+ readonly count: {
8
+ readonly type: NumberConstructor;
9
+ readonly required: true;
10
+ };
11
+ readonly data: {
12
+ readonly type: PropType<IDesignNode>;
13
+ readonly required: true;
14
+ readonly default: () => {};
15
+ };
16
+ readonly parent: {
17
+ readonly type: PropType<IDesignNode>;
18
+ };
19
+ };
20
+ /**
21
+ * 容器类型组件输入参数
22
+ */
23
+ export declare const nodeContainerProps: {
24
+ readonly count: {
25
+ readonly type: NumberConstructor;
26
+ readonly required: true;
27
+ };
28
+ readonly data: {
29
+ readonly type: PropType<IDesignNode>;
30
+ readonly required: true;
31
+ };
32
+ readonly children: {
33
+ readonly type: PropType<IDesignNode[]>;
34
+ readonly default: () => never[];
35
+ };
36
+ readonly parent: {
37
+ readonly type: PropType<IDesignNode>;
38
+ };
39
+ };
40
+ /**
41
+ * 设计编辑器节点输入参数
42
+ */
43
+ export declare const nodeEditorProps: {
44
+ readonly count: {
45
+ readonly type: NumberConstructor;
46
+ readonly required: true;
47
+ };
48
+ readonly data: {
49
+ readonly type: PropType<IDesignEditorNode>;
50
+ readonly required: true;
51
+ readonly default: () => {};
52
+ };
53
+ readonly field: {
54
+ readonly type: PropType<IObject>;
55
+ readonly required: true;
56
+ };
57
+ readonly value: {
58
+ readonly type: PropType<any>;
59
+ readonly default: "";
60
+ };
61
+ readonly parent: {
62
+ readonly type: PropType<IDesignNode>;
63
+ };
64
+ };
@@ -1,4 +1,4 @@
1
- //#region src/props/index.ts
1
+ //#region src/props/design-plugin-props.ts
2
2
  /**
3
3
  * 节点类型组件输入参数
4
4
  */
@@ -1,64 +1 @@
1
- import { IDesignEditorNode, IDesignNode } from '@gct-paas/schema';
2
- import { PropType } from 'vue';
3
- /**
4
- * 节点类型组件输入参数
5
- */
6
- export declare const nodeProps: {
7
- readonly count: {
8
- readonly type: NumberConstructor;
9
- readonly required: true;
10
- };
11
- readonly data: {
12
- readonly type: PropType<IDesignNode>;
13
- readonly required: true;
14
- readonly default: () => {};
15
- };
16
- readonly parent: {
17
- readonly type: PropType<IDesignNode>;
18
- };
19
- };
20
- /**
21
- * 容器类型组件输入参数
22
- */
23
- export declare const nodeContainerProps: {
24
- readonly count: {
25
- readonly type: NumberConstructor;
26
- readonly required: true;
27
- };
28
- readonly data: {
29
- readonly type: PropType<IDesignNode>;
30
- readonly required: true;
31
- };
32
- readonly children: {
33
- readonly type: PropType<IDesignNode[]>;
34
- readonly default: () => never[];
35
- };
36
- readonly parent: {
37
- readonly type: PropType<IDesignNode>;
38
- };
39
- };
40
- /**
41
- * 设计编辑器节点输入参数
42
- */
43
- export declare const nodeEditorProps: {
44
- count: {
45
- type: NumberConstructor;
46
- required: boolean;
47
- };
48
- data: {
49
- type: PropType<IDesignEditorNode>;
50
- required: boolean;
51
- default: () => {};
52
- };
53
- field: {
54
- type: ObjectConstructor;
55
- required: boolean;
56
- };
57
- value: {
58
- type: PropType<any>;
59
- default: string;
60
- };
61
- parent: {
62
- type: PropType<IDesignNode>;
63
- };
64
- };
1
+ export * from './design-plugin-props';
@@ -5,10 +5,14 @@ var baseBtnProp = {
5
5
  disabled: false,
6
6
  icon: "icon-park:all-application",
7
7
  iconColor: "",
8
+ /**标题 */
8
9
  title: "${sys.pageDesigner.button}",
9
10
  buttonStyle: ButtonStyle.ORDINARY,
11
+ /**二次确认 */
10
12
  confirm: false,
11
13
  confirmText: "",
14
+ /**系统事件类型 */
15
+ /**事件名称 */
12
16
  hasIcon: false,
13
17
  hasText: true,
14
18
  type: ButtonType.PRIMARY,
@@ -8,9 +8,13 @@ var displayProps = {
8
8
  componentDependency: {
9
9
  sortDependency: [],
10
10
  configDependency: {
11
+ /**隐藏 */
11
12
  [Dependency_ENUM.HIDDEN]: { expression: "" },
13
+ /**只读 */
12
14
  [Dependency_ENUM.READONLY]: { expression: "" },
15
+ /**禁用 */
13
16
  [Dependency_ENUM.DISABLED]: { expression: "" },
17
+ /**必填 */
14
18
  [Dependency_ENUM.REQUIRED]: { expression: "" },
15
19
  [Dependency_ENUM.ASSIGNMENT]: {
16
20
  expression: "",
@@ -14,9 +14,12 @@ var modal_exports = /* @__PURE__ */ __exportAll({
14
14
  });
15
15
  var widget = {
16
16
  id: "",
17
+ /**默认是WEB 添加的时候会根据当前环境改变 */
17
18
  platform: Platform.WEB,
19
+ /**系统用的name */
18
20
  name: "sys.pageDesigner.modal",
19
21
  alias: "",
22
+ /**用户新建编辑的name */
20
23
  modalName: "",
21
24
  type: BuiltinType.MODAL,
22
25
  js: "",
@@ -32,6 +35,7 @@ var widget = {
32
35
  editModalTitle: "编辑弹窗",
33
36
  hasFooter: true,
34
37
  openMode: "modal",
38
+ /**just mobile */
35
39
  mUnitType: "%",
36
40
  mModalWidth: 80
37
41
  },
@@ -227,7 +227,8 @@ var useDesignViewStore = () => {
227
227
  if (!data.pageNode) {
228
228
  const p = NodeRegister.get(DesignNodeType.PAGE, this.prefix) || NodeRegister.get(DesignNodeType.PAGE_LOWER, this.prefix);
229
229
  if (p) {
230
- this.pageNode = reactive(p.create());
230
+ const node = p.create();
231
+ this.pageNode = reactive(node);
231
232
  this.pageNode.data = reactive(this.pageNode.data || {});
232
233
  } else console.warn(`节点类型[${DesignNodeType.PAGE}],未注册适配器`);
233
234
  } else {
@@ -10,6 +10,10 @@ import { cloneWidget } from "@gct-paas/schema";
10
10
  * @return {*} {Mapping[T]}
11
11
  */
12
12
  function createWidgetByType(type) {
13
+ if (!type) {
14
+ console.warn("Widget type is not existed.");
15
+ return {};
16
+ }
13
17
  const p = designRegister.value.getProvider(type);
14
18
  if (!p) throw new Error(`Widget type ${type} is not registered.`);
15
19
  return cloneWidget(p.schema);