Skip to content

Commit e8fa276

Browse files
MrFastDieDymoneLewis
authored andcommitted
fix: use key instead of text to allow translations
1 parent 34d0d52 commit e8fa276

File tree

1 file changed

+3
-3
lines changed
  • packages/extension/src/components/control

1 file changed

+3
-3
lines changed

packages/extension/src/components/control/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ export class Control {
130130
} else {
131131
itemContainer.append(icon)
132132
}
133-
switch (item.text) {
134-
case '上一步':
133+
switch (item.key) {
134+
case 'undo':
135135
this.lf.on('history:change', ({ data: { undoAble } }: any) => {
136136
itemContainer.className = undoAble ? NORMAL : DISABLED
137137
})
138138
break
139-
case '下一步':
139+
case 'redo':
140140
this.lf.on('history:change', ({ data: { redoAble } }: any) => {
141141
itemContainer.className = redoAble ? NORMAL : DISABLED
142142
})

0 commit comments

Comments
 (0)