• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ev-ui: An ui library, some awesome components.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ev-ui

开源软件地址:

https://gitee.com/evui/evui

开源软件介绍:


ev-ui

An ui library , some awesome components.

Some Components are available now as below.Home

preview

Home
Demo

install

npm install --save ev-ui

usage

first include your code in the EvUI component

import {EvUI} from 'ev-ui'    render(){        return(            <EvUI>                your code            </EvUI>        )    }
  1. Dialog:
  • usage
     just show the content:
Dialog.show(Comp)

  or show comp with props:

import {Dialog} from 'ev-ui'import {Comp} from 'comp.js'const props={    content:Comp, //Component or string ,required    mainBlur:false,// the background where filter blur if     k1:{}, // any other props    k2:{}}Dialog.show(props)
  • screenshot
    login
    create
  1. ContextMenu:
  • usage
import {ContextMenu,Menu,Item} from 'ev-ui'export default class Demo extends React.Component{    /**    * first disable the default contextmenu    */    componentDidMount(){        window.oncontextmenu=(e)=>{            e.preventDefault()            }    /**    * then bind the function to the node's onContextMenu event.    */    onContextMenu(e){        let menu=new Menu()            .add(new MenuItem('新建',()=>{})                    .add(new MenuItem('A',()=>{}))                    .add(new MenuItem('B',()=>{}))                    .add(new MenuItem('C',()=>{}))                )            .add(new MenuItem('编辑',()=>{}))            .add(new MenuItem('复制',()=>{}))            .add(new MenuItem('剪切',()=>{}))            // .add(new MenuItem('剪切',()=>{})).type('disabled') // the menuItem will be disabled(gray color and do nothing when clicked)            .add(new MenuItem('粘贴',()=>{}))            .add(new MenuItem('删除',()=>{}).type('remove'))                    menu.notEmpty() && ContextMenu.show({menu,left:e.pageX,top:e.pageY})    }    render(){        return(            <div onContextMenu={this.onContextMenu.bind(this)}>demo</div>        )    }}
  • screenshot
    ContextMenu
  1. Confirm:
  • usage
import {Confirm} from 'ev-ui'Confirm.show(()=>{    //called when you click confirm},()=>{    // called when you click cancel})
  • screenshotConfirm
  1. ActionTag:
  • usage
    import {ActionTag} from 'ev-ui'    //here use the Icon of the antd for demo,you can use others for example FontAwesome...    import {Icon} from 'antd'    render(){        return(            <div style={{display:flex,flexDirection:row,alignItems:center}}>                <ActionTag                    iconField={<Icon type='plus'/>}                    textField='Create'                    onClick={()=>{}}                    />                {/* set the type*/}                <ActionTag                    iconField={<Icon type='delete'/>}                    textField='Remove'                    type='danger'                    onClick={()=>{}}                    />                {/* or set the size*/}                <ActionTag                    iconField={<Icon type='edit'/>}                    textField='Edit'                    size='large'                    onClick={()=>{}}                    />            </div>        )    }
  • screenshot
    ActionTag
  1. Flow:
  • usage
import {Flow} from 'ev-ui'const data=[    {        id:'0',        name:'Flow0',        tasks:[            {point:0,name:'Task0',parent:[],children:[1]},            {point:1,name:'Task1',parent:[0],children:[2,3]},            {point:2,name:'Task2',parent:[1],children:[4]},            {point:3,name:'Task3',parent:[1],children:[4]},            {point:4,name:'Task4',parent:[2,3],children:[]},        ]    },      {        id:'1',        name:'Flow1',        tasks:[            {point:0,name:'Task0',parent:[],children:[1]},            {point:1,name:'Task1',parent:[0],children:[2]},            {point:2,name:'Task2',parent:[1],children:[3]},            {point:3,name:'Task3',parent:[2],children:[4]},            {point:4,name:'Task4',parent:[3],children:[]},        ]    }  ]export default class Process extends React.Component{    state={        processes:data,        selectedProcess:{}    }    onTaskChange(tasks){        //update the tasks    }    onCreate(){        //create process    }        render(){        return(            <div className='left-nav'>                {/* show the processes list */}            </div>            <div className='content'>                <Flow tasks={this.state.selectedProcess.tasks}                     onChange={this.onTasksChange.bind(this)}                    onFlowCreate={this.onCreate.bind(this)}                    selectedProcess={this.state.selectedProcess || {}}/>            </div>        )    }}
  • screenshot
    Flow

The document will be added later.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
JqGridForMvc: JqGrid的逐步封装发布时间:2022-02-13
下一篇:
jui: 是一款基于 Taro 框架开发的 UI 组件库发布时间:2022-02-13
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap