fix(editor): sidebar 侧栏项 key 与 SideItemKey 常量对齐

确保侧栏配置与字段编辑时切换 tab 的 key 一致,避免硬编码字符串不一致。
This commit is contained in:
roymondchen 2026-06-16 14:12:14 +08:00
parent c811908971
commit 8933c46b73

View File

@ -257,7 +257,7 @@ const getItemConfig = (data: SideItem): SideComponent => {
slots: {}, slots: {},
}, },
layer: { layer: {
$key: 'layer', $key: SideItemKey.LAYER,
type: 'component', type: 'component',
icon: List, icon: List,
text: '已选组件', text: '已选组件',
@ -277,7 +277,7 @@ const getItemConfig = (data: SideItem): SideComponent => {
slots: {}, slots: {},
}, },
[SideItemKey.CODE_BLOCK]: { [SideItemKey.CODE_BLOCK]: {
$key: 'code-block', $key: SideItemKey.CODE_BLOCK,
type: 'component', type: 'component',
icon: EditPen, icon: EditPen,
text: '代码编辑', text: '代码编辑',