Skip to content

Commit

Permalink
feat(table): 支持expand内容可以为html
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Nov 15, 2022
1 parent 8de58a2 commit f824b66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/table/src/ExpandColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions packages/table/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

0 comments on commit f824b66

Please sign in to comment.