Browse Source

add ui doc

es6
iapyang 7 years ago
parent
commit
e7b754e5b7
  1. 13
      uidoc/.gitignore
  2. 21
      uidoc/LICENSE
  3. 2
      uidoc/README.md
  4. 25
      uidoc/SUMMARY.md
  5. 23
      uidoc/book.json
  6. 2
      uidoc/detailed/bi.button/general.md
  7. 2
      uidoc/detailed/bi.button/tooltip.md
  8. 2
      uidoc/detailed/bi.multi_select_item.md
  9. 2
      uidoc/detailed/bi.segment.md
  10. 2
      uidoc/detailed/bi.single_select_item.md
  11. 2
      uidoc/detailed/node.md
  12. 57
      uidoc/detailed/table/bi.excel_table.md
  13. 2
      uidoc/detailed/table/bi.preview_table.md
  14. 2
      uidoc/detailed/table/bi.responsive_table.md
  15. 42
      uidoc/detailed/text_input/bi.clear_editor.md
  16. 60
      uidoc/detailed/text_input/bi.search_editor.md
  17. 89
      uidoc/detailed/text_input/bi.text_editor.md
  18. 2
      uidoc/detailed/tree/bi.multi_tree_combo.md
  19. 2
      uidoc/detailed/tree/bi.switch_tree.md
  20. 5
      uidoc/gh.js
  21. 30
      uidoc/package.json

13
uidoc/.gitignore vendored

@ -0,0 +1,13 @@
.DS_Store
.svn
.sass-cache
.vscode
.tmp
node_modules
bower_components
tmp
dist
archive
archive.zip
*.log
_book

21
uidoc/LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 gittz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

2
uidoc/README.md

@ -0,0 +1,2 @@
# FineUIdocs
FineUI的交互、前端以及视觉文档规范

25
uidoc/SUMMARY.md

@ -0,0 +1,25 @@
# Summary
## 总览
* [文档规范](README.md)
## 详细控件
* 按钮组
* [通用按钮](detailed/bi.button/general.md)
* [带提示的按钮](detailed/bi.button/tooltip.md)
* [单选框](detailed/bi.single_select_item.md)
* [复选框](detailed/bi.multi_select_item.md)
* [node节点](detailed/node.md)
* [segment组件](detailed/bi.segment.md)
* 树形结构
* [bi.multi_tree_combo](detailed/tree/bi.multi_tree_combo.md)
* [bi.switch_tree](detailed/tree/bi.switch_tree.md)
* 表格
* [bi.preview_table](detailed/table/bi.preview_table.md)
* [bi.responsive_table](detailed/table/bi.responsive_table.md)
* [bi.excel_table](detailed/table/bi.excel_table.md)
* 文本框控件
* [bi.text_editor](detailed/text_input/bi.text_editor.md)
* [bi.search_editor](detailed/text_input/bi.search_editor.md)
* [bi.clear_editor](detailed/text_input/bi.clear_editor.md)

23
uidoc/book.json

@ -0,0 +1,23 @@
{
"plugins": [
"jsfiddle",
"splitter",
"theme-api"
],
"pluginsConfig": {
"theme-default": {
"showLevel": true
},
"jsfiddle": {
"type": "script",
"tabs": [
"result",
"js",
"html"
],
"height": "100",
"width": "500",
"fontColor": "00FF00"
}
}
}

2
uidoc/detailed/bi.button/general.md

@ -0,0 +1,2 @@
# 通用按钮

2
uidoc/detailed/bi.button/tooltip.md

@ -0,0 +1,2 @@
# 带提示的按钮

2
uidoc/detailed/bi.multi_select_item.md

@ -0,0 +1,2 @@
# 复选框

2
uidoc/detailed/bi.segment.md

@ -0,0 +1,2 @@
# segment组件

2
uidoc/detailed/bi.single_select_item.md

@ -0,0 +1,2 @@
# 单选框

2
uidoc/detailed/node.md

@ -0,0 +1,2 @@
# node节点

57
uidoc/detailed/table/bi.excel_table.md

