0.1.0 • Published 11 months ago

@cennavi-fe/nce-library v0.1.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
11 months ago

nce-library

更新自:2022-07-27,版本0.1.19

download

npm install nce-library
yarn add nce-library

按需引入

import { NceNav, NceHeader, NcePlantform, NceFooter } from "nce-library";
import "nce-library/dist/index.css";

Vue.use(NceNav);
Vue.use(NceHeader);
Vue.use(NcePlantform);
Vue.use(NceFooter);

全部导入

import NceLibrary from "nce-library";
import "nce-library/dist/index.css";

Vue.use(NceLibrary);

具体文档

Nce-Nav

import { NceNav } from "nce-library";

Vue.use(NceNav);
<nce-nav
    userName="张三"
    :userAvatar="userAvatar"
    :userRoutes="userRoutes"
    @handleClickToPage="handleClickToPage"
    @handleToHomePage="handleToHomePage"
></nce-nav>

Attributes

参数说明类型默认值是否必传
platformName平台名String工作台true
userName右上角用户Stringtrue
userAvatar右上角用户头像Stringfalse
userRoutes平台自己定义的路由表Array[]true
useCustomerRoute不启用下拉菜单(nce-nav 专用,用于区分其他平台)Booleanfalsefalse
rightMenuList右上角菜单Array[]true
plantFormMenuList每个平台自己的菜单(用于单独配置)Array[]true

Methods

方法名说明参数
handleClickToPage点击菜单菜单信息
handleToHomePage回到首页

Slot

设置 logo 或者其他文字

<nce-nav
    userName="张三"
    :userAvatar="userAvatar"
    :userRoutes="userRoutes"
    @handleClickToPage="handleClickToPage"
    @handleToHomePage="handleToHomePage"
>
    <img src="图片" /> 或者 文字
</nce-nav>

NceHeader

import { NceHeader } from "nce-library";

Vue.use(NceHeader);
<nce-header
    targetType="_self"
    :logoImg="logoImg"
    @backPortal="backPortal"
    @toWorkbench="toWorkbench"
/>

Attributes

参数说明类型可选参数
type平台名String
targetType跳转页面方式String_self or _blank
logoImg左上角 logoString
host跳转域名(单独部署可用,不传默认是 location.host)String

Methods

方法名说明
toWorkbench跳转到工作台
backPortal回到首页

NceFooter

import { NceFooter } from "nce-library";

Vue.use(NceFooter);
 <nce-footer>
    <template #copyright>世纪高通 | MineData@Earth Enterprise v3.3.1</template>
    <template #description
    >Copyright 2017-2020 Cennavi All Rights Reserved, Beijing Cennavi Technology
    Co.,Ltd.</template
    >
</nce-footer>

插槽

参数说明类型
copyright公司名String
description介绍String

NcePlantform

import { NcePlantform } from "nce-library";

Vue.use(NcePlantform);
<nce-plantform
    :platformName="platformName"
    :show="show"
    @handleToHomePage="handleToHomePage"
/>

Attributes

参数说明类型默认值
platformName平台名String工作台
show是否显示下级菜单Boolean

Methods

方法名说明
handleToHomePage回到首页