iview-mpvue
  • 首页
  • 布局
    • Layout 栅格布局
    • Grid 宫格
    • Panel 面板
    • List 列表
    • Card 卡片
  • 基础组件
    • Button 按钮
    • Color 色彩
    • Icon 图标
  • 导航
    • TabBar 标签栏
    • Tabs 标签页
    • Drawer 抽屉
    • Page 分页
    • Steps 步骤条
    • NoticeBar 通告栏
    • Index 索引选择器
    • Sticky 吸顶容器
  • 操作反馈
    • ActionSheet 动作面板
    • Toast 轻提示
    • Modal 对话框
    • Message 全局提醒
    • Spin 加载中
    • Swipeout 滑动菜单
  • 视图
    • Badge 徽章
    • Alert 警告提示
    • Tag 标签
    • Progress 进度条
    • Avatar 头像
    • CountDown 倒计时
    • Divider 分隔符
    • Collapse 折叠面板
    • LoadMore 页底提示
  • 表单
    • Input 输入框
    • Radio 单选
    • Checkbox 复选
    • Switch 开关
    • Rate 评分
    • InputNumber 数字输入框
Powered by GitBook
On this page
  • 概述
  • 使用指南
  • 示例
  • API

Was this helpful?

  1. 布局

List 列表

概述

基础布局组件

使用指南

在.vue中引入组件

<script>
    import 'iCellGroup' from 'iview-mpvue/dist/components/cell-group/cell-group'
    import 'iCell' from 'iview-mpvue/dist/components/cell/cell'
    export default {
        components: {
            'i-cell-group': iCellGroup,
            'i-cell': iCell
        }
    }
</script>

在main.js中引入样式文件

import 'iview-mpvue/dist/components/cell/style/css'
import 'iview-mpvue/dist/components/cell-group/style/css'

示例

<i-cell-group>
    <i-cell title="只显示箭头" is-link="true"></i-cell>
    <i-cell title="跳转到首页" is-link="true" url="/pages/dashboard/index"></i-cell>
    <i-cell title="只有 footer 点击有效" is-link="true" url="/pages/dashboard/index" only-tap-footer="true"></i-cell>
    <i-cell title="开关">
        <switch slot="footer" checked="true" />
    </i-cell>
</i-cell-group>

API

CellGroup properties

属性

说明

类型

默认值

i-class

自定义 class 类名

String

-

Cell properties

属性

说明

类型

默认值

i-class

自定义 class 类名

String

-

title

左侧标题

String

-

label

标题下方的描述信息

String

-

value

右侧内容

String

-

only-tap-footer

只有点击 footer 区域才触发 tab 事件

Boolean

false

is-link

是否展示右侧箭头并开启尝试以 url 跳转

Boolean

false

url

当 isLink 设置为 true 时,点击 cell 会尝试跳转到该路径

String

-

link-type

链接类型,可选值为 navigateTo,redirectTo,switchTab,reLaunch

String

navigateTo

Cell events

事件名

说明

返回值

v-on:click

点击 cell 时触发,onlyTapFooter 为 true 时点击 footer 区域触发

-

Cell slot

名称

说明

默认

自定义内容

icon

标题前自定义的 icon,可使用 icon 自定义组件,具体使用参考 icon 组件

footer

右侧自定义 wxml 内容,如果设置了 value 属性,则不生效

PreviousPanel 面板NextCard 卡片

Last updated 5 years ago

Was this helpful?