1.0.8 • Published 5 years ago

megui-inc v1.0.8

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

#Install

npm install megui-inc@latest -S

#Usage

import React from 'react';
import {MegFooter, MegHeader} from 'megui-inc/lib';
import 'main.less';

class Demo extends from React.Component {
  state = {
    className: 'custom-header'
  }
  menu = [{
    href: '/',
    label: '产品',
    icon: null
  },{
    href: '/customers',
    label: '案例',
    icon: null
  },{
    href: '/technology',
    label: '技术',
    icon: null
  },{
    href: '/pages/documents',
    label: '文档',
    icon: null
  },{
    href: '/customization/contact-us',
    label: '联系我们',
    icon: null
  },{
    href: '/faceopen/pages',
    label: '控制台',
    icon: null,
    class: 'console'
  },{
    href: 'https://global.faceid.com',
    label: '中文/EN',
    icon: null,
    parentClass: 'change-language'
  }];
  
  render() {
    return (
      <div>
        <MegHeader menu={this.menu} className={this.state.className}>
        {this.props.children}
        <MegFooter/>
      </div>
    )
  }
}

#Development

  • src目录:源代码开发
  • lib目录:编译打包输出目录,也是发布到npm上的代码包
  • examples目录:引用自定义npm模块的示例项目
npm run build //编译打包
npm publish //发布本项目到npm

P.S.

  • 示例项目在使用时需要通过npm link建立软链接,将lib目录挂在到全局
  • 每次发布前记得修改npm包版本
  • 每次发布更新请在ChangeLog.md文件中记录更新内容
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago