File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
apps/playground/src/helpers
designer/src/components/variable-tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -377,13 +377,16 @@ export default defineServices({
377
377
add: {
378
378
url: 'https://nei.hz.netease.com/api/apimock-v2/c45109399a1d33d83e32a59984b25b00/api/users',
379
379
method: 'post',
380
+ description: '新增用户'
380
381
},
381
382
update: {
382
383
url: 'https://nei.hz.netease.com/api/apimock-v2/c45109399a1d33d83e32a59984b25b00/api/users',
383
384
method: 'post',
385
+ description: '更新用户'
384
386
},
385
387
delete: {
386
388
url: 'https://nei.hz.netease.com/api/apimock-v2/c45109399a1d33d83e32a59984b25b00/api/users?id=1',
389
+ description: '删除用户'
387
390
},
388
391
});
389
392
` ;
Original file line number Diff line number Diff line change @@ -90,12 +90,15 @@ export const useWorkspaceData = () => {
90
90
key : prefix ,
91
91
selectable : false ,
92
92
showAddButton : true ,
93
- children : Object . keys ( file . serviceFunctions || { } ) . map ( ( key ) => ( {
94
- title : key ,
95
- key : [ prefix , key ] . join ( '.' ) ,
96
- type : 'function' ,
97
- showRemoveButton : true ,
98
- } ) ) ,
93
+ children : Object . entries ( file . serviceFunctions || { } ) . map ( ( [ key , value ] ) => {
94
+ const title = value . description ? `${ key } (${ value . description } )` : key ;
95
+ return {
96
+ title,
97
+ key : [ prefix , key ] . join ( '.' ) ,
98
+ type : 'function' ,
99
+ showRemoveButton : true ,
100
+ } ;
101
+ } ) ,
99
102
} ) ;
100
103
} ) ;
101
104
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ export function AddServiceForm({
88
88
>
89
89
< Input placeholder = "请输入数据服务调用名称" disabled = { disabled || isModifyMode } />
90
90
</ Form . Item >
91
+ { /* 备注 */ }
92
+ < Form . Item label = "备注" name = "description" >
93
+ < Input placeholder = "请输入备注信息" />
94
+ </ Form . Item >
91
95
< Form . Item label = "路径" name = "url" rules = { [ { required : true , type : 'url' } ] } >
92
96
< Input placeholder = "请输入数据服务调用名称" disabled = { disabled || isModifyMode } />
93
97
</ Form . Item >
You can’t perform that action at this time.
0 commit comments