area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.78k stars 575 forks source link

Not able to load a custom component #2260

Closed toonvank closed 1 year ago

toonvank commented 1 year ago

Description

I am trying to make a custom component for adding custom buttons to a wysiwyg field in twill admin forms. I've created a project from scratch trying to implement the steps. This github repo: Twill From Test

Steps to reproduce

in resources/assets/js/components/HelloWorld.vue

<template>
 <!-- eslint-disable -->
 <div>
   Hello {{ name }}
 </div>
</template>
<script>
  /* eslint-disable */
  export default {
    props: ['name']
  }
</script>

in resources/views/twill/partials/form/_hello-world.blade.php: <a17-hello-world name="test"></a17-hello-world>

and in my form: @formField('hello-world')

last step is that i execute this to build the component php artisan twill:build

Expected result

Renders "Hello test" on my form

Actual result

The component is not loaded. In the place where the component should be loaded it's not working. If the vue component is loaded @formField('hello-world') it doesn't work and also like this <a17-text-edit></a17-text-edit>

Versions

ifox commented 1 year ago

Hi @toonvank, your reproduction repository does render "Hello test". There doesn't seem to be any issue with loading custom components,

Screenshot 2023-06-01 at 2 54 55 AM