ronds-metadata 1.2.11 → 1.2.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
- .metadata-edit {
2
- height: 100%;
3
- width: 100%;
4
- .ant-row {
5
- display: block;
6
- }
7
- .pr-10 {
8
- padding-right: 10px;
9
- }
10
- }
1
+ .metadata-edit {
2
+ height: 100%;
3
+ width: 100%;
4
+ .ant-row {
5
+ display: block;
6
+ }
7
+ .pr-10 {
8
+ padding-right: 10px;
9
+ }
10
+ }
@@ -1,20 +1,20 @@
1
- export interface IMetaFileds {
2
- id: string;
3
- type: 'object';
4
- properties: any[];
5
- value: any;
6
- }
7
-
8
- export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
-
10
- export type IMetaProperty = {
11
- /**
12
- * 属性的名称
13
- */
14
- id: string;
15
- /**
16
- * 类型
17
- */
18
- type: string;
19
- enum?: any[];
20
- };
1
+ export interface IMetaFileds {
2
+ id: string;
3
+ type: 'object';
4
+ properties: any[];
5
+ value: any;
6
+ }
7
+
8
+ export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
+
10
+ export type IMetaProperty = {
11
+ /**
12
+ * 属性的名称
13
+ */
14
+ id: string;
15
+ /**
16
+ * 类型
17
+ */
18
+ type: string;
19
+ enum?: any[];
20
+ };
@@ -17,7 +17,7 @@ import _Input from "antd/es/input";
17
17
  /*
18
18
  * @Author: wangxian
19
19
  * @Date: 2021-09-18 14:15:04
20
- * @LastEditTime: 2023-02-25 11:21:22
20
+ * @LastEditTime: 2023-02-28 10:18:07
21
21
  */
22
22
  import React from 'react';
23
23
  import { UploadOutlined } from '@ant-design/icons';
@@ -31,6 +31,7 @@ function Index(props) {
31
31
  var id = props.id,
32
32
  isRefForm = props.isRefForm,
33
33
  disabled = props.disabled,
34
+ notRequire = props.notRequire,
34
35
  field = props.field,
35
36
  labelSpan = props.labelSpan,
36
37
  name = props.name,
@@ -145,7 +146,7 @@ function Index(props) {
145
146
  } : undefined,
146
147
  name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter5 = extraInfo.addonAfter) === null || _extraInfo$addonAfter5 === void 0 ? void 0 : _extraInfo$addonAfter5.key) ? [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name), ['value']) : [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
147
148
  rules: [{
148
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
149
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
149
150
  }].concat(_toConsumableArray(rules)),
150
151
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
151
152
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -176,7 +177,7 @@ function Index(props) {
176
177
  } : undefined,
177
178
  name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter6 = extraInfo.addonAfter) === null || _extraInfo$addonAfter6 === void 0 ? void 0 : _extraInfo$addonAfter6.key) ? [].concat(_toConsumableArray(name), ['value']) : name,
178
179
  rules: [{
179
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
180
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
180
181
  }].concat(_toConsumableArray(rules)),
181
182
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
182
183
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -187,7 +188,7 @@ function Index(props) {
187
188
  },
188
189
  name: [field === null || field === void 0 ? void 0 : field.name],
189
190
  rules: [{
190
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
191
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
191
192
  }].concat(_toConsumableArray(rules)),
192
193
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
193
194
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
9
  /*
10
10
  * @Author: wangxian
11
11
  * @Date: 2021-09-18 14:15:04
12
- * @LastEditTime: 2023-02-23 16:31:33
12
+ * @LastEditTime: 2023-02-28 10:19:20
13
13
  */
14
14
  import React from 'react';
