增加工具栏提示。
This commit is contained in:
parent
18725c5ef7
commit
989abcae89
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user