@capitalos/vue
CapitalOS for Vue
Vue components for integrating with CapitalOS
Requirements
Vue 2.7.0 or later
Installation
npm
npm install @capitalos/vue
yarn
yarn add @capitalos/vue
pnpm
pnpm add @capitalos/vue
Documentation
Please refer to the official docs for more details.
Usage
In order to use the components you will need to obtain a client authentication token. Refer to the CapitalOS documentation for more information.
// main.ts
import { createApp } from 'vue'
import { createCapitalOs } from '@capitalos/vue'
import App from './App.vue'
const app = createApp(App)
app.use(
createCapitalOs({
getToken: async () => {
// Call your backend which initiates login and returns a one-time token
const res = await fetch('/api/capitalos/token', { method: 'POST' })
const json = await res.json()
return json.token
},
enableLogging: true,
})
)
app.mount('#app')
<!-- MyComponent.vue -->
<template>
<CardsApp @loaded="onLoaded" @error="onError" />
</template>
<script setup>
import { CardsApp } from '@capitalos/vue'
const onLoaded = () => console.log('CardsApp loaded!')
const onError = (error) => console.error('CardsApp error:', error)
</script>
TypeScript support
TypeScript definitions for @capitalos/vue are built into the npm package and should be automatically picked up by your editor.
Related Packages
@skyservice-developers/vue-dev-kit
Vue 3 component library + TypeScript SDK (iframe bridge + HTTP API) for Skyservi...
18,649
1
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.4.6 | ^2.7.0 || | MIT | |
| 0.4.5 | ^2.7.0 || | MIT | |
| 0.4.4 | ^2.7.0 || | MIT | |
| 0.4.3 | ^2.7.0 || | MIT | |
| 0.4.2 | ^2.7.0 || | MIT | |
| 0.4.1 | ^2.7.0 || | MIT | |
| 0.4.0 | ^2.7.0 || | MIT | |
| 0.3.0 | ^2.7.0 || | MIT | |
| 0.2.0 | ^2.7.0 || | MIT | |
| 0.1.1 | ^2.7.0 || | MIT | |
| 0.1.0 | ^2.7.0 || | MIT |
Pre-releases (1)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.0-rc.1 | ^2.7.0 || | MIT |