Skip to content

Commit

Permalink
新增app时,可以指定icon
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Oct 10, 2024
1 parent d8a2284 commit 291c544
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions packages/@steedos-widgets/amis-object/src/amis/AmisAppLauncher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: [email protected]
* @Date: 2022-09-01 14:44:57
* @LastEditors: [email protected]
* @LastEditTime: 2024-10-09 21:07:41
* @LastEditTime: 2024-10-10 15:54:39
* @Description:
*/

Expand Down Expand Up @@ -388,7 +388,7 @@ export const AmisAppLauncher = async (props) => {
"api": {
"url": "/service/api/apps/create_by_design",
"method": "post",
"requestAdaptor": "api.data={code: context.code, name: context.name}; return api;",
"requestAdaptor": "api.data={code: context.code, name: context.name, icon: context.icon}; return api;",
"adaptor": "window.location.href=Creator.getRelativeUrl('/app/' + payload.code);return {}",
"messages": {}
},
Expand All @@ -409,6 +409,23 @@ export const AmisAppLauncher = async (props) => {
"type": "input-text",
"label": "显示名称",
"required": true
},
{
"type": "steedos-field",
"label": "图标",
"config": {
"label": "图标",
"type": "lookup",
"required": true,
"sort_no": 30,
"optionsFunction": "function anonymous() { var options; options = []; _.forEach(Creator.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }",
"name": "icon",
"inlineHelpText": "",
"description": "",
"hidden": false,
"readonly": false,
"disabled": false
}
}
]
}
Expand Down

0 comments on commit 291c544

Please sign in to comment.