@dckj-npm/dc-material 0.1.133 → 0.1.135

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.
@@ -35,8 +35,13 @@ async function fetchFormOptions(): Promise<{ title: string; value: string }[]> {
35
35
  }
36
36
 
37
37
  const data = await response.json()
38
- console.log('data', data)
39
- console.log('response', response)
38
+ console.log(
39
+ 'data',
40
+ data.data.map((item: any) => ({
41
+ title: item.tableComment,
42
+ value: item.tableName,
43
+ })),
44
+ )
40
45
  return data.data.map((item: any) => ({
41
46
  title: item.tableComment,
42
47
  value: item.tableName,
@@ -67,7 +72,8 @@ const DCFormMeta: IPublicTypeComponentMetadata = {
67
72
  initialValue: 'small',
68
73
  props: {
69
74
  defaultValue: 'small',
70
- options: fetchFormOptions(),
75
+ options: [], // 初始为空数组,避免立即调用异步函数
76
+ getOptions: fetchFormOptions, // 使用 getOptions 动态获取选项
71
77
  },
72
78
  },
73
79
  },
@@ -49,15 +49,19 @@ function _fetchFormOptions() {
49
49
  return response.json();
50
50
  case 11:
51
51
  data = _context.sent;
52
- console.log('data', data);
53
- console.log('response', response);
52
+ console.log('data', data.data.map(function (item) {
53
+ return {
54
+ title: item.tableComment,
55
+ value: item.tableName
56
+ };
57
+ }));
54
58
  return _context.abrupt("return", data.data.map(function (item) {
55
59
  return {
56
60
  title: item.tableComment,
57
61
  value: item.tableName
58
62
  };
59
63
  }));
60
- case 15:
64
+ case 14:
61
65
  case "end":
62
66
  return _context.stop();
63
67
  }
@@ -88,7 +92,9 @@ var DCFormMeta = {
88
92
  initialValue: 'small',
89
93
  props: {
90
94
  defaultValue: 'small',
91
- options: fetchFormOptions()
95
+ options: [],
96
+ // 初始为空数组,避免立即调用异步函数
97
+ getOptions: fetchFormOptions // 使用 getOptions 动态获取选项
92
98
  }
93
99
  }
94
100
  }, {
@@ -95,7 +95,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
95
95
  packageName = '@dckj-npm/dc-material';
96
96
  }
97
97
  if (version === void 0) {
98
- version = '0.1.133';
98
+ version = '0.1.135';
99
99
  }
100
100
  if (basicLibraryVersion === void 0) {
101
101
  basicLibraryVersion = {
@@ -54,15 +54,19 @@ function _fetchFormOptions() {
54
54
  return response.json();
55
55
  case 11:
56
56
  data = _context.sent;
57
- console.log('data', data);
58
- console.log('response', response);
57
+ console.log('data', data.data.map(function (item) {
58
+ return {
59
+ title: item.tableComment,
60
+ value: item.tableName
61
+ };
62
+ }));
59
63
  return _context.abrupt("return", data.data.map(function (item) {
60
64
  return {
61
65
  title: item.tableComment,
62
66
  value: item.tableName
63
67
  };
64
68
  }));
65
- case 15:
69
+ case 14:
66
70
  case "end":
67
71
  return _context.stop();
68
72
  }
@@ -93,7 +97,9 @@ var DCFormMeta = {
93
97
  initialValue: 'small',
94
98
  props: {
95
99
  defaultValue: 'small',
96
- options: fetchFormOptions()
100
+ options: [],
101
+ // 初始为空数组,避免立即调用异步函数
102
+ getOptions: fetchFormOptions // 使用 getOptions 动态获取选项
97
103
  }
98
104
  }
99
105
  }, {
@@ -100,7 +100,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
100
100
  packageName = '@dckj-npm/dc-material';
101
101
  }
102
102
  if (version === void 0) {
103
- version = '0.1.133';
103
+ version = '0.1.135';
104
104
  }
105
105
  if (basicLibraryVersion === void 0) {
106
106
  basicLibraryVersion = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dckj-npm/dc-material",
3
- "version": "0.1.133",
3
+ "version": "0.1.135",
4
4
  "description": "dc低代码物料",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -103,7 +103,7 @@
103
103
  },
104
104
  "componentConfig": {
105
105
  "isComponentLibrary": true,
106
- "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.133/build/lowcode/assets-prod.json"
106
+ "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.135/build/lowcode/assets-prod.json"
107
107
  },
108
108
  "lcMeta": {
109
109
  "type": "component"