iview/examples/routers/cell.vue

43 lines
1.8 KiB
Vue
Raw Normal View History

2018-06-20 15:17:54 +08:00
<template>
2018-06-20 16:56:54 +08:00
<div style="margin: 100px;background: #f8f8f9;padding: 100px;">
<Card title="选项" :padding="0" shadow style="width: 300px;">
2018-06-20 18:23:27 +08:00
<CellGroup @on-click="handleClick">
2018-06-21 11:34:25 +08:00
<Cell title="标题一" name="a1" label="附属内容" to="/button">
2019-04-09 17:59:33 +08:00
<Badge :count="10" slot="extra"></Badge>
2018-06-21 11:34:25 +08:00
</Cell>
2018-06-20 18:23:27 +08:00
<Cell title="标题一" name="a2" label="附属内容" extra="详细信息"></Cell>
<Cell title="标题一" name="a3" label="附属内容" extra="详细信息" to="/button"></Cell>
<Cell title="标题一" name="a4" label="附属内容" selected></Cell>
2018-06-20 16:56:54 +08:00
<Cell title="标题二">
<Icon type="trash-a" slot="icon"></Icon>
</Cell>
2018-06-20 18:07:28 +08:00
<Cell><span style="color: #ff6600">六七十111</span></Cell>
2018-06-20 16:56:54 +08:00
<Cell title="标题四" selected></Cell>
<Cell title="标题五"></Cell>
<Cell title="标题六" disabled></Cell>
2018-06-20 17:29:44 +08:00
<Cell title="标题七" extra="详细信息" to="/icon"></Cell>
2018-06-20 16:56:54 +08:00
<Cell title="标题七" extra="详细信息" selected></Cell>
<Cell title="标题七" label="附属内容" extra="详细信息"></Cell>
2018-06-20 17:29:44 +08:00
<Cell title="标题八">
<i-switch v-model="switch1" slot="extra"></i-switch>
</Cell>
2018-06-29 18:16:18 +08:00
<Cell title="标题九" to="/button" target="_blank"></Cell>
2018-06-20 16:56:54 +08:00
</CellGroup>
</Card>
</div>
2018-06-20 15:17:54 +08:00
</template>
<script>
export default {
data(){
return {
2018-06-20 17:29:44 +08:00
switch1: false
2018-06-20 15:17:54 +08:00
}
2018-06-20 18:23:27 +08:00
},
methods: {
handleClick (name) {
console.log(name);
}
2018-06-20 15:17:54 +08:00
}
}
</script>