Skip to content

[css] 第119天 你有没有自己写过一套UI库?说下遇到哪些难点? #1058

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第119天 你有没有自己写过一套UI库?说下遇到哪些难点?

Activity

Gloomysunday28

Gloomysunday28 commented on Aug 13, 2019

@Gloomysunday28

目录划分、按需加载当时有点疑惑

LJH520

LJH520 commented on Aug 13, 2019

@LJH520

没有写过,都是和组件封一起┭┮﹏┭┮

XboxYan

XboxYan commented on Aug 15, 2019

@XboxYan

有啊。这是一个基于web-components的UI组件库

http://xy-ui.codelabo.cn/docs

感觉如何设计组件的整体主题样式和配置项是个难点

这里采用css自定义属性

:root{
    --themeColor:#42b983
}

比如有一种组件,有的人可能喜欢上面一种风格,有的人可能喜欢下面那种风格

<xy-select>
    <xy-option>AAA</xy-option>
    <xy-option>BBB</xy-option>
</xy-select>
<!--or-->
<xy-select values=['AAA','BBB']></xy-select>
ipadthree

ipadthree commented on Sep 22, 2019

@ipadthree

维护过,碰到的坑主要是
1)同一个UI component在不同地方使用的customization问题。
2)还有如果UI component如果有bug的话会导致所有使用的地方都出现bug
3)改了一个UI component后在A处work,但是在B处因为context不一样导致render出来的效果不一样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@ipadthree@XboxYan@Gloomysunday28@LJH520

        Issue actions

          [css] 第119天 你有没有自己写过一套UI库?说下遇到哪些难点? · Issue #1058 · haizlin/fe-interview