1.0.0-beta • Published 3 months ago

@glodon-gbp/header-vue3 v1.0.0-beta

Weekly downloads
-
License
Apache 2
Repository
-
Last release
3 months ago

@glodon-gbp/header-vue3

广联达建筑业务平台(Glodon Business Platform, GBP),“工单服务”头部 SDK UI。

预览

编译

npm run dev # 开发调试
npm run build # 编译发布

模块化

  • 安装依赖
npm i @glodon-gbp/header-vue3 -S
  • 引入组件
import { GbpHeader } from '@glodon-gbp/header-vue3';
import '@glodon-gbp/header-vue3/lib/index.css';

用例

<template>
  <gbp-header :accountData="state.config" :options="state.options" fixed />
</template>

<script setup>
import { reactive } from 'vue';

const state = reactive({
  config:{
    profile: {
        displayName : '用户名称',
        avatarUrl : '用户头像链接'
    },
    component: {
        count: 2
    },
    verification: {
        status: "verified"
    }
  },
  options:{
    serviceName:'服务与支持',
    serviceNameURL: '/',
    serviceNameTarget: '_self',
    entries:[
      {
        label: '文档中心',
        url: 'https://developer.glodon.com/docs',
        target:'_blank',
      },
      {
        label: '控制台',
        url: 'https://developer.glodon.com/',
        target:'_blank',
      }
    ]
  }
})
</script>

事件

事件描述必填默认值
before-sign-out登出前触发事件-

属性

属性描述类型参数范围必填默认值
fixed顶部固定Boolean-false
zIndex组件层级Number-99
options配置参数Object--
accountData用户数据Object--

Options

属性描述类型参数范围必填默认值
serviceName服务名称String--
serviceNameURL服务名称链接String--
serviceNameTarget链接打开方式String_blank 、_self 、_parent 、_top_self
entries控制台入口Array--
entries.label入口名称String--
entries.url入口链接String--
entries.target链接打开方式String_blank 、_self 、_parent 、_top 、-_blank

Account Data

属性描述类型参数范围必填默认值
verification.status开放平台审核状态Stringverified-
component.count用户上架的组件数Number-0
profile.displayName用户名称String-''
profile.avatarUrl用户头像链接String-''

服务配置项

属性描述必填
VITE_URL_UC_INFO用户中心链接
VITE_URL_GBP_SDK_HOME点击 Logo 时跳转链接
VITE_URL_GBP_SDK_LOGOLogo 图标地址
1.0.0-beta

3 months ago

0.2.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago