|
@@ -56,15 +56,26 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template v-if="column.key === 'enable'">
|
|
<template v-if="column.key === 'enable'">
|
|
- <a-switch
|
|
|
|
- v-model:checked="record.isEnable"
|
|
|
|
- @click="swtichTemplateHandler(record.id, record.enable, record)"
|
|
|
|
- />
|
|
|
|
|
|
+ <a-popconfirm
|
|
|
|
+ :title="`确认${record.isEnable ? '禁用' : '启用'}模板吗?`"
|
|
|
|
+ ok-text="确认"
|
|
|
|
+ cancel-text="取消"
|
|
|
|
+ @confirm="swtichTemplateHandler(record.id, record.enable, record)"
|
|
|
|
+ >
|
|
|
|
+ <a-switch :checked="record.isEnable" />
|
|
|
|
+ </a-popconfirm>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
<template v-if="column.key === 'action'">
|
|
<a-button type="link" @click="editTemplateHandler(record)">编辑</a-button>
|
|
<a-button type="link" @click="editTemplateHandler(record)">编辑</a-button>
|
|
- <a-button type="link" @click="deleteTemplateHandler(record.id)">删除</a-button>
|
|
|
|
|
|
+ <a-popconfirm
|
|
|
|
+ title="确认删除模板吗?"
|
|
|
|
+ ok-text="确认"
|
|
|
|
+ cancel-text="取消"
|
|
|
|
+ @confirm="deleteTemplateHandler(record.id)"
|
|
|
|
+ >
|
|
|
|
+ <a-button type="link">删除</a-button>
|
|
|
|
+ </a-popconfirm>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</a-table>
|
|
</a-table>
|