1.7.4 • Published 5 years ago

ucar-view v1.7.4

Weekly downloads
27
License
MIT
Repository
-
Last release
5 years ago

ucar-view

基于Vue的ucar内部组件库

安装

$ npm install ucar-view -S

使用

main.js 文件中引入插件并注册

# main.js
import uHeader from 'ucar-view'
Vue.use(uHeader)

在项目中使用 ucar-view

<template>
  <u-header />
</template>
参数说明参数类型
user-name当前登录用户姓名String
category-list搜索条件列表Array
category-name当前页面默认搜索类型名称String
category-id当前页面默认搜索类型IdNumber,String
search-key当前页面搜索条件Number,String
menu-list菜单列表Array
current-menu-id当前页面对应的菜单IdNumber,String
notice-url通知跳转地址String
have-new-notice是否有新的提示Boolean
msg-url消息跳转地址String
have-new-msg是否有新的消息Boolean
方法说明返回参数
@after-search点击搜索事件Object 返回当前选中的搜索类型名称、Id、搜索条件
@check-info查看个人信息/
@modify-pwd点击修改密码时间/
@login-out点击注销事件/

示例

<template>
  <u-header 
  :have-new-msg="haveNewMsg" 
  :user-name="userName"
  :category-list="categoryList"
  :menu-list="menuList"
  @after-search="searchClick"
  @login-out="loginOut"></u-header>
</template>
data(){
    return {
        userName:'张三',
        messageList:[{msg:'这是一条新消息'}],
        categoryList:
        [{ CategoryName: "找人", CategoryId: 1 },
        { CategoryName: "搜知识", CategoryId: 2 },
        { CategoryName: "查会议", CategoryId: 3 }],
        menuList:
        [{ Name: "首页", Href: "http://w3.ucarinc.com", Id: 0 },
        { Name: "人力助手", Href: "http://hcm.ucarinc.com", Id: 1 },
        { Name: "财务助手", Href: "http://ems.corp.ucarinc.com/main.screen", Id: 2 },
        { Name: "通讯录", Href: "http://hcm.ucarinc.com", Id: 3 },
        { Name: "采购合同系统", Href: "http://pms.corp.ucarinc.com/.com", Id: 4 },
        { Name: "制度流程管理", Href: "http://w3cms.ucarinc.com/portalcms/article/client/index.do", Id: 5 },
        { Name: "学习助手", Href: "http://www.ulearnsystem.ucarinc.com/ulearnsystem/client/index", Id: 6 }]
    }
},
computed:{
    haveNewMsg(){
        return this.messageList.length > 0
    }
},
methods:{
    searchClick(){
        console.log('点击了搜索按钮');
    },
    loginOut(){
        console.log('点击了注销按钮');
    }
}
1.7.4

5 years ago

1.7.3

5 years ago

1.4.5

5 years ago

1.3.6

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago