0.1.16 • Published 2 years ago
tz-web-login v0.1.16
Tranzak web login for mini programmes
This plugin is to be used by tranzak SAAS mini programmes to enable users to use mini programmes from the web as well from the mobile application
Usage
Installation
npm install tz-web-loginIn your main.js file, import and register the plugin as shown below
import { createApp } from 'vue'
import TzWebLogin from 'tz-web-login';
const myApp = createApp(App);
myApp.use(TzWebLogin);
myApp.mount('#app')Implementation
<tz-web-login locale="fr" v-if="showPopUp" @close="showPopUp" @login-successful="getUserInfo" />
<tz-button @click="showPopUp = true">Login</tz-button>Props
| Prop | Description | Value |
|---|---|---|
locale | This is the language to be used when rendering th component | String (en OR fr), default en |
Events
| Event | Description |
|---|---|
@login-successful | This is emitted when the user logs in successfully. It returns an object with token and user. token holding the user's token and user holding the user's information |
@close | This will be triggered when user closed the modal from the 'x' icon. |