Skip to content

Commit

Permalink
fix: 🐛merge column error
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjone committed Apr 18, 2023
1 parent 6f48a20 commit 01e1749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/common/TableBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)"
:key="i"
>
<component :is="c" :data="d" :__index="i" />
<component :is="c" :data="d" />
</template>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/models/param/slotsBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export default class SlotsBox {
* 将 columns 的叶子结点平铺
*/
private setLeafCols() {
this.cols = this.tableHeaders.leafs.map(v => v.node);
this.cols = this.tableHeaders.leafs.map((v, i) => {
v.node.props = Object.assign({}, v.node.props, { __index: i });
return v.node;
});
}

setSlots(slots: Slots) {
Expand Down

0 comments on commit 01e1749

Please sign in to comment.