diff --git a/src/view/components/ComponentCatalogPreview.vue b/src/view/components/ComponentCatalogPreview.vue index 55c575d..29cabf0 100644 --- a/src/view/components/ComponentCatalogPreview.vue +++ b/src/view/components/ComponentCatalogPreview.vue @@ -5,8 +5,7 @@ :uri="component.uri" :template="component.template" :styles="component.styleCode" - :props="component.props" - :data="component.data" + :scope="scope" :child-components="component.childComponents" /> @@ -16,7 +15,7 @@ diff --git a/src/view/components/ContainerVueComponent.vue b/src/view/components/ContainerVueComponent.vue index daa0bbe..b546422 100644 --- a/src/view/components/ContainerVueComponent.vue +++ b/src/view/components/ContainerVueComponent.vue @@ -3,8 +3,7 @@ v-if="document" :uri="uri" :template="document.template" - :props="document.props" - :data="document.data" + :scope="scope" :child-components="document.childComponents" :styles="document.styleCode" :props-data="propsData" @@ -14,7 +13,11 @@ + + diff --git a/src/view/components/PageMain.vue b/src/view/components/PageMain.vue index 35d7975..b1fdc28 100644 --- a/src/view/components/PageMain.vue +++ b/src/view/components/PageMain.vue @@ -5,6 +5,7 @@
- +

Not found

Not found

@@ -112,6 +117,7 @@ export default Vue.extend({ ...projectHelpers.mapGetters({ document: 'currentDocument', + scope: 'currentScope', renderingDocument: 'currentRenderingDocument', scopedDocuments: 'scopedDocuments' }), @@ -135,6 +141,8 @@ export default Vue.extend({ 'updateDeclaration' ]), + ...projectHelpers.mapMutations(['updatePropValue', 'updateDataValue']), + ...viewportHelpers.mapActions(['resize', 'zoom']), onStartDragging(uri: string): void { diff --git a/src/view/components/Renderer.vue b/src/view/components/Renderer.vue index aad2c3d..52f950e 100644 --- a/src/view/components/Renderer.vue +++ b/src/view/components/Renderer.vue @@ -12,8 +12,7 @@ ScopedDocument, required: true }, + scope: { + type: Object as () => DocumentScope, + required: true + }, selectedPath: { type: Array as () => number[], required: true diff --git a/src/view/components/ScopeInformation.vue b/src/view/components/ScopeInformation.vue index c3dd622..5dd5ef2 100644 --- a/src/view/components/ScopeInformation.vue +++ b/src/view/components/ScopeInformation.vue @@ -2,14 +2,14 @@

Props

-
    -
  • - {{ prop.name }} +
      +
    • + {{ name }} - - {{ prop.type }} - - {{ prop.default }} +
    @@ -20,11 +20,14 @@

    Data

    -
      -
    • - {{ d.name }} +
        +
      • + {{ name }} - {{ d.default }} +
      @@ -37,19 +40,46 @@