# 用户组件

# JwChat-item

点击查看代码
  <JwChat-item :config="config" @click="bindClick" />

<script>
export default {
  data () {
    return {
      config: {
        img: '../image/cover.png',
        name: 'JwChat',
        dept: '最简单、最便捷',
        callback: this.bindCover
      },
    }
  },
  methods: {
    bindClick (play) {
      console.log('user', play)
    },
  }
}
</script>

# 参数配置


# Attribute

参数 说明 类型 可选值 默认值
config 组件配置对象 Object - {}
size 封面图大小 String/number - 35

# Methods

参数 说明 参数
click 组件点击选中事件 {}
  • # config

// 格式
{
    img: '', // 头像
    name: 'JwChat',
    dept: '', // 下边文字
    callback: ()=>{}, // 点击回调函数
}
上次更新: 2023/9/21 03:08:49