(str: string)
| 13 | const slotsTemp = {} as any; |
| 14 | |
| 15 | const createSlots = (str: string): SlotItem => |
| 16 | str.split(':').reduce( |
| 17 | (prev, curr, index) => { |
| 18 | prev[`slot${index}`] = { |
| 19 | key: `slot${index}`, |
| 20 | span: curr, |
| 21 | children: [], |
| 22 | }; |
| 23 | return prev; |
| 24 | }, |
| 25 | { value: str }, |
| 26 | ); |
| 27 | |
| 28 | export default { |
| 29 | key: 'layout', |