Table support disableExpand

This commit is contained in:
Aresn 2017-06-02 10:35:18 +08:00
parent f023b8a0e6
commit e4e8711d0f
2 changed files with 3 additions and 2 deletions

View file

@ -84,7 +84,8 @@
{ {
name: '张小刚', name: '张小刚',
age: 25, age: 25,
address: '北京市海淀区西二旗' address: '北京市海淀区西二旗',
_disableExpand: true
}, },
{ {
name: '李小红', name: '李小红',

View file

@ -5,7 +5,7 @@
<Checkbox :value="checked" @on-change="toggleSelect" :disabled="disabled"></Checkbox> <Checkbox :value="checked" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
</template> </template>
<template v-if="renderType === 'normal'"><span v-html="row[column.key]"></span></template> <template v-if="renderType === 'normal'"><span v-html="row[column.key]"></span></template>
<template v-if="renderType === 'expand'"> <template v-if="renderType === 'expand' && !row._disableExpand">
<div :class="expandCls" @click="toggleExpand"> <div :class="expandCls" @click="toggleExpand">
<Icon type="ios-arrow-right"></Icon> <Icon type="ios-arrow-right"></Icon>
</div> </div>