lanyun-gallery-table

介绍

常用于图文列表展示

使用方法

import "../../components/lanyun-gallery-table/lanyun-gallery-table.stml";

例子

    <lanyun-gallery-table
        :list="listarray"
        onclick="btn"
        bgcolor="#fff"
        :title-style="titleStyle"
    />
    btn(e){
        console.log(JSON.stringify(e.detail))
    }

props 属性

参数 说明 类型 默认值
bgcolor 列表背景色,选填 String #fff
list 列表数据,必填 Array []
box-style 图文个体样式,选填 Object {width: '48%',height: '220px',background: '#fff'}
img-style 图片样式,选填 Object {width: '100%',height: '180px',background: '#fff'}
title-style 标题样式,选填 Object {color: '#333',fontSize: '18px'}

events 事件

事件名 说明 回调参数
click 当点击图文个体时触发 包含点击位置的ID,索引index,对应的json

参数示例

    /*列表数据格式*/
    listarray: [
        {
            'id': 1,
            'image': '',
            'title': ''
        },
        {
            'id': 2,
            'image': '',
            'title': ''
        }
    ]

    /**click事件返回值*/
    {
        "id":5,
        "index":4,
        "detail":{
            "id":5,
            "image":"",
            "title":""
        }
    }
是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24