fix: 🐛 修复区块面板命名冲突的问题

This commit is contained in:
凤矗 2020-05-07 21:24:10 +08:00
parent a891e3be01
commit de50ebfd69

View File

@ -95,10 +95,10 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
};
if (contents && Array.isArray(contents)) {
newConfig.content = contents.map(({ title, content, tip }) => {
newConfig.content = contents.map(({ title, content, tip }, index) => {
return {
type: "Panel",
name: title,
name: typeof title === 'string' ? title : `${name}:${index}`,
content,
props: {
title,