自定义组件
This commit is contained in:
@@ -1,13 +1,102 @@
|
||||
<template>
|
||||
<div>资料网员</div>
|
||||
<div class="data-member">
|
||||
<customize-table
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
>
|
||||
<template v-slot:text="record">
|
||||
<div @click="d(record)">点击</div>
|
||||
</template>
|
||||
</customize-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import CustomizeTable from '@comp/CustomizeTable'
|
||||
|
||||
export default {
|
||||
name: 'DataMember',
|
||||
data() {
|
||||
return {}
|
||||
components: {
|
||||
CustomizeTable
|
||||
},
|
||||
methods: {}
|
||||
data() {
|
||||
return {
|
||||
columns: [
|
||||
{
|
||||
title: '应付金额',
|
||||
dataIndex: 'itemText1',
|
||||
scopedSlots: 'default'
|
||||
},
|
||||
{
|
||||
title: '实付金额',
|
||||
dataIndex: 'itemText2',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
dataIndex: 'itemText3',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '打包',
|
||||
dataIndex: 'itemText4',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '需要发票',
|
||||
dataIndex: 'itemText5',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '到账',
|
||||
dataIndex: 'itemText6',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '开票',
|
||||
dataIndex: 'itemText7',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
{
|
||||
title: '邮寄',
|
||||
dataIndex: 'itemText8',
|
||||
scopedSlots: 'text'
|
||||
},
|
||||
],
|
||||
dataSource:[
|
||||
{
|
||||
itemText1:'应收金额1',
|
||||
itemText2:'实付金额1',
|
||||
itemText3:'负责人1',
|
||||
itemText4:'打包1',
|
||||
itemText5:'需要发票1',
|
||||
itemText6:'到账1',
|
||||
itemText7:'开票1',
|
||||
itemText8:'开票18',
|
||||
},
|
||||
{
|
||||
itemText1:'应收金额1',
|
||||
itemText3:'负责人1',
|
||||
itemText4:'打包1',
|
||||
itemText7:'开票1',
|
||||
itemText5:'需要发票1',
|
||||
itemText6:'到账1',
|
||||
itemText2:'实付金额1',
|
||||
itemText8:'开票18',
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
d(val){
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less"></style>
|
||||
<style scoped lang="less">
|
||||
.data-member {
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user