From 0191b6167b79f951ad3d401a2e236b6e447a8443 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 1 Sep 2017 16:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/index.js | 3 ++ uidoc/README.md | 2 ++ uidoc/case/shelter_editor.md | 2 -- uidoc/detailed/bi.button/tooltip.md | 55 +---------------------------- uidoc/detailed/quarter_combo.md | 7 +++- uidoc/detailed/year_combo.md | 5 +++ 6 files changed, 17 insertions(+), 57 deletions(-) delete mode 100644 uidoc/case/shelter_editor.md diff --git a/public/js/index.js b/public/js/index.js index c3bf5adc76..3e1b3da924 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,3 +1,6 @@ +if (!window.BI) { + window.BI = {}; +} BI.servletURL = "https://fanruan.coding.me/fineui/dist/"; BI.resourceURL = "https://fanruan.coding.me/fineui/dist/resource/"; BI.i18n = { diff --git a/uidoc/README.md b/uidoc/README.md index 11a67105a7..693e424843 100644 --- a/uidoc/README.md +++ b/uidoc/README.md @@ -3,3 +3,5 @@ FineUI的交互、前端以及视觉文档规范 ####1. 控件都会提供setValue, getValue, populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件 ####2. 控件都会提供setEnable, setVisible, setValid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setXXX来实现 +####3. 使用populate来清空或者重置布局,不要使用empty, 慎用resize +####4. 谨慎监听和触发BI.Controller.EVENT_CHANGE事件,一般来说,控件都会有一个BI.ClassName.EVENT_CHANGE事件,一些特殊的事件会在对应控件文档中列出 \ No newline at end of file diff --git a/uidoc/case/shelter_editor.md b/uidoc/case/shelter_editor.md deleted file mode 100644 index 1b1e4fef31..0000000000 --- a/uidoc/case/shelter_editor.md +++ /dev/null @@ -1,2 +0,0 @@ -# clipboard - diff --git a/uidoc/detailed/bi.button/tooltip.md b/uidoc/detailed/bi.button/tooltip.md index 7a384e9251..b3b6858f66 100644 --- a/uidoc/detailed/bi.button/tooltip.md +++ b/uidoc/detailed/bi.button/tooltip.md @@ -5,52 +5,9 @@ {% common %} ```javascript - -var bubble = BI.createWidget({ - type: "bi.left", - items: [{ - el: { - type: 'bi.button', - text: 'bubble测试', - height: 30, - handler: function () { - BI.Bubbles.show("singleBubble1", "bubble测试", this); - btns.push("singleBubble1"); - } - } - },{ - el: { - type: 'bi.button', - text: '隐藏所有 bubble', - height: 30, - cls: "layout-bg2", - handler: function () { - BI.each(btns, function (index, value) { - BI.Bubbles.hide(value); - }) - } - } - }], - hgap: 20, - vgap: 20 -}); - -var title = BI.createWidget({ - type: "bi.vertical", - items: [{ - type: "bi.label", - cls: "layout-bg1", - height: 50, - title: "title提示", - text: "移上去有title提示", - textAlign: "center" - }], - hgap: 20, - vgap: 20 -}); - var toast = BI.createWidget({ type: "bi.vertical", + element: "#wrapper", items: [{ el: { type: 'bi.button', @@ -64,16 +21,6 @@ var toast = BI.createWidget({ vgap: 20 }); - -BI.createWidget({ - type: "bi.horizontal_auto", - element: "#wrapper", - vgap: 20, - hgap: 20, - items: [bubble, title, toast] -}); - - ``` {% endmethod %} diff --git a/uidoc/detailed/quarter_combo.md b/uidoc/detailed/quarter_combo.md index d3a0d61f99..263486841c 100644 --- a/uidoc/detailed/quarter_combo.md +++ b/uidoc/detailed/quarter_combo.md @@ -22,4 +22,9 @@ BI.createWidget({ | :------ |:------------- | :-----| :----|:----| | behaviors | 自定义下拉列表中item项的行为,如高亮,标红等(详见[button_group](../core/abstract/button_group.md)) | object | | {} | ---- --- \ No newline at end of file +--- --- + +##事件 +| 事件 | 说明 | +|BI.YearMonthCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 | +|BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 | \ No newline at end of file diff --git a/uidoc/detailed/year_combo.md b/uidoc/detailed/year_combo.md index 551fe34ad2..dcc6f8c593 100644 --- a/uidoc/detailed/year_combo.md +++ b/uidoc/detailed/year_combo.md @@ -26,3 +26,8 @@ BI.createWidget({ --- --- +##事件 +| 事件 | 说明 | +|BI.YearMonthCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 | +|BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 | +