21 lines
526 B
JavaScript
21 lines
526 B
JavaScript
import PagebuilderSectionPlugin from 'magico-section/src/components/PagebuilderSectionPlugin.vue'
|
|
|
|
export function useSections() {
|
|
function register(vm, sections) {
|
|
console.log('sections', sections, vm)
|
|
sections.forEach((item) => {
|
|
vm.registerPlugin(
|
|
'Sections' + item.site_section_id,
|
|
{
|
|
label: item.title,
|
|
svg_off: ``,
|
|
section_id: item.section_id,
|
|
image: item.image
|
|
},
|
|
PagebuilderSectionPlugin
|
|
)
|
|
})
|
|
}
|
|
return { register }
|
|
}
|