Skip to content

Commit

Permalink
文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
qili.taoqili committed Mar 12, 2019
1 parent 7d89b15 commit 7b62662
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 121 deletions.
2 changes: 1 addition & 1 deletion site/components/button/demo/size.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Button } from 'uxcore';
ReactDOM.render(
<div>
<Button size="small">small</Button>&nbsp;
<Button size="medium">medium</Button>&nbsp;
<Button size="middle">middle</Button>&nbsp;
<Button size="large">large</Button>
</div>
, document.getElementById('components-button-demo-size'));
Expand Down
2 changes: 1 addition & 1 deletion site/components/button/demo/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ReactDOM.render(
<Button type="primary">primary</Button>&nbsp;
<Button type="secondary">secondary</Button>&nbsp;
<Button type="outline">outline</Button>&nbsp;
<Button type="white">white</Button>&nbsp;
<Button ghost type="white">white</Button>&nbsp;
<Button type="text">text</Button>&nbsp;
</div>
, document.getElementById('components-button-demo-type'));
Expand Down
2 changes: 1 addition & 1 deletion site/components/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

|参数|说明|类型|默认值|
|---|----|---|------|
|size|按钮大小(`large` `medium` `small`)|string|medium|
|size|按钮大小(`large` `medium or middle` `small`)|string|medium|
|type|类型(`primary` `secondary` `outline` `white` `text`)|string|blue|
|disabled|是否禁用(`disabled``true` `false`)|string|false|
|className|增加额外的class|string|''|
Expand Down
11 changes: 7 additions & 4 deletions site/components/table/demo/percent.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 百分比布局
# 百分比布局 + 可调整列宽

- order: 2

表格的列按照百分比布局,同时支持和列固定的组合。拖动屏幕边缘,调整宽度试一试~
表格的列按照百分比布局,同时支持和列固定的组合。拖动屏幕边缘,调整表格整体宽度试一试~

列标题处支持拖拽调整列宽。

---

Expand All @@ -28,7 +30,8 @@ class Demo extends React.Component {
edit() {},
del() {},
},
className: 'kuma-uxtable-split-line',
columnResizeable: true,
className: 'kuma-uxtable-border-line',
fetchParams: {},
showColumnPicker: false,
fetchUrl,
Expand All @@ -39,4 +42,4 @@ class Demo extends React.Component {
}

ReactDOM.render(<Demo />, document.getElementById('components-table-demo-percent'));
````
````
38 changes: 30 additions & 8 deletions site/components/table/demo/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,41 @@ class Demo extends React.Component {
dataKey: 'firstName',
title: 'FristName',
width: 200,

},
{
dataKey: 'lastName',
title: 'LastName',
width: 200,

order: true,
},
{
dataKey: 'email',
title: 'Email',
width: 200,
ordered: true,
title: '操作',
type: 'action',
rightFixed: true,
width: '300px',
collapseNum: 5,
actions: [
{
title: '新增子行',
callback: (rowData) => {
this.table.addSubRowFromTop({
"country": `中国`,
"city": "杭州",
"firstName": `FirstName_${setTimeout(0)}`,
"lastName": "LastName",
}, rowData, () => {
console.log(this.table.getData())
})
}
},
{
title: '删除',
callback: (rowData) => {
this.table.delRow(rowData);
},
}
],
},
];

Expand All @@ -60,9 +82,9 @@ class Demo extends React.Component {
onSelectAll: () => {},
},
};
return (<Table {...renderProps} ref="table" />);
return (<Table {...renderProps} ref={(c) => {this.table = c}} />);
}
}

ReactDOM.render(<Demo />, document.getElementById('components-table-demo-tree'));
````
````
2 changes: 1 addition & 1 deletion site/components/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
|----------- |---------- |--- |------ |----- |
|dataKey |string |- |required |表格的数据中用于查看模式展示的字段|
|editKey |string |- |optional |表格的数据中用于编辑模式的字段,如对于 select 来说,此项应为选项里的 key|
|align |string |- |optional |文字居中方式,默认 'left'|
|align |string |- |optional |文字居中方式,同text-align属性,默认 'left'|
|title |string/func |- |required |列头标题,可以是个函数,根据返回值进行渲染|
|width |number |- |required |列宽|
|hidden |boolean |- |optional |是否隐藏,默认为 false|
Expand Down
105 changes: 55 additions & 50 deletions theme/static/builder.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions theme/static/setting.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theme/static/style/blue.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theme/static/style/green.css

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions theme/static/style/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theme/static/style/orange.css

Large diffs are not rendered by default.

96 changes: 51 additions & 45 deletions theme/static/uxcore.js

Large diffs are not rendered by default.

0 comments on commit 7b62662

Please sign in to comment.