联调
This commit is contained in:
@@ -32,8 +32,10 @@
|
||||
/>
|
||||
<el-table-column label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text @click="openForm('update', scope.row.id)">修改</el-button>
|
||||
<el-button type="danger" text @click="handleDelete(scope.row.id)">删除</el-button>
|
||||
<el-button type="primary" text @click="openForm('update', scope.row.brandId)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="danger" text @click="handleDelete(scope.row.brandId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -54,6 +56,9 @@ import { dateFormatter } from '@/utils/formatTime'
|
||||
import * as ProductBrandApi from '@/api/mall/product/brand'
|
||||
import DialogBrand from './DialogBrand.vue'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const searchForm = ref({
|
||||
name: undefined,
|
||||
pageNo: 1,
|
||||
@@ -102,8 +107,14 @@ async function handleDelete(id) {
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user