GithubHelp home page GithubHelp logo

ecomfe / san-mui Goto Github PK

View Code? Open in Web Editor NEW
95.0 26.0 31.0 2.61 MB

A Set of SAN Components that Implement Google's Material Design

Home Page: https://ecomfe.github.io/san-mui

License: MIT License

HTML 0.13% JavaScript 79.61% CSS 20.26%
san material-design

san-mui's Introduction

san-mui

A Set of SAN Components that Implement Google's Material Design

Build Status GitHub license

使用指南

  1. 通过 npm 安装

    npm i -S san-mui
  2. 在代码中引入

    // 引入需要的组件
    import {Button, DatePicker} from 'san-mui';
    
    // 引入全部样式
    import 'san-mui/lib/index.css';

    或者希望只引入需要的组件,可以这么做:

    import Button from 'san-mui/lib/Button';
    import 'san-mui/lib/Button/Button.css';

开发指南

开发

npm run dev

测试

npm test

构建

我们的源码存放在 src,构建产物放在 lib 下;

启动构建命令:

npm run build

发布指南

发布源

只发布到 npm 上;

发布内容

发布内容应该只包含 package.json / readme.md / lib

发布版本

两周内发版本 [email protected] 系列

两周到一个月之内版本:[email protected]

一个月至两个月内:[email protected]

最终版本 [email protected]

[email protected]版本对应的san的版本为3.2.3

[email protected]版本对应的san的版本为3.5.2 源码对应的是version-3.3.x分支

san-mui's People

Contributors

asd123freedom avatar dafrok avatar echodis avatar erik168 avatar harinyhan avatar ielgnaw avatar jiangjiu avatar jinzhubaofu avatar junmer avatar kekee000 avatar leuisken avatar luyuan avatar mkwiser avatar mly-zju avatar naatgit avatar regrex avatar sw811 avatar szxy00000 avatar wuhy avatar yutianmidori avatar zhangzhiqiang37 avatar zhoucumt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

san-mui's Issues

实现不在 material design 规范中的业务常用组件

目前,基本的 MD 规范中的组件已基本实现完成。但是业务中经常会用到以下组件,我们将予以支持:

组件引入问题

目前使用版本1.1.1
组件不能一次性全部加载?
目前发现Table和List组件要单独加载
(List组件缺了API)

Configurable Table组件传入selected属性无效

desc:Configurable Table组件data数组项中的selected为true时,渲染出的表格没有默认选中此项
详见san-mui官网中的Configurable Table示例:https://ecomfe.github.io/san-mui/#/components/Table

解决方法:
因为再TR.js已经实现了selected功能,因此在ConfigurableTable.js中的模板代码片段需要传入获取的selected属性值,如下:

static template = `
        <table class="{{className}}">
            <ui-thead>
                <ui-tr>
                    <ui-td san-for="field in fields">{{field.title}}</ui-td>
                </ui-tr>
            </ui-thead>
            <ui-tbody>
                <ui-tr san-for="item in data" selected="{=item.selected=}">
                    <ui-td san-for="field in fields">{{field | renderField(item)}}</ui-td>
                </ui-tr>
            </ui-tbody>
        </table>
    `;

clone 后 yarn dev 后报错

Base.js?cdfd:15 Uncaught TypeError: Cannot read property '0' of undefined
at eval (eval at (index.js:1557), :17:96)
at Object. (index.js:1557)
at webpack_require (index.js:556)
at fn (index.js:87)
at eval (eval at (index.js:3359), :13:13)
at Object. (index.js:3359)
at webpack_require (index.js:556)
at fn (index.js:87)
at eval (eval at (index.js:659), :8:15)
at Object. (index.js:659)

Grid组件引入不方便

Grid组件引入需要利用如下方式:
import {Row, Col} from 'san-mui/lib/Grid';
官网并没有介绍,建议将Grid组件在index.js中天剑上

代码报错

image
image

childs 这个书写有误 改成children 就正常了

san-mui 开发安排

  1. 学习 san

  2. 选择自己感兴趣的组件

    困难组:

    • Date Picker + Time Picker
    • Dialog
    • Infinite Scroll: List / Refresh Control
    • List
    • Menus: Icon Menu / DropDown Menu
    • Popover
    • Select Field: PC / mobile
    • Switches: CheckBox / Radio / Toggle
    • Table

    简易组:

    • App Bar
    • Auto Complete
    • Avatar
    • Badge
    • Bottom Navigation
    • Bottom Sheet
    • Buttons: Flat Button / Raised Button / Icon Button / Floating Action Button
    • Card
    • Chip
    • Divider
    • Drawer
    • Grid List
    • Icon
    • Pagination
    • Paper
    • Progress: Linear Progress / Circular Progress
    • Slider
    • SnackBar & Toast
    • Stepper
    • Sub header
    • Tabs
    • Text Field
    • Toolbar
    • Tooltip

    基础样式支持:

    • Grid
  3. 开始开发

    优先考虑移动端

    开发注意事项:

    1. API 可以参考 museui
    2. UI 设计 / 交互设计请遵守 material design 规范
    3. 尽量完成单元测试的覆盖
    4. 统一class命名规则“sm-xx”,其中xx为组件名
    5. 可以只兼容到IE9

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.