relateStoreTable.vue
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
<div class="store-table">
<el-table
:data="merchantGoodsRefList"
style="width: 100%"
:header-row-style="headerRowStyle"
header-cell-class-name="header-cell-class-name"
border>
<el-table-column
align="center"
width="60px"
label="序号"
type="index" />
<el-table-column
prop="merchantName"
label="门店名称"
align="center" />
<el-table-column
prop="merchantId"
label="门店商户号"
align="center" />
<el-table-column
label="操作"
align="center"
v-if="!isDetail"
width="90">
<template slot-scope="scope">
<el-button
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'RelateProTable',
props: {
merchantGoodsRefList: {
type: Array,
default: () => {}
},
isDetail: {
type: Boolean,
default: false
}
},
data() {
return {
}
},
methods: {
handleDelete(item) {
this.$emit('handleDelete', item)
},
headerRowStyle() {
return {
height: '40px',
background: '#F2F4F7'
}
}
}
}
</script>
<style lang="scss" scoped>
.store-table{
margin-top: 15px;
}
::v-deep .header-cell-class-name{
height: 30px;
background: #F2F4F7;
}
::v-deep .el-table th{
padding: 0;
}
::v-deep .el-table__body-wrapper tr td{
padding: 8px 0 !important;
}
</style>