Giter Club home page Giter Club logo

san-mui's Issues

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)

代码报错

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

Grid组件引入不方便

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

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

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

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>
    `;

组件引入问题

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

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.