Commit 0239182646b78d4647a291b97bbfa07d4e8bba2b
1 parent
0884dff3
perf: data borad list add delete confirm
Showing
1 changed file
with
9 additions
and
3 deletions
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | const ListItem = List.Item; |
| 19 | 19 | const router = useRouter(); |
| 20 | 20 | |
| 21 | - const { createMessage } = useMessage(); | |
| 21 | + const { createMessage, createConfirm } = useMessage(); | |
| 22 | 22 | |
| 23 | 23 | const loading = ref(false); |
| 24 | 24 | const dataBoardList = ref<DataBoardRecord[]>([]); |
| ... | ... | @@ -81,7 +81,13 @@ |
| 81 | 81 | |
| 82 | 82 | const handleMenuEvent = (event: DropMenu, record: DataBoardRecord) => { |
| 83 | 83 | if (event.event === MoreActionEvent.EDIT) handleEdit(record); |
| 84 | - if (event.event === MoreActionEvent.DELETE) handleRemove(record); | |
| 84 | + if (event.event === MoreActionEvent.DELETE) { | |
| 85 | + createConfirm({ | |
| 86 | + iconType: 'warning', | |
| 87 | + content: '是否确认删除操作?', | |
| 88 | + onOk: () => handleRemove(record), | |
| 89 | + }); | |
| 90 | + } | |
| 85 | 91 | }; |
| 86 | 92 | |
| 87 | 93 | const handleEdit = (record: DataBoardRecord) => { |
| ... | ... | @@ -160,7 +166,7 @@ |
| 160 | 166 | </span> |
| 161 | 167 | <span v-if="item.viewType === ViewType.PUBLIC_VIEW"> |
| 162 | 168 | <Tooltip title="点击复制分享链接"> |
| 163 | - <ShareAltOutlined class="ml-2" @click="handleCopyShareUrl(item)" /> | |
| 169 | + <ShareAltOutlined class="ml-2" @click.stop="handleCopyShareUrl(item)" /> | |
| 164 | 170 | </Tooltip> |
| 165 | 171 | </span> |
| 166 | 172 | </div> | ... | ... |