// 删除文章分类
export const artDelChannelService = (id) =>
request.delete('/my/cate/del', {
params: { id }
})
在view文件夹中的article文件夹中的ArticleChannel.vue文件中的代码
const onDelChannel = async (row) => {
await ElMessageBox.confirm('你确认要删除已该分类吗', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消'
})
await artDelChannelService(row.id)
ElMessage.success('删除成功')
getChannelList()
}
view文件夹中的article文件夹中的ArticleChannel.vue文件中的全部代码
<script setup>
import { ref } from 'vue'
import { Edit, Delete } from '@element-plus/icons-vue'
import { artGetChannelsService, artDelChannelService } from '../../api/article'
import ChannelEdit from './components/ChannelE