!2510 看图王样式添加展示纹路功能

pull/2421/MERGE
j787701730 10 months ago committed by ChenX
parent 04beadad73
commit c8fcad451e

@ -1,4 +1,5 @@
import React, { forwardRef, useEffect, useRef, useState } from "react";
import { CommandNames } from "../../../Common/CommandNames";
import { commandMachine } from "../../../Editor/CommandMachine";
import { RenderType } from "../../../GraphicsSystem/RenderType";
import { ViewStyleTypes } from "../ShareViewRules";
@ -15,6 +16,8 @@ const ViewStyle: React.FC<IProps> = forwardRef((props) =>
const [visible, setVisible] = useState<boolean>(false);
const [selected, setSelected] = useState<string>('概念');
const selectDivRef = useRef<HTMLDivElement>();
/** 纹路 */
const [selectLines, setSelectLines] = useState(false);
const hideSelect = (e: Event) =>
{
@ -86,6 +89,18 @@ const ViewStyle: React.FC<IProps> = forwardRef((props) =>
>{item.title}</li>
);
})}
<li
className={selectLines ? 'sp-selected' : ''}
onClick={async (e) =>
{
e.stopPropagation();
ForbiddenToaster(async () =>
{
await commandMachine.ExecCommand(CommandNames.SwitchLines);
setSelectLines(!selectLines);
});
}}
></li>
</ul>
</div>
);

Loading…
Cancel
Save