An open API service indexing awesome lists of open source software.

https://github.com/dammy001/vue-mono

vue mono component
https://github.com/dammy001/vue-mono

component library mono vue vue2 vue3 vuejs2

Last synced: about 1 year ago
JSON representation

vue mono component

Awesome Lists containing this project

README

          

# vue-mono

# Mono Component for Vue 3.x

A Vue 3 package for mono integration.

### Install

```
// with npm
npm i @damilaredev/vue-mono --save

//with yarn
yarn add @damilaredev/vue-mono

//with pnpm
pnpm add @damilaredev/vue-mono
```

### Usage

```
import { createApp } from 'vue';
import App from './App.vue'
import VueMono from '@damilaredev/vue-mono';

const app = createApp(App)

app.use(VueMono)

app.mount('#app')
```

###### example

```vue

import { ref } from 'vue';
import type { Ref } from 'vue'

const publicKey: Ref<string> = ref<string>('xxxxxxxxxxxxxxxxxxxxxxx');

const success = (response: string): void => console.log(response);



Connect With Mono

```

###### or referencing the component instance data

```vue

import { ref, unref } from 'vue';
import { MonoComponent } from '@damilaredev/vue-mono';
import type {Ref, ComponentPublicInstance } from 'vue'
import type { MonoPropType } from '@damilaredev/vue-mono';

const publicKey: Ref<string> = ref<string>('xxxxxxxxxxxxxxxxxxxxxxx');

const monoRef: Ref<ComponentPublicInstance<Record<string, unknown>, MonoPropType> | null> = ref(null);

const connect = (): void => unref(monoRef)!.connectWithMono();

const success = (response: string): void => console.log(response);



Connect With Mono

```