15
15
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -22,6 +22,7 @@ function Index(props) {
22
22
  name = props.name,
23
23
  isRefForm = props.isRefForm,
24
24
  disabled = props.disabled,
25
+ notRequire = props.notRequire,
25
26
  labelSpan = props.labelSpan,
26
27
  field = props.field,
27
28
  isObj = props.isObj;
@@ -72,7 +73,7 @@ function Index(props) {
72
73
  offset: 0
73
74
  } : undefined,
74
75
  rules: [{
75
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
76
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
76
77
  }].concat(_toConsumableArray(rules)),
77
78
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
78
79
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -103,7 +104,7 @@ function Index(props) {
103
104
  } : undefined,
104
105
  name: name,
105
106
  rules: [{
106
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
107
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
107
108
  }].concat(_toConsumableArray(rules)),
108
109
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
109
110
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -117,7 +118,7 @@ function Index(props) {
117
118
  },
118
119
  name: [field === null || field === void 0 ? void 0 : field.name],
119
120
  rules: [{
120
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
121
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
121
122
  }].concat(_toConsumableArray(rules)),
122
123
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
123
124
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -32,7 +32,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
32
32
  /*
33
33
  * @Author:wangxian
34
34
  * @Date: 2021-09-18 14:15:04
35
- * @LastEditTime: 2023-02-28 08:33:52
35
+ * @LastEditTime: 2023-02-28 10:19:57
36
36
  */
37
37
  import React from 'react';
38
38
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -54,6 +54,7 @@ function Index(props) {
54
54
  initEnumValue = _props$initEnumValue === void 0 ? {} : _props$initEnumValue,
55
55
  disabled = props.disabled,
56
56
  field = props.field,
57
+ notRequire = props.notRequire,
57
58
  labelSpan = props.labelSpan,
58
59
  isObj = props.isObj,
59
60
  _props$enum = props.enum,
@@ -508,7 +509,7 @@ function Index(props) {
508
509
  } : undefined,
509
510
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
510
511
  rules: [{
511
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
512
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
512
513
  }],
513
514
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
514
515
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -536,7 +537,7 @@ function Index(props) {
536
537
  } : undefined,
537
538
  name: name,
538
539
  rules: [{
539
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
540
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
540
541
  }],
541
542
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
542
543
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -547,7 +548,7 @@ function Index(props) {
547
548
  },
548
549
  name: [field === null || field === void 0 ? void 0 : field.name],
549
550
  rules: [{
550
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
551
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
551
552
  }],
552
553
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
553
554
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -8,7 +8,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
8
8
  /*
9
9
  * @Author: wangxian
10
10
  * @Date: 2021-09-18 14:15:04
11
- * @LastEditTime: 2023-02-23 19:34:31
11
+ * @LastEditTime: 2023-02-28 10:01:17
12
12
  */
13
13
  import React from 'react';
14
14
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -21,6 +21,7 @@ function Index(props) {
21
21
  name = props.name,
22
22
  isRefForm = props.isRefForm,
23
23
  disabled = props.disabled,
24
+ notRequire = props.notRequire,
24
25
  labelSpan = props.labelSpan,
25
26
  field = props.field,
26
27
  isObj = props.isObj;
@@ -52,7 +53,7 @@ function Index(props) {
52
53
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
53
54
  valuePropName: "checked",
54
55
  rules: [{
55
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
56
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
56
57
  }],
57
58
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
58
59
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -85,7 +86,7 @@ function Index(props) {
85
86
  name: name,
86
87
  valuePropName: "checked",
87
88
  rules: [{
88
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
89
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
89
90
  }],
90
91
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
91
92
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -101,7 +102,7 @@ function Index(props) {
101
102
  name: [field === null || field === void 0 ? void 0 : field.name],
102
103
  valuePropName: "checked",
103
104
  rules: [{
104
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
105
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
105
106
  }],
106
107
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
107
108
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -9,7 +9,7 @@ import { MetadataFormContext } from '../interface';
9
9
  import './index.less';
10
10
  export function withAddOnAfter(WrappedComponent) {
11
11
  return function (props) {
12
- var _fields$, _fields$$value, _fields$$value$common, _fields$4, _fields$4$value, _fields$4$value$commo, _fields$4$value$commo2;
12
+ var _fields$, _fields$$value, _fields$$value$common, _fields$4, _fields$4$value, _fields$4$value$commo, _fields$4$value$commo2, _fields$5, _fields$5$value, _fields$5$value$commo;
13
13
 
14
14
  var type = props.type,
15
15
  refId = props.refId,
@@ -102,7 +102,7 @@ export function withAddOnAfter(WrappedComponent) {
102
102
  return /*#__PURE__*/React.createElement(React.Fragment, null);
103
103
  }
104
104
 
105
- return /*#__PURE__*/React.createElement(_Col, {
105
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Col, {
106
106
  key: id,
107
107
  span: cellColSpan
108
108
  }, /*#__PURE__*/React.createElement("div", {
@@ -117,9 +117,10 @@ export function withAddOnAfter(WrappedComponent) {
117
117
  },
118
118
  name: _name,
119
119
  labelSpan: labelSpan,
120
- isObj: isObj
120
+ isObj: isObj,
121
+ notRequire: depend === null || depend === void 0 ? void 0 : depend.notRequire
121
122
  })), isShowTypeInfo && !field && type !== 'number' && type !== 'bool' && /*#__PURE__*/React.createElement("div", {
122
123
  className: "with-add-on-after-extra"
123
- }, help !== null && help !== void 0 ? help : type)));
124
+ }, help !== null && help !== void 0 ? help : type))), fields && ((_fields$5 = fields[0]) === null || _fields$5 === void 0 ? void 0 : (_fields$5$value = _fields$5.value) === null || _fields$5$value === void 0 ? void 0 : (_fields$5$value$commo = _fields$5$value.common) === null || _fields$5$value$commo === void 0 ? void 0 : _fields$5$value$commo.br) && /*#__PURE__*/React.createElement(_Col, null));
124
125
  };
125
126
  }
