@@ -221,21 +221,23 @@ const Option = () => {
</CopyToClipboard>
) : null,
actions: [
- <Button
- key="btn-key"
- size="small"
- type="primary"
- onClick={() => {
- setState({
- ...state,
- modalType: OptionModalType.ADD,
- modalVisible: true
- })
- }}
- ghost>
- <PlusOutlined />
- 添加选项
- </Button>
+ state.activeID ? (
+ <Button
+ key="btn-key"
+ size="small"
+ type="primary"
+ onClick={() => {
+ setState({
+ ...state,
+ modalType: OptionModalType.ADD,
+ modalVisible: true
+ })
+ }}
+ ghost>
+ <PlusOutlined />
+ 添加选项
+ </Button>
+ ) : null
]
}}
components={{