修改管理端bug

This commit is contained in:
mabo
2021-05-17 17:38:04 +08:00
parent eeb2e94d52
commit da5cc8335f
9 changed files with 79 additions and 49 deletions

View File

@@ -19,11 +19,14 @@
<Row class="operation">
<Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" @input="goodsData[index].price = row.price" />
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template>
<template slot-scope="{ row }" slot="QRCode">
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
</template>
<template slot-scope="{ index }" slot="action">
<Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)">删除</Button>
</template>
</Table>
</Row>
<Row type="flex" justify="end" class="page operation">
@@ -138,27 +141,9 @@ export default {
{
title: "操作",
key: "action",
slot: "action",
minWidth: 50,
align: "center",
render: (h, params) => {
return h(
"Button",
{
props: {
size: "small",
type: "error",
ghost: true,
},
on: {
click: () => {
this.delGoods(params.index);
},
},
},
"删除"
);
},
},
],
goodsData: [], // 商品列表
@@ -327,9 +312,9 @@ export default {
margin: 20px 0;
font-size: 15px;
&::before{
content: '';
border: 1px solid $theme_color;
height: 10px;
content: '|';
color: $theme_color;
display: inline-block;
font-weight: bold;
font-size: 16px;
margin-right: 5px;