@@ -1,35 +1,35 @@
1
- .with-add-on-after {
2
- --card-bg: #ffffff;
3
- position: relative;
4
- width: 100%;
5
-
6
- .ant-form-item-label {
7
- padding: 0 !important;
8
- }
9
-
10
- & > .ant-form-item {
11
- padding: 0 0 8px !important;
12
- flex: 1;
13
- }
14
- &-extra {
15
- position: absolute;
16
- right: 20px;
17
- top: 18px;
18
- padding: 0 6px;
19
- background-color: var(--card-bg);
20
- z-index: 1000;
21
- }
22
- &-ref {
23
- position: absolute;
24
- right: 20px;
25
- top: -10px;
26
- padding: 0 6px;
27
- background-color: var(--card-bg);
28
- z-index: 1000;
29
- }
30
- /* .ant-col-2.7 {
31
- display: block;
32
- flex: 0 0 75%;
33
- max-width: 75%;
34
- } */
35
- }
1
+ .with-add-on-after {
2
+ --card-bg: #ffffff;
3
+ position: relative;
4
+ width: 100%;
5
+
6
+ .ant-form-item-label {
7
+ padding: 0 !important;
8
+ }
9
+
10
+ & > .ant-form-item {
11
+ padding: 0 0 8px !important;
12
+ flex: 1;
13
+ }
14
+ &-extra {
15
+ position: absolute;
16
+ right: 20px;
17
+ top: 18px;
18
+ padding: 0 6px;
19
+ background-color: var(--card-bg);
20
+ z-index: 1000;
21
+ }
22
+ &-ref {
23
+ position: absolute;
24
+ right: 20px;
25
+ top: -10px;
26
+ padding: 0 6px;
27
+ background-color: var(--card-bg);
28
+ z-index: 1000;
29
+ }
30
+ /* .ant-col-2.7 {
31
+ display: block;
32
+ flex: 0 0 75%;
33
+ max-width: 75%;
34
+ } */
35
+ }
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  /*
6
6
  * @Author: your name
7
7
  * @Date: 2021-09-18 14:15:04
8
- * @LastEditTime: 2023-02-23 14:53:08
8
+ * @LastEditTime: 2023-02-28 11:03:50
9
9
  */
10
10
  import { getLocale } from '../../../framework/locale';
11
11
  import moment from 'moment';
@@ -89,6 +89,17 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$) {
89
89
  setDepends(_objectSpread({}, _dr2));
90
90
  dependsRef.current = _dr2;
91
91
  }
92
+
93
+ if (_depends === null || _depends === void 0 ? void 0 : _depends.notRequire) {
94
+ var _p$payload3;
95
+
96
+ var _show2 = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.notRequire, p === null || p === void 0 ? void 0 : (_p$payload3 = p.payload) === null || _p$payload3 === void 0 ? void 0 : _p$payload3.allVals, stream$);
97
+
98
+ var _dr3 = dependsRef.current;
99
+ _dr3.notRequire = _show2;
100
+ setDepends(_objectSpread({}, _dr3));
101
+ dependsRef.current = _dr3;
102
+ }
92
103
  }
93
104
  });
94
105
  }
