element icon indicating copy to clipboard operation
element copied to clipboard

表格table组件,可以给table-column增加一个是否显示的属性么

Open foyel opened this issue 9 years ago • 4 comments

不同的角色在做权限控制显示的时候,在一个table有可能显示的数据会少几列,或者有些没有操作按钮这一列,但是又不想针对所有权限做不同的表格

foyel avatar Dec 07 '16 10:12 foyel

可以通过 v-if 控制:http://jsfiddle.net/leopoldthecuber/owb1xd1y/

Leopoldthecoder avatar Dec 07 '16 10:12 Leopoldthecoder

@Leopoldthecoder v-if 如何获取当前行的数据呢

fengqi avatar Mar 25 '17 15:03 fengqi

@Leopoldthecoder 在一个表格中其中有两列数据A列和B列,A列显示的时候B列不显示,B列显示的时候A列不显示,使用同一个计算属性比如hello,A列写v-if="hello",B列写v-if="!hello"。在初始化的时候没有问题,但是在hello变动的时候导致B列显示异常变成只有一列数据了。

heihei001 avatar Jul 26 '17 06:07 heihei001

@fengqi 使用内容分发slot

heihei001 avatar Jul 26 '17 06:07 heihei001