2024-11-13 12:41:33 +08:00
|
|
|
import { Card, Collapse, CollapseProps, Form } from 'antd';
|
2025-02-22 14:58:48 +08:00
|
|
|
import React, { useEffect, useState } from 'react';
|
2024-11-13 12:41:33 +08:00
|
|
|
import SimpleOptions from './SimpleOptions';
|
|
|
|
|
import TrailOptions from './TrialOptions';
|
2025-02-22 14:58:48 +08:00
|
|
|
import ImageOptions from './ImageOptions';
|
2024-10-18 12:46:58 +08:00
|
|
|
|
|
|
|
|
|
2024-11-13 12:41:33 +08:00
|
|
|
const DubSetting: React.FC = () => {
|
2025-02-22 14:58:48 +08:00
|
|
|
const [activeKeys, setActiveKeys] = useState<string[]>([]);
|
2024-10-18 12:46:58 +08:00
|
|
|
|
2024-11-13 12:41:33 +08:00
|
|
|
const onChange = (key: string | string[]) => {
|
2025-02-22 14:58:48 +08:00
|
|
|
setActiveKeys(Array.isArray(key) ? key : [key]);
|
2024-11-13 12:41:33 +08:00
|
|
|
};
|
2024-10-18 12:46:58 +08:00
|
|
|
|
2024-11-13 12:41:33 +08:00
|
|
|
const items: CollapseProps['items'] = [
|
|
|
|
|
{
|
|
|
|
|
key: 'simpleOptions',
|
2025-02-22 14:58:48 +08:00
|
|
|
label: <strong>通用配置</strong>,
|
|
|
|
|
children: <SimpleOptions visible={activeKeys.includes('simpleOptions')} />,
|
2024-11-13 12:41:33 +08:00
|
|
|
}, {
|
|
|
|
|
key: 'trailOptions',
|
2025-02-22 14:58:48 +08:00
|
|
|
label: <strong>试用设置</strong>,
|
|
|
|
|
children: <TrailOptions visible={activeKeys.includes('trailOptions')} />,
|
|
|
|
|
}, {
|
|
|
|
|
key: 'imageOptions',
|
|
|
|
|
label: <strong>绘图设置</strong>,
|
|
|
|
|
children: <ImageOptions visible={activeKeys.includes('imageOptions')} />,
|
2024-10-18 12:46:58 +08:00
|
|
|
}
|
2024-11-13 12:41:33 +08:00
|
|
|
];
|
2024-10-18 12:46:58 +08:00
|
|
|
|
|
|
|
|
return (
|
2024-11-13 12:41:33 +08:00
|
|
|
<Collapse items={items} bordered={false} ghost onChange={onChange} />
|
2024-10-18 12:46:58 +08:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-13 12:41:33 +08:00
|
|
|
export default DubSetting;
|