windy 7 years ago
parent
commit
8bef46270c
  1. 2
      uidoc/SUMMARY.md
  2. 46
      uidoc/case/calendar.md
  3. 32
      uidoc/case/clipboard.md
  4. 40
      uidoc/case/color_chooser.md

2
uidoc/SUMMARY.md

@ -120,7 +120,7 @@
* [all_count_pager](case/pager/all_count_pager.md) * [all_count_pager](case/pager/all_count_pager.md)
* [direction_pager](case/pager/direction_pager.md) * [direction_pager](case/pager/direction_pager.md)
* [calendar](case/calendar.md) * [calendar](case/calendar.md)
* [clipboard](case/shelter_editor.md) * [clipboard](case/clipboard.md)
* [complex_canvas](case/complex_canvas.md) * [complex_canvas](case/complex_canvas.md)
* [color_chooser](case/color_chooser.md) * [color_chooser](case/color_chooser.md)
* [segment](case/segment.md) * [segment](case/segment.md)

46
uidoc/case/calendar.md

@ -1,2 +1,46 @@
# calendar # bi.calendar
### 日历控件
{% method %}
[source](https://jsfiddle.net/fineui/4sfsaoma/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.calendar',
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
year: 2015,
month: 7, //7表示八月
day: 25,
});
```
{% endmethod %}
### 参数
| 参数 | 说明 | 类型 | 默认值 |
| ----- | ----- | ------ | ------------ |
| min | 最小日期 | string | '1900-01-01' |
| max | 最大日期 | string | '2099-12-31' |
| year | 设定的年份 | number | 2015 |
| month | 设定的月份 | number | 7 |
| day | 设定的日期 | number | 25 |
### 方法
| 方法名 | 说明 | 参数 |
| ----------- | ------- | -------------------------- |
| isFrontDate | 是否为最小日期 | — |
| isFinalDate | 是否为最大日期 | — |
| setValue | 设置日期 | object: {year, month, day} |
| getVlaue | 获得日期 | — |

32
uidoc/case/clipboard.md

@ -0,0 +1,32 @@
# bi.clipboard
### 剪切板
{% method %}
[source](https://jsfiddle.net/fineui/kLzq99c3/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.clipboard',
width: 100,
height: 100,
copy: function () {},
afterCopy: function () {}
});
```
{% endmethod %}
### 参数
| 参数 | 说明 | 类型 | 默认值 |
| --------- | ---------- | -------- | ---------- |
| copy | 获取需要拷贝的值 | function | BI.emptyFn |
| afterCopy | 完成拷贝后执行的方法 | function | BI.emptyFn |

40
uidoc/case/color_chooser.md

@ -3,37 +3,29 @@
### 选色控件 ### 选色控件
{% method %} {% method %}
[source](https://jsfiddle.net/fineui/7skvd64L/) [source](https://jsfiddle.net/fineui/z4fwweg9/)
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.color_chooser",
element: "#wrapper", element: "#wrapper",
items: [{ width: 30,
type: "bi.label", height: 30
height: 30,
text: "默认风格"
}, {
type: "bi.segment",
items: [{
text: "tab1",
value: 1,
selected: true
}, {
text: "tab2",
value: 2
}, {
text: "tab3 disabled",
disabled: true,
value: 3
}]
}],
hgap: 50,
vgap: 20
}); });
``` ```
{% endmethod %} {% endmethod %}
### 方法
| 方法名 | 说明 | 参数 |
| ------------- | ------ | ----- |
| isViewVisible | 判断是否显示 | — |
| setValue | 设置颜色值 | color |
| getValue | 获取颜色值 | — |

Loading…
Cancel
Save