Merge pull request #993 from anykno/table_render
impove table render logic,fix xss.
This commit is contained in:
commit
429479a53b
1 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,8 @@
|
|||
<template v-if="renderType === 'selection'">
|
||||
<Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
|
||||
</template>
|
||||
<template v-if="renderType === 'normal'"><span v-html="row[column.key]"></span></template>
|
||||
<template v-if="renderType === 'html'"><span v-html="row[column.key]"></span></template>
|
||||
<template v-if="renderType === 'normal'"><span>{{row[column.key]}}</span></template>
|
||||
<template v-if="renderType === 'expand' && !row._disableExpand">
|
||||
<div :class="expandCls" @click="toggleExpand">
|
||||
<Icon type="ios-arrow-right"></Icon>
|
||||
|
@ -83,6 +84,8 @@
|
|||
this.renderType = 'index';
|
||||
} else if (this.column.type === 'selection') {
|
||||
this.renderType = 'selection';
|
||||
} else if (this.column.type === 'html') {
|
||||
this.renderType = 'html';
|
||||
} else if (this.column.type === 'expand') {
|
||||
this.renderType = 'expand';
|
||||
} else if (this.column.render) {
|
||||
|
|
Loading…
Add table
Reference in a new issue