feat: 商品上架优化
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
<template #gender="scope">
|
||||
<DictLabel v-model="scope.row[scope.prop]" code="gender" />
|
||||
</template>
|
||||
<template #switchs="scope">
|
||||
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0" active-text="启用"
|
||||
inactive-text="禁用" @change="handleSwitchChange"></el-switch>
|
||||
</template>
|
||||
<template #mobile="scope">
|
||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||
@@ -103,6 +107,11 @@ async function handleAddClick() {
|
||||
// 加载角色下拉数据源
|
||||
// addModalConfig.formItems[4]!.options = await RoleAPI.getOptions();
|
||||
}
|
||||
// 上架
|
||||
function handleSwitchChange(val: boolean, row: IObject) {
|
||||
console.log(val, row);
|
||||
// UserAPI.updateById({ id: row.id, isSale: val ? 1 : 0 });
|
||||
}
|
||||
// 编辑
|
||||
async function handleEditClick(row: IObject) {
|
||||
router.push({ name: 'addgoods', query: { goods_id: row.id } });
|
||||
|
||||
Reference in New Issue
Block a user