formset component

This commit is contained in:
bkfox
2024-03-28 05:26:11 +01:00
parent b82f8f4527
commit 07983d7378
2 changed files with 5 additions and 2 deletions

View File

@ -72,7 +72,10 @@ const Component = {
computed: {
columnNames() { return this.columns_.map(c => c.name) },
columnLabels() { return this.columns_.map(c => c.label) },
columnLabels() { return this.columns_.reduce(
(labels, c) => ({...labels, [c.name]: c.label}),
{}
)},
rowSlots() {
return Object.keys(this.$slots).filter(x => x.startsWith('row-'))
.map(x => [x, x.slice(4)])