Skip to content
Discussion options

You must be logged in to vote

For one, here's how you can track the selected element:

<script setup>
import { ref, onMounted, watch, computed } from 'vue';

const builder$ = ref();

const selectedElement = computed(() => {
  return builder$.value?.selectedElement;
});

watch(selectedElement, alert);
</script>

<template>
  <div id="app" class="h-screen">
    <VueformBuilder ref="builder$" />
  </div>
</template>

I am trying to think of ways you can reliably add class + DOM to an element's layout externally, but I couldn't so far. Overriding the ElementLayout's template for different element types is how the builder adds those remove/clone/etc actions, name tag and so on and that would be the most straightforward way. …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@dan-dazlab
Comment options

@adamberecz
Comment options

@dan-dazlab
Comment options

@adamberecz
Comment options

Answer selected by dan-dazlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants