@mixspa/vue
v0.6.1
Published
This is a tools for mixspa with vue
Downloads
1
Readme
mixspa-vue
Mixspa-vue is a wrapper for mixspa-core with vue.
Current Status:
What it come from?
Pleas reference here: mixspa-core
Apis for this library
createApp: create a mixspa app.
import { createApp } from '@mixspa/vue';
import App from './App';
createApp('vue-app', ({ baseurl }) => {
return {
render: h => h(App)
};
});
mixin: Receive event and handle url change event.
import { mixin } from '@mixspa/vue';
import App from './App';
import router from './router';
new Vue({
mixins: [mixin],
router: router,
render: h => h(App, { props: { baseUrl: '' } })
}).$mount('#app');
AppLoader: load a mixspa app.
<template>
<app-loader app-id="vue-app" app-props="{}">
<div v-slot:loading>Loading...</div>
<div v-slot:fallback>Not found</div>
</app-loader>
</template>
<script>
import { AppLoader } from '@mixspa/vue'
export default {
components: {
'app-loader': AppLoader
}
}
</script>
AppLink: This link will send a event to event bus.
<template>
<app-link to="/vue-app">Vue App</app-link>
</template>
<script>
import { AppLink } from '@mixspa/vue'
export default {
components: {
'app-link': AppLink
}
}
</script>
License
mixspa-vue is released under the MIT license.