1.0.15 • Published 4 years ago

front-components-isaacwonderxu v1.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

front-components-isaacwonderxu

A simple Vue components for page login and footer.

Building manually

After checking out the repo, install dependencies:

npm install @oasis-games/front-components-isaacwonderxu

Then build a minified, distributable JS file:

npm run build

Example Usage In Vue Project

Vue Global registration:

import Fci from @oasis-games/front-components-isaacwonderxu;
Vue.use(Fci)

<template>
   <fci-footer :options="footerConfig"></fci-footer>
   <fci-login-reg
            :options="loginRegConfig"
            :dialog-visible="dialogVisible"
            @close="close"
            @loginCallBack="loginCallBack"
   ></fci-login-reg>
</template>

<script>
export default {
   name: "app",
   data() {
       return {
           footerConfig: {
                lang: "tw"
            }, 
           loginRegConfig: {
                lang: "tw",
                appId: "1319220848281844",
                client: "marstest",
                isDebug: true,
                cookieUser: "fci-user",
                cookieRefresh: false,
                domain: ".tabzen.net"
            },
            dialogVisible: true
       };
   },
   methods: {
        close(dialogVisible) {
            this.dialogVisible = dialogVisible;
        },
        loginCallBack(e) {
            console.log(e);
            this.dialogVisible = false;
        }
    }
};
</script>

Footer Attributes

属性类型说明默认值
langstring语言包en

LoginReg Attributes

属性类型说明默认值
langstring语言包en
appIdstringfaceBook登录方式所需 应用的id
clientstring接入的游戏
isDebugboolean测试/线上环境false
cookieUserstring自定义登录/注册用户cookie名
cookieRefreshboolean是否启用cookie过期刷新机制、该参数依赖cookieUser是否设置false
domainstringcookie根域
dialogVisibleboolean登录框显隐

LoginReg Events

事件名说明参数
close用户关闭登录插件时所触发的事件dialogVisible
loginCallBack用户登录、注册成功时所触发的事件e
1.0.15

4 years ago