feat: 【antd】【iot】启用状态的产品不能删除
This commit is contained in:
@@ -195,16 +195,33 @@ defineExpose({
|
|||||||
/>
|
/>
|
||||||
物模型
|
物模型
|
||||||
</Button>
|
</Button>
|
||||||
|
<Tooltip v-if="item.status === 1" title="启用状态的产品不能删除">
|
||||||
|
<Button
|
||||||
|
size="small"
|
||||||
|
danger
|
||||||
|
disabled
|
||||||
|
class="action-btn action-btn-delete !w-[32px]"
|
||||||
|
>
|
||||||
|
<IconifyIcon
|
||||||
|
icon="ant-design:delete-outlined"
|
||||||
|
class="text-[14px]"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
|
v-else
|
||||||
:title="`确认删除产品 ${item.name} 吗?`"
|
:title="`确认删除产品 ${item.name} 吗?`"
|
||||||
@confirm="emit('delete', item)"
|
@confirm="emit('delete', item)"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
danger
|
danger
|
||||||
class="action-btn action-btn-delete"
|
class="action-btn action-btn-delete !w-[32px]"
|
||||||
>
|
>
|
||||||
<IconifyIcon icon="ant-design:delete-outlined" />
|
<IconifyIcon
|
||||||
|
icon="ant-design:delete-outlined"
|
||||||
|
class="text-[14px]"
|
||||||
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user