MCPcopy
hub / github.com/buqiyuan/vite-vue3-lowcode / createSlots

Function createSlots

src/packages/container-component/layout/index.tsx:15–26  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

13const slotsTemp = {} as any;
14
15const 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
28export default {
29 key: 'layout',

Callers 1

index.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected