Class: ImageCard

ImageCard()

ImageCard 全图卡片

Constructor

new ImageCard()

构造函数
Source:

Extends

Methods

addCueWords(arr) → {BaseCard}

添加用户操作提示。所有卡片都可以添加引导提升
Parameters:
Name Type Description
arr Array 提示的话术
Inherited From:
Source:
Returns:
返回自己
Type
BaseCard
Example
this.addCueWords(['十元', '二十元']);

 

addItem(src, thumbnail) → {ImageCard}

添加一个图片项
Parameters:
Name Type Description
src string 图片地址
thumbnail string 图片缩率图地址. 可选
Source:
Returns:
返回自己
Type
ImageCard
Example
this.addItem('http://image.src', 'http://thumbnail.src');
this.addItem('http://image.src');

getData(key) → {mixed}

获取卡片数据,或者某个字段的值 Example: this.getData(); this.getData('fieldName');
Parameters:
Name Type Description
key string 字段名,可选。如果不提供字段名,返回整个卡片数据
Inherited From:
Source:
Returns:
Type
mixed

setAnchor(url, anchorText) → {BaseCard}

设置"查看更多" ,设置卡片锚点
Parameters:
Name Type Description
url string 链接地址
anchorText string 锚点展现的文字,可选。如果不设置,默认为"查看更多"
Inherited From:
Source:
Returns:
返回自己
Type
BaseCard