ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

[Question] No examples for inside vue components #165

Closed iamraju closed 3 years ago

iamraju commented 3 years ago

Hi There,

I dont know if it is due to novice to vuejs, I did quite difficult to integrate with vue components. Neither the demo repository project has that clearly inside .

I am completely blind neither could implement it as modal nor normal page inside (in another vue component)

The most surprising thing for me is; the wiki does not even has a single line of example with full syntax of the component , did I miss somewhere ?

Anyone can point me to a right direction to integrate this manager in Laravel+Bulma (Buefy) app inside another vue component rendered in ?

Thanks in advance.

ctf0 commented 3 years ago

am not really sure what u r after, but the Use The Manager From A Modal clearly have an example on how to use the manager from within another vue component & u need to pay attention to using inline-template for the component as we need to use some blade directives in order for the component to work correctly.

iamraju commented 3 years ago

am not really sure what u r after, but the Use The Manager From A Modal clearly have an example on how to use the manager from within another vue component & u need to pay attention to using inline-template for the component as we need to use some blade directives in order for the component to work correctly.

Thank you for the reply !

Well I am trying to integrate this library in my existing vue application (Laravel+Bulma (Buefy)) ! I have a router called Media Manager and components/MediaManager.vue file, how can I call the library in the component (not as modal for now, later I need to open the modal as well but I will try to use it with tinymce as you have that feature).

After I followed all the steps in the installation page; I have added this in my layout file (app.blade.php):

<div id="app">
{{-- notifications --}}
    <div class="notif-container">
        <my-notification></my-notification>
    </div>

    @yield('content')

    <div class="container is-fluid">
        <div class="columns">
            {{-- media manager --}}
            <div class="column">
                @include('MediaManager::_manager')
            </div>
        </div>
    </div>
</div>

Then I completely remove everything from my MediaManager.vue file and added the following:


<script>

export default {
    name: "media-manager",

    data () {
      return {

      }
    },
    computed: {

    },
    created () {

    },
    methods: {

    }
  }
</script>

And I have the error:

[Vue warn]: Failed to mount component: template or render function not defined.

found in

---> <MediaManager> at resources/js/views/MediaManager.vue
       <Home> at resources/js/App.vue
         <Root>

Not sure what I have to do and what I am missing.

ctf0 commented 3 years ago