list.vue
978 Bytes
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
<style lang="scss" scoped></style>
<template>
<div>
<el-tabs :value="active" type="card">
<el-tab-pane :label="`员工欢迎语(${total1})`" name="1">
<Tab ref="tab1" type="1" @total="totalChange"></Tab>
</el-tab-pane>
<el-tab-pane :label="`部门员工欢迎语(${total2})`" name="2">
<Tab ref="tab2" type="2" @total="totalChange"></Tab>
</el-tab-pane>
<el-tab-pane :label="`客户群欢迎语(${total3})`" name="3">
<Tab ref="tab3" type="3" @total="totalChange"></Tab>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Tab from './components/Tab'
export default {
name: 'Welcome',
components: { Tab },
props: {},
data() {
return {
active: '1',
total1: 0,
total2: 0,
total3: 0,
}
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {
totalChange([type, total]) {
this['total' + type] = total
},
},
}
</script>