Closed zangab closed 6 years ago
If you are Vue expert you can do it like
var loading = this.$loading.show();
loading.$slots.default = ['Your line...'];
@ankurk91 thx for the quick answer. yeah, this would be an option. but is there also an option to do this in a html-markup-ish way? :)
You can easily pass your slots when you have placed the component within your template
https://github.com/ankurk91/vue-loading-overlay/blob/master/examples/components/component.vue#L7
ok, but it isn't used as a plugin in your example but more like a component. my intention was to place a container in my entry-point-component and set the icon globally like:
<div id="app">
<vue-loading>
<my-icon></my-icon>
</vue-loading>
</div>
however, guess i'll just wrap it in a component and use that globally. this should do it then. ;)
The plugin method show()
creates a new instance of the same component and append it to document body on beforeMount
event hook.
You can use the component whatever way you like 😄
i want to use the overlay globally and to change the default icon. i've seen in the source code that there is a slot for the icon but HOW can i inject my custom markup when i use it as a plugin?