@oasis-games/front-components-damo-game
v1.0.17
Published
A simple Vue components for page login and footer.
Keywords
Readme
front-components-damo-game
A simple Vue components for page login and footer.
Building manually
After checking out the repo, install dependencies:
npm install @oasis-games/front-components-damo-gameThen build a minified, distributable JS file:
npm run buildExample Usage In Vue Project
Vue Global registration:
import Fcdg from @oasis-games/front-components-damo-game;
Vue.use(Fcdg)
<template>
<fcdg-login-reg
:options="loginRegConfig"
:dialog-visible="dialogVisible"
@close="close"
@loginCallBack="loginCallBack"
></fcdg-login-reg>
</template>
<script>
export default {
name: "app",
data() {
return {
loginRegConfig: {
lang: "zh",
appId: "1319220848281844",
client: "marstest",
isDebug: true,
cookieUser: "fci-user",
cookieRefresh: false,
domain: ".damo.games",
googleClientId: "testestest-cqek3.apps.googleusercontent.com"
},
dialogVisible: true
};
},
methods: {
close(dialogVisible) {
this.dialogVisible = dialogVisible;
},
loginCallBack(e) {
console.log(e);
this.dialogVisible = false;
}
}
};
</script>Login Attributes
| 属性 | 类型 | 说明 | 默认值 | |:----|:----|:----|:----| | lang | string | 语言包 | en | | appId | string | faceBook登录方式所需 应用的id | | | client| string | 接入的游戏 | | | isDebug| boolean | 测试/线上环境 | false | | cookieUser| string | 自定义登录用户cookie名 | | | cookieRefresh| boolean | 是否启用cookie过期刷新机制、该参数依赖cookieUser是否设置 | false | | domain| string | cookie根域 | | | dialogVisible| boolean | 登录框显隐 | | | loginQr| boolean | 是否启用扫码登录 | false | | googleClientId| string | google登录方式所需 client的id | 预配置的client id |
Login Events
| 事件名 | 说明 | 参数 | |:------|:-------|:-------| | close | 用户关闭登录插件时所触发的事件 | dialogVisible | | loginCallBack | 用户登录成功时所触发的事件| e |
