Closed Stefanovicc closed 4 years ago
the error is related for not correctly importing the mixin into your component, show me the ExampleComp.vue
code
the error is related for not correctly importing the mixin into your component, show me the
ExampleComp.vue
code
import MediaModal from '../../../vendor/MediaManager/js/mixins/modal'
export default {
name: 'example-comp',
mixins: [MediaModal],
// the inputs we want to use the manager for
// in our case they are the article 'cover' & 'gallery'
// for multi-selected files links "https://github.com/ctf0/Laravel-Media-Manager/issues/40#issuecomment-382416243"
//
// for usage with an editor "wysiwyg" only, you dont need this part
data() {
return {
cover: '',
gallery: '',
links: ''
}
}
}
But not only the mixin is giving errors, also the cover, galley and links data.
Using "laravel-mix": "^4.1", btw
ah yes, its related to wp 4
Vue.component('ExampleComp', require('./admin/vue/ExampleComp.vue').default)
My man, it works! My appreciation for this library, love it.
I got a few questions, don't know if it's appropriate to ask here but:
also check https://github.com/ctf0/Laravel-Media-Manager/wiki/Have-More-Control-On-Uploads which gives u total control of how the manager behave
Ok thanks, i'll look into it!
One more question. I've managed to successfully implement the modal into my existing form, is it possible to place the modal inside another div element then the form fields? Currently all the buttons in the modal are submitting my form because they don't have the type="button" attribute. There are also some type="submit" attributes inside the modal, so actually I want to have the modal outside the existing form, but the form fields inside the existing form, any tips? Since they seem to be inside one inline vue template.
np, use the modal-show
& modal-hide
to prevent your form from submitting https://github.com/ctf0/Laravel-Media-Manager/blob/master/README.md#events
Is it possible to get a relative path in the textfields from modal, instead of absolute path? It gives now: http://localhost:3000/storage/images/flyer.png but would love to get: images/flyer.png
u can remove the site on save
Ah yes, that's how I do it now. Was just curious if there was an easier way. Thanks!
With the modal, it seems that once the modal opens, the "File selected" event is fired, even though I haven't clicked anything. This is especially in the WYSYWG editor a problem, because it puts multiple images in the editor.
Is there a workaround?
this happens because the manager by default select first item after init, but yes i can disable it when modal is visible
Ah ok. If you could do this would be awesome!
@Stefanovicc plz open a new ticket with the suggested behavior
5.5
usage
https://i.gyazo.com/e0a0564c9b5ef587017eb263ad97b48f.png
I'm really new to Vue, but I don't know what I'm doing wrong. I'm trying to implement the modal function of the media manager: https://github.com/ctf0/Laravel-Media-Manager/wiki/Use-The-Manager-From-A-Modal
But keep getting this vue errors...
This is my js
And my view:
ExampleComp.vue looks exactly like the one in the WIKI (only another path to the modal mixin)
Can you help me out?