feat(table): 支持expand内容可以为html

This commit is contained in:
roymondchen 2022-11-15 16:03:25 +08:00
parent 8de58a2101
commit f824b661bd
2 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@
:config="config.form"
:init-values="config.values || (config.prop && scope.row[config.prop]) || {}"
></MForm>
<div v-if="config.expandContent" v-html="config.expandContent(scope.row, config.prop)"></div>
</template>
</TMagicTableColumn>
</template>

View File

@ -55,4 +55,5 @@ export type ColumnConfig = {
sortable?: boolean | 'custom';
action?: 'tip' | 'actionLink' | 'img' | 'link' | 'tag';
handler?: (row: any) => void;
expandContent?: (row: any, prop?: string) => string;
};