All Projects → Tencent → Wecomponents

Tencent / Wecomponents

Licence: other
基于通用组件语言规范 (CLS) 实现的 Vue.js 声明式组件库

Projects that are alternatives of or similar to Wecomponents

Gomponents
Declarative view components in Go, that can render to HTML5.
Stars: ✭ 49 (-80%)
Mutual labels:  declarative-ui, ui-components
Jetquotes
🔖 A Quotes Application built to Demonstrate the Jetpack Compose UI
Stars: ✭ 179 (-26.94%)
Mutual labels:  declarative-ui, ui-components
Komponents Deprecated
📦 React-inspired UIKit Components - ⚠️ Deprecated
Stars: ✭ 202 (-17.55%)
Mutual labels:  declarative-ui, ui-components
Css Mint
Lightweight and simple to use UI Kit. Fully responsive, just 3KB gzipped.
Stars: ✭ 209 (-14.69%)
Mutual labels:  ui-components
Edi
Edi - The open source text editor IDE based on AvalonDock and AvalonEdit
Stars: ✭ 220 (-10.2%)
Mutual labels:  ui-components
Construct Ui
A Mithril.js UI library
Stars: ✭ 233 (-4.9%)
Mutual labels:  ui-components
Boundless
✨ accessible, battle-tested React components with infinite composability
Stars: ✭ 242 (-1.22%)
Mutual labels:  ui-components
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+868.57%)
Mutual labels:  ui-components
A17t
An atomic design toolkit for pragmatists
Stars: ✭ 236 (-3.67%)
Mutual labels:  ui-components
Yandex Ui
Yandex UI Kit build on React and bem-react
Stars: ✭ 229 (-6.53%)
Mutual labels:  ui-components
Oui
Optimizely's Component Library
Stars: ✭ 228 (-6.94%)
Mutual labels:  ui-components
Ui5 Webcomponents React
A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
Stars: ✭ 220 (-10.2%)
Mutual labels:  ui-components
Antizer
ClojureScript library for Ant Design React UI components
Stars: ✭ 234 (-4.49%)
Mutual labels:  ui-components
Carbon Native
A set of UI components for building React Native apps
Stars: ✭ 213 (-13.06%)
Mutual labels:  ui-components
Coreui React
CoreUI React.js UI Components. CoreUI for React.js replaces and extends the Bootstrap javascript. Components have been built from scratch as true React.js hook components, without jQuery and unneeded dependencies.
Stars: ✭ 239 (-2.45%)
Mutual labels:  ui-components
Bit
A tool for component-driven application development.
Stars: ✭ 14,443 (+5795.1%)
Mutual labels:  ui-components
Magento2 Cronjobmanager
Cron Job Manager for Magento 2
Stars: ✭ 233 (-4.9%)
Mutual labels:  ui-components
Metroset Ui
Windows Forms Metro Skin Style, Make The Applications With Metro Styles. see more https://n-a-r-w-i-n.github.io/MetroSet-UI/
Stars: ✭ 228 (-6.94%)
Mutual labels:  ui-components
Stpopup
STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
Stars: ✭ 2,517 (+927.35%)
Mutual labels:  ui-components
Numl
A UI Design Language, WC UI Library, and Runtime CSS Framework for rapidly building interfaces that follow your Design System 🌈
Stars: ✭ 229 (-6.53%)
Mutual labels:  ui-components

WeComponents 是一个基于通用组件语言规范 (CLS) 实现的 Vue.js 声明式组件库,写完 JSON 就做好了页面,让开发更简单。

License Build Status Coverage Status Npm Version

特点

设计思想上,以实现通用组件语言规范 CLS 为核心,即“将所有组件抽象为统一模型”,详见通用组件语言规范

数据驱动

  • UI 也是数据
  • 以数据结构描述组件
  • 以组件描述页面

开发者友好

  • 低门槛,学习了一种组件语言,就学会了整个组件库的使用
  • 易理解,易记忆,易使用

语义化

  • 符合一般人对功能的认知
  • 合适的场景,合适的支持

目前主要包含表单、列表、图表三类组件的实现,更多请查看说明文档

使用说明

以 Vue.js 为例:

// 1. 引入组件库
import WeComponents from '@weadmin/wecomponents';

// 2. 声明页面组件
let pageFields = [
    {
        component: 'input',
        label: '标题'
    }
];

// 3. 数据绑定
export default {
    data(){
        return {
            // 初始化组件库
            page: new WeComponents(this, pageFields)
        }
    }
};

案例展示

以一个常见的查询列表需求为例。完整代码见demo工程

需求背景:提供一个搜索框,点击查询按钮后,展示结果列表,需要支持翻页

效果展示

demo

组件声明

[
    {
        "component": "container",
        "items": [
            {
                "component": "form",
                "attributes": { "layout": "row" },
                "items": [
                    {
                        "name": "search",
                        "label": "搜索",
                        "component": "input",
                        "attributes": { "placeholder": "输入游戏名称进行搜索" }
                    },
                    {
                        "label": "查询",
                        "component": "submit",
                        "attributes": { "type": "primary" },
                        "events": { "submitEventName": "searchTable" }
                    }
                ]
            },
            {
                "id": "list",
                "component": "table",
                "attributes": { "placeholder": "暂无数据", "pagination": "default" },
                "items": [
                    {
                        "name": "icon",
                        "label": "游戏图标",
                        "attributes": { "width": 60, "textAlign": "center" },
                        "valueFilterName": "iconFilter"
                    },
                    { "name": "name", "label": "游戏名称" },
                    {
                        "name": "size",
                        "label": "大小",
                        "attributes": { "textAlign": "right" },
                        "valueFilterName": "sizeFilter"
                    },
                    { "name": "intro", "label": "简介" },
                    {
                        "label": "操作",
                        "name": "option",
                        "valueFilterName": "optionFilter"
                    }
                ],
                "value": [
                    {
                        "icon": "http://mmocgame.qpic.cn/wechatgame/HurH4elIxzLGX0FjtUic0kcQtloVbicTO6LVjWicWYwrIvUBSsve2KWz40jS2MFM5Zu/0",
                        "name": "王者荣耀",
                        "size": 3675556864,
                        "intro": "爽快超神,腾讯5v5英雄公平对战手游"
                    },
                    {
                        "icon": "https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSTLicunKH0MgcMLa8jicfvBvEXiaNAIReHzQJxhsibvgbVpIKtibgV8UcMEO/0",
                        "name": "和平精英",
                        "size": 3898905600,
                        "intro": "大吉大利,腾讯光子自研军事竞赛体验"
                    }
                ]
            }
        ]
    }
]

参与贡献

如果你有好的意见或建议,欢迎给我们提 Issues 或 Pull Requests。 详见:CONTRIBUTING.md

腾讯开源激励计划 鼓励开发者的参与和贡献,期待你的加入。

License

所有代码采用 MIT License 开源,可根据自身团队和项目特点 fork 进行定制。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].