|
1 | 1 | <img src="logo.png" width="400" height="100" />
|
2 | 2 |
|
3 |
| -WeComponents 是一个基于通用组件语言规范 (CLS) 实现的 Vue.js 声明式组件库,写完 JSON 就做好了页面,让开发变得简单。</p> |
| 3 | +WeComponents 是一个基于通用组件语言规范 (CLS) 实现的 Vue.js 声明式组件库,写完 JSON 就做好了页面,让开发更简单。</p> |
4 | 4 |
|
5 | 5 | [](https://github.com/Tencent/WeComponents/blob/master/LICENSE) [](https://travis-ci.org/Tencent/WeComponents) [](https://coveralls.io/github/Tencent/WeComponents?branch=master) [](https://www.npmjs.com/package/@weadmin/wecomponents)
|
6 | 6 |
|
@@ -66,64 +66,65 @@ export default {
|
66 | 66 | ```javascript
|
67 | 67 | [
|
68 | 68 | {
|
69 |
| - component: 'container', |
70 |
| - items: [ |
| 69 | + "component": "container", |
| 70 | + "items": [ |
71 | 71 | {
|
72 |
| - component: 'form', |
73 |
| - attributes: { layout: 'row' }, |
74 |
| - items: [ |
| 72 | + "component": "form", |
| 73 | + "attributes": { "layout": "row" }, |
| 74 | + "items": [ |
75 | 75 | {
|
76 |
| - name: 'search', |
77 |
| - label: '搜索', |
78 |
| - component: 'input', |
79 |
| - attributes: { placeholder: '输入游戏名称进行搜索' } |
| 76 | + "name": "search", |
| 77 | + "label": "搜索", |
| 78 | + "component": "input", |
| 79 | + "attributes": { "placeholder": "输入游戏名称进行搜索" } |
80 | 80 | },
|
81 | 81 | {
|
82 |
| - label: '查询', |
83 |
| - component: 'submit', |
84 |
| - attributes: { type: 'primary' }, |
85 |
| - events: { submitEventName: 'searchTable' } |
| 82 | + "label": "查询", |
| 83 | + "component": "submit", |
| 84 | + "attributes": { "type": "primary" }, |
| 85 | + // @todo event handle function name in Vue methods |
| 86 | + "events": { "submitEventName": "searchTable" } |
86 | 87 | }
|
87 | 88 | ]
|
88 | 89 | },
|
89 | 90 | {
|
90 |
| - id: 'list', |
91 |
| - component: 'table', |
92 |
| - attributes: { placeholder: '暂无数据', pagination: 'default' }, |
93 |
| - items: [ |
| 91 | + "id": "list", |
| 92 | + "component": "table", |
| 93 | + "attributes": { "placeholder": "暂无数据", "pagination": "default" }, |
| 94 | + "items": [ |
94 | 95 | {
|
95 |
| - name: "icon", |
96 |
| - label: "游戏图标", |
97 |
| - attributes: { width: 60, textAlign: "center" }, |
98 |
| - // value filter function name in Vue methods |
99 |
| - valueFilterName: 'iconFilter' |
| 96 | + "name": "icon", |
| 97 | + "label": "游戏图标", |
| 98 | + "attributes": { "width": 60, "textAlign": "center" }, |
| 99 | + // @todo value filter function name in Vue methods |
| 100 | + "valueFilterName": "iconFilter" |
100 | 101 | },
|
101 |
| - { name: "name", label: "游戏名称" }, |
| 102 | + { "name": "name", "label": "游戏名称" }, |
102 | 103 | {
|
103 |
| - name: "size", |
104 |
| - label: "大小", |
105 |
| - attributes: { textAlign: "right" }, |
106 |
| - valueFilterName: 'sizeFilter' |
| 104 | + "name": "size", |
| 105 | + "label": "大小", |
| 106 | + "attributes": { "textAlign": "right" }, |
| 107 | + "valueFilterName": "sizeFilter" |
107 | 108 | },
|
108 |
| - { name: "intro", label: "简介" }, |
| 109 | + { "name": "intro", "label": "简介" }, |
109 | 110 | {
|
110 |
| - label: "操作", |
111 |
| - name: 'option', |
112 |
| - valueFilterName: 'optionFilter' |
| 111 | + "label": "操作", |
| 112 | + "name": "option", |
| 113 | + "valueFilterName": "optionFilter" |
113 | 114 | }
|
114 | 115 | ],
|
115 |
| - value: [ |
| 116 | + "value": [ |
116 | 117 | {
|
117 |
| - icon: 'http://mmocgame.qpic.cn/wechatgame/HurH4elIxzLGX0FjtUic0kcQtloVbicTO6LVjWicWYwrIvUBSsve2KWz40jS2MFM5Zu/0', |
118 |
| - name: '王者荣耀', |
119 |
| - size: 3675556864, |
120 |
| - intro: '爽快超神,腾讯5v5英雄公平对战手游' |
| 118 | + "icon": "http://mmocgame.qpic.cn/wechatgame/HurH4elIxzLGX0FjtUic0kcQtloVbicTO6LVjWicWYwrIvUBSsve2KWz40jS2MFM5Zu/0", |
| 119 | + "name": "王者荣耀", |
| 120 | + "size": 3675556864, |
| 121 | + "intro": "爽快超神,腾讯5v5英雄公平对战手游" |
121 | 122 | },
|
122 | 123 | {
|
123 |
| - icon: 'https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSTLicunKH0MgcMLa8jicfvBvEXiaNAIReHzQJxhsibvgbVpIKtibgV8UcMEO/0', |
124 |
| - name: '和平精英', |
125 |
| - size: 3898905600, |
126 |
| - intro: '大吉大利,腾讯光子自研军事竞赛体验' |
| 124 | + "icon": "https://mmocgame.qpic.cn/wechatgame/duc2TvpEgSTLicunKH0MgcMLa8jicfvBvEXiaNAIReHzQJxhsibvgbVpIKtibgV8UcMEO/0", |
| 125 | + "name": "和平精英", |
| 126 | + "size": 3898905600, |
| 127 | + "intro": "大吉大利,腾讯光子自研军事竞赛体验" |
127 | 128 | }
|
128 | 129 | ]
|
129 | 130 | }
|
|
0 commit comments