From a51fa956cd08429a1ebe520a8692275560abdeaa Mon Sep 17 00:00:00 2001 From: iapyang Date: Mon, 4 Sep 2017 10:47:15 +0800 Subject: [PATCH] update case --- uidoc/SUMMARY.md | 2 +- uidoc/case/calendar.md | 46 ++++++++++++++++++++++++++++++++++++- uidoc/case/clipboard.md | 32 ++++++++++++++++++++++++++ uidoc/case/color_chooser.md | 40 +++++++++++++------------------- 4 files changed, 94 insertions(+), 26 deletions(-) create mode 100644 uidoc/case/clipboard.md diff --git a/uidoc/SUMMARY.md b/uidoc/SUMMARY.md index 048b259eb..18dc65688 100644 --- a/uidoc/SUMMARY.md +++ b/uidoc/SUMMARY.md @@ -120,7 +120,7 @@ * [all_count_pager](case/pager/all_count_pager.md) * [direction_pager](case/pager/direction_pager.md) * [calendar](case/calendar.md) -* [clipboard](case/shelter_editor.md) +* [clipboard](case/clipboard.md) * [complex_canvas](case/complex_canvas.md) * [color_chooser](case/color_chooser.md) * [segment](case/segment.md) diff --git a/uidoc/case/calendar.md b/uidoc/case/calendar.md index 9b28e9a33..68898c46a 100644 --- a/uidoc/case/calendar.md +++ b/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 | 获得日期 | — | diff --git a/uidoc/case/clipboard.md b/uidoc/case/clipboard.md new file mode 100644 index 000000000..e929c25c6 --- /dev/null +++ b/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 | + diff --git a/uidoc/case/color_chooser.md b/uidoc/case/color_chooser.md index bf4cf5d40..43982aa0b 100644 --- a/uidoc/case/color_chooser.md +++ b/uidoc/case/color_chooser.md @@ -3,37 +3,29 @@ ### 选色控件 {% method %} -[source](https://jsfiddle.net/fineui/7skvd64L/) +[source](https://jsfiddle.net/fineui/z4fwweg9/) {% common %} ```javascript BI.createWidget({ - type: "bi.vertical", + type: "bi.color_chooser", element: "#wrapper", - items: [{ - type: "bi.label", - 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 + width: 30, + height: 30 }); ``` -{% endmethod %} \ No newline at end of file +{% endmethod %} + + + +### 方法 + +| 方法名 | 说明 | 参数 | +| ------------- | ------ | ----- | +| isViewVisible | 判断是否显示 | — | +| setValue | 设置颜色值 | color | +| getValue | 获取颜色值 | — | +