Browse Source

feat: 添加删除弹框

min
song 4 years ago
parent
commit
8bd74f7c75
  1. 18
      src/components/listTable.vue

18
src/components/listTable.vue

@ -22,7 +22,11 @@
<el-table-column prop="createTime" :formatter="changeDate" label="创建日期" sortable></el-table-column>
<el-table-column label="操作" key="slot">
<template #default="scope">
<el-button type="text" size="small">删除</el-button>
<el-popconfirm title="确定删除这条业务吗?" confirm-button-text="确定" cancel-button-text="再想想" @confirm="deleteBusiness">
<template #reference>
<el-button type="text" size="small">删除</el-button>
</template>
</el-popconfirm>
<el-button type="text" size="small" disabled>配置</el-button>..
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
</template>
@ -64,6 +68,18 @@ function changeDate(row) {
const value = row.createTime;
return time.dateFormat(value);
}
/**
* 删除业务
* @param {String} businessId
*/
function deleteBusiness() {
try {
// async await
} catch (error) {
console.error('error: ', error);
}
}
</script>
<style scoped>

Loading…
Cancel
Save