@ -0,0 +1,57 @@
# bi.excel_table
{% method %}
[source](https://jsfiddle.net/fineui/cbmv07g4/)
{% common %}
```javascript
BI.createWidget({
type: "bi.excel_table",
element: "#wrapper",
width: 500,
columnSize: [200,200,200,200,200],
items: [
[{
type: "bi.label",
cls: "layout-bg1",
text: "第一行第一列"
}, {
type: "bi.label",
cls: "layout-bg2",
text: "第一行第二列"
}],
[{
type: "bi.label",
cls: "layout-bg3",
text: "第二行第一列"
}, {
type: "bi.label",
cls: "layout-bg4",
text: "第二行第二列"
}]
]
});
```
{% endmethod %}
| 参数 | 说明 | 类型 | 默认值 |
| ---------------- | ------------- | -------------------- | ----------------- |
| isNeedResize | 是否需要调整大小 | bool | false |
| isResizeAdapt | 是否调整时自适应 | bool | true |
| isNeedMerge | 是否需要合并单元格 | bool | false |
| mergeCols | 合并的单元格列号 | array | [] |
| mergeRule | 合并规则, 默认相等时合并 | function(row1, row2) | 默认row1 = row2 时合并 |
| columnSize | 单元格宽度集合 | array | [] |
| headerRowSize | 表头高度 | number | 37 |
| footerRowSize | 表尾高度 | number | 37 |
| rowSize | 普通单元格高度 | number | 37 |
| regionColumnSize | | bool | false |
| items | 子组件 | array | [] |

2
uidoc/detailed/table/bi.preview_table.md

@ -0,0 +1,2 @@
# bi.preview_table

2
uidoc/detailed/table/bi.responsive_table.md

@ -0,0 +1,2 @@
# bi.responsive_table

42
uidoc/detailed/text_input/bi.clear_editor.md

@ -0,0 +1,42 @@
# bi.clear_editor
## 带清除按钮的输入框
{% method %}
[source](https://jsfiddle.net/fineui/ppgph3qu/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.clear_editor',
cls: "bi-border",
element: '#wrapper',
width: 300,
watermark:"带清除按钮的输入框",
});
```
{% endmethod %}
##API
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :-----| :----|:----|
| hgap | 效果相当于文本框左右padding值 | number | | 4 |
| vgap | 效果相当于文本框上下padding值 | number | | 2 |
| lgap | 效果相当于文本框left-padding值 | number | | 0 |
| rgap | 效果相当于文本框right-padding值 | number | | 0 |
| tgap |效果相当于文本框top-padding值 | number | | 0 |
| bgap | 效果相当于文本框bottom-padding值 | number | | 0 |
| validationChecker | 输入较验函数 |function| | |
| quitChecker | 是否允许退出编辑函数 | function | | |
| mouseOut | | boolean | true,false | false |
| allowBlank | 是否允许空值 | boolean | true,false | false |
| watermark | 文本框placeholder | string | | null |
| value | 文本框默认值 | string | | |
| errorText | 错误提示 | string | | null |
| width | 文本框宽度 | number | | |
| height | 文本框高度 | number | | 30 |
#

60
uidoc/detailed/text_input/bi.search_editor.md

@ -0,0 +1,60 @@
## bi.search_editor
### 搜索框
{% method %}
[source](https://jsfiddle.net/fineui/4a1rLppw/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.search_editor',
element: '#wrapper',
width: 300,
watermark:"搜索",
});
```
{% endmethod %}
## bi.small_search_editor
### 小一号的搜索框
##### height默认为24
{% method %}
[source](https://jsfiddle.net/fineui/wwzza22k/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.search_editor',
element: '#wrapper',
width: 300,
watermark:"搜索",
});
```
{% endmethod %}
##API
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :-----| :----|:----|
| hgap | 效果相当于文本框左右padding值 | number | | 4 |
| vgap | 效果相当于文本框上下padding值 | number | | 2 |
| lgap | 效果相当于文本框left-padding值 | number | | 0 |
| rgap | 效果相当于文本框right-padding值 | number | | 0 |
| tgap |效果相当于文本框top-padding值 | number | | 0 |
| bgap | 效果相当于文本框bottom-padding值 | number | | 0 |
| validationChecker | 输入较验函数 |function| | |
| quitChecker | 是否允许退出编辑函数 | function | | |
| mouseOut | | boolean | true,false | false |
| allowBlank | 是否允许空值 | boolean | true,false | false |
| watermark | 文本框placeholder | string | | null |
| value | 文本框默认值 | string | | |
| errorText | 错误提示 | string | | null |
| width | 文本框宽度 | number | | |
| height | 文本框高度 | number | | 30 |
#

89
uidoc/detailed/text_input/bi.text_editor.md

@ -0,0 +1,89 @@
#bi.text_editor
#####通过鼠标或键盘输入字符
## 基础用法
{% method %}
[source](https://jsfiddle.net/fineui/cna5o200/)
{% common %}
```javascript
BI.createWidget({
type: "bi.text_editor",
element: "#wrapper",
width: 200,
height: 30,
watermark:"请输入内容"
});
```
{% endmethod %}
## 不可为空输入框
{% method %}
[source](https://jsfiddle.net/fineui/d7td9tfr/)
{% common %}
```javascript
BI.createWidget({
type: "bi.text_editor",
element: "#wrapper",
width: 200,
height: 30,
watermark:"这个不予许空",
value: "这是一个不可为空的输入框",
allowBlank: false,
errorText: "不允许为空"
});
```
{% endmethod %}
## 可为空输入框
{% method %}
[source](https://jsfiddle.net/fineui/kjmyg9ps/)
{% common %}
```javascript
BI.createWidget({
type: "bi.text_editor",
element: "#wrapper",
width: 200,
height: 30,
allowBlank: true,
errorText: "不能输入只输入a!",
validationChecker: function (v) {
if (v == "a") {
return false;
}
return true;
},
});
```
{% endmethod %}
##API
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :-----| :----|:----|
| hgap | 效果相当于文本框左右padding值 | number | | 4 |
| vgap | 效果相当于文本框上下padding值 | number | | 2 |
| lgap | 效果相当于文本框left-padding值 | number | | 0 |
| rgap | 效果相当于文本框right-padding值 | number | | 0 |
| tgap |效果相当于文本框top-padding值 | number | | 0 |
| bgap | 效果相当于文本框bottom-padding值 | number | | 0 |
| validationChecker | 输入较验函数 |function| | |
| quitChecker | 是否允许退出编辑函数 | function | | |
| mouseOut | | boolean | true,false | false |
| allowBlank | 是否允许空值 | boolean | true,false | false |
| watermark | 文本框placeholder | string | | null |
| value | 文本框默认值 | string | | |
| errorText | 错误提示 | string | | null |
| width | 文本框宽度 | number | | |
| height | 文本框高度 | number | | 30 |
#

2
uidoc/detailed/tree/bi.multi_tree_combo.md

@ -0,0 +1,2 @@
# bi.multi_tree_combo

2
uidoc/detailed/tree/bi.switch_tree.md

@ -0,0 +1,2 @@
# bi.switch_tree

5
uidoc/gh.js

@ -0,0 +1,5 @@
const gh = require('gh-pages');
gh.publish('_book', () => {
console.info('upload successfully');
});

30
uidoc/package.json

@ -0,0 +1,30 @@
{
"name": "fineuidocs",
"version": "1.0.0",
"description": "FineUI的交互、前端以及视觉文档规范",
"main": "index.js",
"scripts": {
"init": "gitbook init",
"serve": "gitbook serve",
"build": "gitbook build",
"gh": "gitbook build && node gh"
},
"repository": {
"type": "git",
"url": "git+https://gittz@github.com/gittz/FineUIdocs.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/gittz/FineUIdocs/issues"
},
"homepage": "https://github.com/gittz/FineUIdocs#readme",
"devDependencies": {
"gh-pages": "^1.0.0",
"gitbook-cli": "^2.3.2",
"gitbook-plugin-jsfiddle": "^1.0.0",
"gitbook-plugin-splitter": "0.0.8",
"gitbook-plugin-theme-api": "^1.1.2",
"gitbook-plugin-toggle-chapters": "0.0.3"
}
}
Loading…
Cancel
Save