增加工具栏提示。

This commit is contained in:
dengqichen 2024-12-13 12:44:58 +08:00
parent 18725c5ef7
commit 989abcae89

View File

@ -3,7 +3,7 @@ export const PORT_GROUPS = ['top', 'right', 'bottom', 'left'] as const;
// 转换后端端口配置为X6格式
export const convertPortConfig = (ports: any = {}) => {
const { groups = {}, types = [] } = ports;
const { groups = {} } = ports;
// 转换groups配置
const processedGroups: any = {};
@ -20,9 +20,9 @@ export const convertPortConfig = (ports: any = {}) => {
};
});
// 转换items配置
const items = types.map(type => ({
group: type
// 如果没有types就用groups的key作为默认的items
const items = Object.keys(groups).map(group => ({
group: group
}));
return {