[Vuejs]-Pass in an attribute into Treeselect vue component from Laravel view

1👍

You have to declare the passed props inside your vue component to use them in the template

<template>
    <div>
        <!-- Pass the prop to the name attribute -->
        <treeselect v-model="value" :multiple="true" :options="options" :name="this.name">
        </treeselect>
    </div>
</template>

<script>
export default {
    props: ['name'], // <-- The declared prop
};
</script>

Leave a comment