BusinessConsulting.vue
3.92 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<template>
<div class="box">
<!-- <table>
<tbody>
<tr>
<td>彭</td>
<td>彭先生</td>
<td>联系方式:15013224279</td>
<td>地区:/</td>
</tr>
<tr>
<td>彭</td>
<td>彭先生</td>
<td>联系方式:15013224279</td>
<td>地区:/</td>
</tr>
<tr>
<td>彭</td>
<td>彭先生</td>
<td>联系方式:15013224279</td>
<td>地区:/</td>
</tr>
<tr>
<td>彭</td>
<td>彭先生</td>
<td>联系方式:15013224279</td>
<td>地区:/</td>
</tr>
</tbody>
</table> -->
<el-table
:show-header="false"
:data="tableData"
:row-style="{ height: '60px', color: 'blue' }"
width="100%"
>
<el-table-column width="50px">
<template slot-scope="">
<span class="icon-surname">彭</span>
</template>
</el-table-column>
<el-table-column
prop="name"
width="80px"
style="font-weight: 600"
></el-table-column>
<el-table-column width="200px">
<template>
<span>电话号:{{ text }}</span>
<el-tooltip content="复制号码" placement="top" effect="light">
<span
class="copy-btn icon-fuzhi"
:data-clipboard-text="text"
@click="copy"
></span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="region"></el-table-column>
</el-table>
<div class="block">
<el-pagination
background
:current-page="page.pagenum"
:page-size="page.pagesize"
layout="prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
></el-pagination>
</div>
</div>
</template>
<script>
import Clipboard from 'clipboard'
export default {
name: 'BusinessConsulting',
data() {
return {
total: 0,
text: '15643256789',
tableData: [
{
date: '彭',
name: '彭先生',
address: '联系方式:15013224279',
region: '地区:/',
},
{
date: '彭',
name: '彭先生',
address: '联系方式:15013224279',
region: '地区:',
},
{
date: '彭',
name: '彭先生',
address: '联系方式:15013224279',
region: '地区:/',
},
{
date: '彭',
name: '彭先生',
address: '联系方式:15013224279',
region: '地区:',
},
{
date: '彭',
name: '彭先生',
address: '联系方式:15013224279',
region: '地区:',
},
],
page: {
//当前页数
pagenum: 1,
//当前每页多少条数据
pagesize: 4,
},
}
},
mounted() {},
methods: {
copy() {
let clipboard = new Clipboard('.copy-btn ')
clipboard.on('success', (e) => {
clipboard.destroy()
})
clipboard.on('error', () => {
clipboard.destroy()
})
},
},
}
</script>
<style lang="scss" scoped>
.icon-surname {
padding: 8px 8px;
background: #efefef;
border-radius: 50%;
font-weight: 600;
color: #000;
}
.icon-name {
font-weight: 600;
}
.icon-fuzhi {
width: 20px;
height: 20px;
background: url('../../../../assets/images/fuzhi.png') no-repeat;
background-size: 100% 100%;
vertical-align: middle;
}
.box {
width: 100%;
}
el-table-column {
span {
padding: 5px 5px;
background-color: #888;
border-radius: 50%;
}
}
.block {
width: 255px;
float: right;
margin-top: 30px;
}
</style>