Hoppa till innehåll

Vue

Sitevision supports client side rendering with Vue.

For rendering a client side only app use the framework agnostic client renderer.

@soleil-se/app-util/client/vue Renders a client side Vue application.

ParamTypeDefaultDescription
App*Vue app root component.
[settings]Object{}Settings object.
[settings.selector]String`#app_mount_${appId}`Query selector for mount element.

In app_src/main.js or app_src/client/index.js.

import { render } from '@soleil-se/app-util/client/vue';
import App from './App.vue';
render(App);

Mount the app in another element:

import { render } from '@soleil-se/app-util/client/vue';
import App from './App.vue';
render(App, { selector: '#mount_app_here' });