43 lines
1.0 KiB
Markdown
43 lines
1.0 KiB
Markdown
|
第一步:引入组件
|
|||
|
|
|||
|
import columnFunction from '@/components/function-list/column/column-function.vue';
|
|||
|
|
|||
|
第二步:注册组件
|
|||
|
|
|||
|
export default {
|
|||
|
components:{
|
|||
|
columnFunction
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
第三步:使用组件
|
|||
|
|
|||
|
<template>
|
|||
|
<view>
|
|||
|
<column-function @chooseEv="chooseEv"></column-function>
|
|||
|
</view>
|
|||
|
</template>
|
|||
|
|
|||
|
参数说明
|
|||
|
|
|||
|
list:列表数据,默认以下数组:
|
|||
|
[
|
|||
|
{iconsrc:'',iconWidth:60,iconHeight:60,title:'标题一',content:'',contentColor:'#999999',ifNext:true},
|
|||
|
{iconsrc:'',iconWidth:60,iconHeight:60,title:'标题二',content:'',contentColor:'#999999',ifNext:true},
|
|||
|
{iconsrc:'',iconWidth:60,iconHeight:60,title:'标题三',content:'',contentColor:'#999999',ifNext:true},
|
|||
|
]
|
|||
|
titlec:标题颜色,默认#000000
|
|||
|
ifIcon:是否显示左侧图标,默认false
|
|||
|
ifLine:是否显示下划线,默认true
|
|||
|
linec:下划线颜色,默认#EEEEEE
|
|||
|
ifLastLine:是否显示最后一条下划线,默认true
|
|||
|
|
|||
|
方法使用
|
|||
|
|
|||
|
export default {
|
|||
|
methods:{
|
|||
|
chooseEv(obj) {
|
|||
|
console.log(obj);
|
|||
|
},
|
|||
|
}
|
|||
|
}
|