@@ -99,7 +110,7 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$) {
99
110
  var processDependHiddenOrShow = function processDependHiddenOrShow(depend, changeData, stream$) {
100
111
  try {
101
112
  // const regex = /\w+(\.\w+)?[=<>!]{1}/g;
102
- var regex = /\w+(\.\w+)?[=<>!]{1}|\w+(\.\w+)?(\.indexOf\('\w+'\)[=<>!]{1})/g;
113
+ var regex = /\w+(\.\w+)?[=<>!]{1}|\w+(\.\w+)?(\.indexOf\('.+'\)[=<>!]{1})/g;
103
114
  var keys = depend.trim().match(regex);
104
115
 
105
116
  if (!keys) {
@@ -31,7 +31,7 @@ export interface IMetaFormProps {
31
31
  id: string;
32
32
  idx?: number;
33
33
  type: string;
34
- require?: boolean;
34
+ notRequire?: boolean;
35
35
  disabled?: boolean;
36
36
  isRefForm?: boolean;
37
37
  initEnumValue?: any;
@@ -53,6 +53,7 @@ export interface IMetaFormProps {
53
53
  export declare type IFiledDepend = {
54
54
  hidden: string;
55
55
  show: string;
56
+ notRequire: string;
56
57
  };
57
58
  export declare type IStreamEventType = 'onSelectChange' | 'onButtonCellClick' | 'onValuesChange' | 'onWatchDepend' | string;
58
59
  export declare type IStreamEvent = {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author:wangxian
3
3
  * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2023-02-22 15:51:59
4
+ * @LastEditTime: 2023-02-28 10:14:07
5
5
  */
6
6
  import React from 'react';
7
7
  export var MetadataFormContext = /*#__PURE__*/React.createContext(null);
@@ -1,98 +1,98 @@
1
- /*
2
- * @Author: wangxian
3
- * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2023-02-09 18:37:15
5
- */
6
- export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
-
8
- export type IMetaData = {
9
- /**
10
- * 类名称/属性名称
11
- */
12
- id: string;
13
- /**
14
- * 类型
15
- */
16
- type: IMetaType;
17
- /**
18
- * 属性
19
- */
20
- properties?: IMetaProperties[];
21
-
22
- /**
23
- * 引用id
24
- */
25
- refId?: string;
26
- /**
27
- * 静态的变量
28
- */
29
- fields?: IMetaFileds[];
30
- /**
31
- * 内部类
32
- */
33
- types?: IMetaData[];
34
- };
35
-
36
- export type IMetaProperties = {
37
- /**
38
- * 类规则名称
39
- */
40
- id: string;
41
-
42
- /**
43
- * 类型
44
- */
45
- type: IMetaType;
46
-
47
- /**
48
- * 引用id
49
- */
50
- refId?: string;
51
- /**
52
- * 静态的变量
53
- */
54
- fields?: IMetaFileds[];
55
- /**
56
- * 枚举值
57
- */
58
- enum?: { value: string }[];
59
- /**
60
- * 数组类型
61
- */
62
- items?: { type: IMetaType; refId?: string };
63
- };
64
-
65
- export type IMetaFileds = {
66
- /**
67
- * 规则名称
68
- */
69
- id: string;
70
-
71
- /**
72
- * 类型
73
- */
74
- type: IMetaType;
75
-
76
- /**
77
- * 引用id
78
- */
79
- refId?: string;
80
-
81
- /**
82
- * 规则值
83
- */
84
- value: any;
85
- };
86
-
87
- export interface IAPI {
88
- // 获取元数据列表
89
- GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
- // 通过元数据Id获取元数据详情
91
- GetMetadataDetailById(metadataId: string): Promise<any>;
92
- // 新增元数据
93
- SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
- // 获取元数据的值
95
- GetMetadataObjList(data: any): Promise<any[]>;
96
- /** 通过扩展规则获取枚举类型的值 */
97
- GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
- }
1
+ /*
2
+ * @Author: wangxian
3
+ * @Date: 2021-09-18 14:15:04
4
+ * @LastEditTime: 2023-02-09 18:37:15
5
+ */
6
+ export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
+
8
+ export type IMetaData = {
9
+ /**
10
+ * 类名称/属性名称
11
+ */
12
+ id: string;
13
+ /**
14
+ * 类型
15
+ */
16
+ type: IMetaType;
17
+ /**
18
+ * 属性
19
+ */
20
+ properties?: IMetaProperties[];
21
+
22
+ /**
23
+ * 引用id
24
+ */
25
+ refId?: string;
26
+ /**
27
+ * 静态的变量
28
+ */
29
+ fields?: IMetaFileds[];
30
+ /**
31
+ * 内部类
32
+ */
33
+ types?: IMetaData[];
34
+ };
35
+
36
+ export type IMetaProperties = {
37
+ /**
38
+ * 类规则名称
39
+ */
40
+ id: string;
41
+
42
+ /**
43
+ * 类型
44
+ */
45
+ type: IMetaType;
46
+
47
+ /**
48
+ * 引用id
49
+ */
50
+ refId?: string;
51
+ /**
52
+ * 静态的变量
53
+ */
54
+ fields?: IMetaFileds[];
55
+ /**
56
+ * 枚举值
57
+ */
58
+ enum?: { value: string }[];
59
+ /**
60
+ * 数组类型
61
+ */
62
+ items?: { type: IMetaType; refId?: string };
63
+ };
64
+
65
+ export type IMetaFileds = {
66
+ /**
67
+ * 规则名称
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * 类型
73
+ */
74
+ type: IMetaType;
75
+
76
+ /**
77
+ * 引用id
78
+ */
79
+ refId?: string;
80
+
81
+ /**
82
+ * 规则值
83
+ */
84
+ value: any;
85
+ };
86
+
87
+ export interface IAPI {
88
+ // 获取元数据列表
89
+ GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
+ // 通过元数据Id获取元数据详情
91
+ GetMetadataDetailById(metadataId: string): Promise<any>;
92
+ // 新增元数据
93
+ SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
+ // 获取元数据的值
95
+ GetMetadataObjList(data: any): Promise<any[]>;
96
+ /** 通过扩展规则获取枚举类型的值 */
97
+ GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
+ }