mirror of https://github.com/fantasticit/think.git
client: fix insert command
This commit is contained in:
parent
068aa17110
commit
2d5c756c0b
|
@ -17,7 +17,10 @@ export const Insert: React.FC<{ editor: Editor }> = ({ editor }) => {
|
|||
const [visible, toggleVisible] = useToggle(false);
|
||||
|
||||
const renderedCommands = useMemo(
|
||||
() => (recentUsed.length ? [{ title: '最近使用' }, ...recentUsed, ...COMMANDS] : COMMANDS),
|
||||
() =>
|
||||
(recentUsed.length ? [{ title: '最近使用' }, ...recentUsed, ...COMMANDS] : COMMANDS).filter((command) => {
|
||||
return command.label === '表格' || command.label === '布局' ? 'custom' in command : true;
|
||||
}),
|
||||
[recentUsed]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue