Giter VIP home page Giter VIP logo

hanser-ui's Introduction

hanser弹幕组UI库(Vue版)

  1. 命名规范

    1.1 所有组件名必须以 h- 开头

    1.2 css规范

    • 不使用id
    • 标签统一使用 小写- (短横线)
    • 类名由以下元素构成
      • 小写字母
      • - (短横线)
      • _ (下划线)
      • 数字
    • 使用 BEM 命名规范: 块__元素--修饰符
      例:
      .footer__logo--dark (黑暗模式的底部LOGO)
      .user-rank__avatar--first (用户棒排名第一的用户头像)
      .post-title--top(置顶帖标题)
    • 减少嵌套,一般情况下最多只用2层嵌套
    • 避免使用 /deep/,如果不可避免要使用的话,应该考虑在组件中提供参数来修改组件样式

    1.3 js规范

    • 变量名,函数名统一使用小驼峰命名;类名统一使用大驼峰命名
  2. 其他规范

    2.1 统一使用4空格缩进

    2.2 组件使用时使用小写加 - 形式:
    组件类: HButton
    使用:<h-button></h-button>

    2.3 参考 h-standard 组件

  3. 创建新组件

    运行 npm run component 组件名 注释 创建组件

  4. 使用文档

  5. 主题色增加文档

hanser-ui's People

Contributors

zcreturn0 avatar matchadog avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.