Skip to content

Commit

Permalink
feat: table column support v-for vueComponent#3934
Browse files Browse the repository at this point in the history
  • Loading branch information
zkwolf committed Apr 13, 2021
1 parent 44e73cf commit 5f09ffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { App, defineComponent, Plugin } from 'vue';
import T, { defaultTableProps } from './Table';
import Column from './Column';
import ColumnGroup from './ColumnGroup';
import { getOptionProps, getKey, getPropsData, getSlot } from '../_util/props-util';
import { getOptionProps, getKey, getPropsData, getSlot, flattenChildren } from '../_util/props-util';

const Table = defineComponent({
name: 'ATable',
Expand All @@ -12,8 +12,9 @@ const Table = defineComponent({
props: defaultTableProps,
methods: {
normalize(elements = []) {
const flattenElements = flattenChildren(elements)
const columns = [];
elements.forEach(element => {
flattenElements.forEach(element => {
if (!element) {
return;
}
Expand Down

0 comments on commit 5f09ffb

Please sign in to comment.