This commit is contained in:
qsh
2024-06-05 17:08:27 +08:00
parent a557255b4a
commit 94943df4f9
30 changed files with 1069 additions and 846 deletions

View File

@@ -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>