cv-cell-row 单行单元格 ¶
简要 ¶
列表页,一般用户列表业务使用,默认为实心白色背景。
示例 ¶
vue
<template>
<view class="content">
<view class="components-title">
<view class="components-title-t">cv-cell-row</view>
<view class="components-title-d">列表</view>
</view>
<cv-cell-row leftTop="左边上" rightIcon />
<cv-cell-row leftTop="左边上" leftBottom="左边下" rightIcon />
<cv-cell-row leftTop="左边上" leftBottom="左边下" rightTop="右边上" rightIcon />
<cv-cell-row leftTop="左边上" leftBottom="左边下" rightTop="右边上" rightBottom="右边下" rightIcon />
<cv-cell-row leftTop="左边上" rightTop="右边上" />
<view>带图标的列表</view>
<cv-cell-row leftIcon="/static/logo.png" leftTop="左边上" rightTop="提示内容" rightIcon />
<cv-cell-row leftIcon="/static/logo.png" leftTop="左边上" rightTop="右边第一行" rightIcon />
<view>带跳转链接的列表</view>
<cv-cell-row
leftIcon="/static/logo.png"
leftTop="绑定@click自定义方法"
rightTop="提示内容"
@click="handleJumps('/pages/layout/cv-cell-row?b=1')"
/>
<view>用插槽模式</view>
<cv-cell-row @click="handleJumps('/pages/layout/cv-cell-row?a=1')" rightIcon>
<template #leftImage><cv-icons type="action-pingjia-filled" color="#04d7ec" /></template>
<template #leftTop>左边上面内容</template>
<template #leftBottom>左边下面内容</template>
<template #rightTop>右边上面内容</template>
<template #rightBottom>右边下面内容</template>
</cv-cell-row>
</view>
</template>
<script>
export default {
data() {
return {};
},
onLoad() {},
methods: {
handleJumps(url) {
uni.navigateTo({
url: url
});
},
onClick(url) {
uni.showToast({
title: url,
duration: 2000,
icon: 'none'
});
}
}
};
</script>
<style>
.content {
overflow: auto;
min-height: 600px;
background-color: #eee;
position: relative;
}
.default-slot {
min-height: 100px;
background-color: #ffffff;
text-align: center;
margin: 5px 15px;
}
</style>
属性 ¶
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
leftIcon | String | - | 左边图片 |
leftTop | String | - | 左边标题 |
leftBottom | String | - | 左边副标题 |
rightTop | String | - | 右边标题 |
rightBottom | String | - | 右边副标题 |
rightIcon | String | - | 右边箭头 |
插槽 ¶
具名 | 说明 |
---|---|
leftIcon | 一般用于:使用图标代替图片场景 |
leftTop | |
leftBottom | |
rightTop | |
rightBottom | |
rightIcon | 一般用于:使用图标代替图片场景 |
事件 ¶
事件名 | 说明 | 返回值 |
---|---|---|
@click | 点击 | Cell 触发事件 |