@mixspa/vue

This is a tools for mixspa with vue

Version: 0.6.1 Updated: 07/18/2020

By: mixspa License: MIT

Downloads Last 30 Days: 8

Install

npm i @mixspa/vue
yarn add @mixspa/vue

Repository: https://github.com/mixspa/mixspa-vue

CDNs

bundle.run: https://bundle.run/@mixspa/vue

jsDelivr: https://cdn.jsdelivr.net/npm/@mixspa/vue

unpkg: https://unpkg.com/@mixspa/vue

mixspa-vue

Mixspa-vue is a wrapper for mixspa-core with vue.

Current Status:

NPM Version NPM Downloads Build Status

NPM

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>
<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.

Categories: Vue js
Tags: vuemixspa