|
|
|
@ -72,16 +72,21 @@ const AddComponentModal = ({ visible, baseInfo, setVisible, onReFresh }) => {
|
|
|
|
width: 240,
|
|
|
|
width: 240,
|
|
|
|
render: (_, record) => (
|
|
|
|
render: (_, record) => (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Button type="text" onClick={() => {
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
onClick={() => {
|
|
|
|
// 设置选中的API数据,用于编辑时回显
|
|
|
|
// 设置选中的API数据,用于编辑时回显
|
|
|
|
setSelectedApiData(record);
|
|
|
|
setSelectedApiData(record);
|
|
|
|
setShowApiModal(true);
|
|
|
|
setShowApiModal(true);
|
|
|
|
}}>
|
|
|
|
}}
|
|
|
|
|
|
|
|
disabled={!['DEFAULT', 'DESIGN'].includes(baseInfo.componentStatus)}
|
|
|
|
|
|
|
|
>
|
|
|
|
编辑
|
|
|
|
编辑
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
status="danger"
|
|
|
|
status="danger"
|
|
|
|
|
|
|
|
disabled={!['DEFAULT', 'DESIGN'].includes(baseInfo.componentStatus)}
|
|
|
|
onClick={async () => {
|
|
|
|
onClick={async () => {
|
|
|
|
// 显示删除确认框
|
|
|
|
// 显示删除确认框
|
|
|
|
Modal.confirm({
|
|
|
|
Modal.confirm({
|
|
|
|
@ -542,7 +547,18 @@ const AddComponentModal = ({ visible, baseInfo, setVisible, onReFresh }) => {
|
|
|
|
<div className={styles['last-half-header']}>
|
|
|
|
<div className={styles['last-half-header']}>
|
|
|
|
<p> 组件接口</p>
|
|
|
|
<p> 组件接口</p>
|
|
|
|
<Space split={<Divider type="vertical" />}>
|
|
|
|
<Space split={<Divider type="vertical" />}>
|
|
|
|
<Button size="small" type="secondary" style={{ borderRadius: 5 }} disabled={true}>代码初始化</Button>
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="secondary"
|
|
|
|
|
|
|
|
style={{ borderRadius: 5 }}
|
|
|
|
|
|
|
|
disabled={!componentDesignData || componentDesignData.length === 0}
|
|
|
|
|
|
|
|
onClick={() => {
|
|
|
|
|
|
|
|
// TODO: 实现代码初始化逻辑
|
|
|
|
|
|
|
|
console.log('代码初始化');
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
代码初始化
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@ -551,6 +567,7 @@ const AddComponentModal = ({ visible, baseInfo, setVisible, onReFresh }) => {
|
|
|
|
setSelectedApiData(null); // 确保新增时清空选中的API数据
|
|
|
|
setSelectedApiData(null); // 确保新增时清空选中的API数据
|
|
|
|
setShowApiModal(true);
|
|
|
|
setShowApiModal(true);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
|
|
|
|
disabled={!['DEFAULT', 'DESIGN'].includes(baseInfo.componentStatus)}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
+ 新增接口
|
|
|
|
+ 新增接口
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
|