@mst-ui/vue
v0.0.2
Published
Vue 3 bindings for @mst-ui/core Web Components
Readme
@mst-ui/vue
Vue 3 bindings for @mst-ui/core.
1. Install
npm i @mst-ui/vue2. Configure Vue compiler
In your vite.config.ts:
import vue from '@vitejs/plugin-vue';
export default {
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('mst-'),
},
},
}),
],
};3. Register elements
// main.ts
import { createApp } from 'vue';
import { MstPlugin } from '@mst-ui/vue';
import App from './App.vue';
createApp(App).use(MstPlugin).mount('#app');4. Use
<template>
<mst-button variant="primary" @mst-click="onClick">Hello</mst-button>
<mst-tree :data="data" @mst-select="onSelect" />
</template>