Browse Source

merge

master
Frank.Qiu 7 years ago
parent
commit
7c581a107d
  1. 9
      bi/base.css
  2. 4
      bi/base.js
  3. 56
      bi/case.js
  4. 9
      bi/sliders.js
  5. 53
      bi/widget.js
  6. 7
      demo/js/config/fix.js
  7. 49
      demo/js/fix-2.0/globalwatcher.js
  8. 1
      demo/version.js
  9. 9
      dist/base.css
  10. 4
      dist/base.js
  11. 9
      dist/bundle.css
  12. 114
      dist/bundle.js
  13. 2
      dist/bundle.min.css
  14. 24
      dist/bundle.min.js
  15. 56
      dist/case.js
  16. 1
      dist/config.js
  17. 55
      dist/demo.js
  18. 7
      dist/fix/fix.compact.js
  19. 68
      dist/fix/fix.js
  20. BIN
      dist/images/1x/icon/slider-active-small.png
  21. BIN
      dist/images/2x/icon/slider-active-small.png
  22. BIN
      dist/images/2x/icon/slider-active.png
  23. BIN
      dist/images/cursor/cursor_drag_hand.cur
  24. BIN
      dist/images/cursor/cursor_hand.cur
  25. BIN
      dist/images/cursor/cursor_left_right.cur
  26. 71
      dist/index.html
  27. 9
      dist/sliders.js
  28. 53
      dist/widget.js
  29. 1
      public/js/index.js
  30. 7
      src/addons/sliders/js/intervalslider/intervalslider.js
  31. 2
      src/addons/sliders/js/singleslider/singleslider.js
  32. 2
      src/base/richeditor/plugins/combo.sizechooser.js
  33. 2
      src/base/single/trigger/trigger.js
  34. 2
      src/case/combo/editoriconcheckcombo/combo.editoriconcheck.js
  35. 2
      src/case/combo/staticcombo/combo.static.js
  36. 2
      src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js
  37. 2
      src/case/editor/editor.clear.js
  38. 2
      src/case/editor/editor.shelter.js
  39. 2
      src/case/editor/editor.sign.initial.js
  40. 2
      src/case/editor/editor.sign.js
  41. 2
      src/case/editor/editor.state.js
  42. 2
      src/case/editor/editor.state.simple.js
  43. 2
      src/case/segment/segment.js
  44. 9
      src/case/trigger/trigger.editor.js
  45. 2
      src/case/trigger/trigger.icon.js
  46. 11
      src/case/trigger/trigger.icon.text.js
  47. 7
      src/case/trigger/trigger.text.js
  48. 7
      src/case/trigger/trigger.text.small.js
  49. 9
      src/css/base/single/input/input.css
  50. 2
      src/less/base/single/input/input.less
  51. 3
      src/widget/date/trigger.date.js
  52. 2
      src/widget/datetime/datetime.combo.js
  53. 3
      src/widget/datetime/datetime.trigger.js
  54. 2
      src/widget/editor/editor.search.js
  55. 2
      src/widget/editor/editor.text.js
  56. 11
      src/widget/month/trigger.month.js
  57. 8
      src/widget/multidate/multidate.combo.js
  58. 7
      src/widget/quarter/trigger.quarter.js
  59. 2
      src/widget/singletree/singletree.combo.js
  60. 2
      src/widget/singletree/singletree.trigger.js
  61. 11
      src/widget/year/trigger.year.js

9
bi/base.css

@ -884,7 +884,8 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=0);
z-index: 2;
}
.bi-input {
.bi-input,
.bi-textarea {
border: none;
outline: none;
background-color: transparent;
@ -893,10 +894,12 @@ li.CodeMirror-hint-active {
width: 100%;
height: 100%;
}
.bi-input.bi-input-focus {
.bi-input.bi-input-focus,
.bi-textarea.bi-input-focus {
border: none;
}
.bi-input.bi-input-error {
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #e85050 !important;
}

4
bi/base.js

@ -17104,7 +17104,7 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 12,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Size")
});
@ -21477,7 +21477,7 @@ BI.Trigger = BI.inherit(BI.Single, {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30
height: 24
})
},

56
bi/case.js

@ -5137,7 +5137,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-check-editor-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
@ -5457,7 +5457,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-static-combo",
height: 30,
height: 24,
text: "",
el: {},
items: [],
@ -5523,7 +5523,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-check-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: ""
})
@ -6036,7 +6036,7 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-clear-editor",
height: 30,
height: 24,
errorText: "",
watermark: "",
validationChecker: BI.emptyFn,
@ -6215,7 +6215,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30,
height: 24,
textAlign: "left"
})
},
@ -6472,7 +6472,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
errorText: "",
value: "",
text: "",
height: 30
height: 24
})
},
@ -6739,7 +6739,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -6997,7 +6997,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -7271,7 +7271,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -9403,7 +9403,7 @@ BI.Segment = BI.inherit(BI.Widget, {
return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-segment",
items: [],
height: 30
height: 24
});
},
_init: function () {
@ -12263,13 +12263,12 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border",
height: 30,
height: 24,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
allowBlank: false,
watermark: "",
errorText: "",
triggerWidth: 30
errorText: ""
});
},
@ -12304,9 +12303,9 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
},
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12338,7 +12337,7 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-icon-trigger",
el: {},
height: 30
height: 24
});
},
_init: function () {
@ -12361,15 +12360,14 @@ BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
hgap: 4
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
height: 24
});
},
@ -12386,7 +12384,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12401,13 +12399,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
},
disableSelected: true
},
width: 24
width: o.triggerWidth || o.height
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12443,8 +12441,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30,
triggerWidth: 30
height: 24
});
},
@ -12462,7 +12459,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12473,7 +12470,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12609,8 +12606,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20,
triggerWidth: 20
height: 20
});
},
@ -12626,7 +12622,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12637,7 +12633,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});

9
bi/sliders.js

@ -6,7 +6,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
EDITOR_WIDTH: 58,
EDITOR_R_GAP: 60,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -51,7 +50,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -78,7 +76,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -122,6 +119,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderOnePosition(significantPercent);
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
ui.helper.removeClass("dragging");
},
start: function (e, ui) {
ui.helper.removeClass("dragging").addClass("dragging");
}
});
@ -1183,7 +1184,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
_constant: {
EDITOR_WIDTH: 90,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -1276,7 +1276,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
cls: "slider-editor-button",
errorText: "",
height: c.HEIGHT,
width: c.EDITOR_WIDTH - 2,
allowBlank: false,
validationChecker: function (v) {

53
bi/widget.js

@ -2293,7 +2293,6 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
yearLength: 4,
yearMonthLength: 7
},
@ -2303,7 +2302,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -2807,7 +2806,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font bi-border-right",
width: 30,
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
@ -3145,7 +3144,6 @@ BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
@ -3173,7 +3171,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
element: this,
items: [{
el: BI.createWidget(),
width: c.triggerWidth
width: o.height
}, {
el: this.text
}]
@ -4009,7 +4007,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-search-editor bi-border",
height: 30,
height: 24,
errorText: "",
watermark: BI.i18nText("BI-Basic_Search"),
validationChecker: BI.emptyFn,
@ -4228,7 +4226,7 @@ BI.TextEditor = BI.inherit(BI.Widget, {
allowBlank: false,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -5783,14 +5781,13 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
},
_defaultConfig: function () {
return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-month-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -5846,15 +5843,15 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Month"),
baseCls: "bi-trigger-month-text",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -6166,8 +6163,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
width: 30,
height: 23
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
if (self.combo.isViewVisible()) {
@ -6179,8 +6176,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
this.changeIcon = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: 30,
height: 23
width: 24,
height: 24
});
@ -13925,7 +13922,6 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
textWidth: 40,
errorText: BI.i18nText("BI-Quarter_Trigger_Error_Text")
},
@ -13933,7 +13929,7 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-quarter-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -13996,9 +13992,9 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -16069,7 +16065,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-combo",
trigger: {},
height: 30,
height: 24,
text: "",
items: []
});
@ -16204,7 +16200,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-trigger",
height: 30,
height: 24,
text: "",
items: []
});
@ -16769,7 +16765,6 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
},
@ -16779,7 +16774,7 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-trigger bi-border",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -16836,15 +16831,15 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
baseCls: "bi-trigger-year-text",
text: BI.i18nText("BI-Multi_Date_Year"),
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});

7
demo/js/config/fix.js

@ -101,11 +101,16 @@ Demo.FIX_CONFIG = [{
}, {
id: 74,
pId: 7,
text: "watcher表达式",
text: "watcher且或表达式",
value: "demo.fix4"
}, {
id: 75,
pId: 7,
text: "watcher星号表达式",
value: "demo.fix5"
}, {
id: 76,
pId: 7,
text: "一个混合的例子",
value: "demo.fix"
}];

49
demo/js/fix-2.0/globalwatcher.js

@ -0,0 +1,49 @@
;(function () {
var model = Fix.define({
name: "原始属性",
arr: [{
n: 'a'
}, {
n: 0
}]
});
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return model;
},
watch: {
"arr.**": function () {
debugger
},
"arr.1.*": function () {
this.button.setText(this.model.name + "-" + this.model.arr[1].n)
}
},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.arr[0].n += 1;
self.model.arr[1].n += 1;
},
text: this.model.name + "-" + this.model.arr[1].n
}
}]
}
},
mounted: function () {
}
});
BI.shortcut("demo.fix5", Demo.Fix);
}());

1
demo/version.js

@ -122,6 +122,7 @@ BI.i18n = {
"BI-Time_Interval_Error_Text": "请保证前面时间小于/等于后面的时间",
"BI-Basic_Time": "时间",
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Simple_Thursday": "四",
"BI-Multi_Date_Year_Prev": "年前",
"BI-Tiao_Data": "条数据",

9
dist/base.css vendored

@ -884,7 +884,8 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=0);
z-index: 2;
}
.bi-input {
.bi-input,
.bi-textarea {
border: none;
outline: none;
background-color: transparent;
@ -893,10 +894,12 @@ li.CodeMirror-hint-active {
width: 100%;
height: 100%;
}
.bi-input.bi-input-focus {
.bi-input.bi-input-focus,
.bi-textarea.bi-input-focus {
border: none;
}
.bi-input.bi-input-error {
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #e85050 !important;
}

4
dist/base.js vendored

@ -17104,7 +17104,7 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 12,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Size")
});
@ -21477,7 +21477,7 @@ BI.Trigger = BI.inherit(BI.Single, {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30
height: 24
})
},

9
dist/bundle.css vendored

@ -2463,7 +2463,8 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=0);
z-index: 2;
}
.bi-input {
.bi-input,
.bi-textarea {
border: none;
outline: none;
background-color: transparent;
@ -2472,10 +2473,12 @@ li.CodeMirror-hint-active {
width: 100%;
height: 100%;
}
.bi-input.bi-input-focus {
.bi-input.bi-input-focus,
.bi-textarea.bi-input-focus {
border: none;
}
.bi-input.bi-input-error {
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #e85050 !important;
}

114
dist/bundle.js vendored

@ -42845,7 +42845,7 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 12,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Size")
});
@ -47218,7 +47218,7 @@ BI.Trigger = BI.inherit(BI.Single, {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30
height: 24
})
},
@ -67502,7 +67502,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-check-editor-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
@ -67822,7 +67822,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-static-combo",
height: 30,
height: 24,
text: "",
el: {},
items: [],
@ -67888,7 +67888,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-check-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: ""
})
@ -68401,7 +68401,7 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-clear-editor",
height: 30,
height: 24,
errorText: "",
watermark: "",
validationChecker: BI.emptyFn,
@ -68580,7 +68580,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30,
height: 24,
textAlign: "left"
})
},
@ -68837,7 +68837,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
errorText: "",
value: "",
text: "",
height: 30
height: 24
})
},
@ -69104,7 +69104,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -69362,7 +69362,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -69636,7 +69636,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -71768,7 +71768,7 @@ BI.Segment = BI.inherit(BI.Widget, {
return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-segment",
items: [],
height: 30
height: 24
});
},
_init: function () {
@ -74628,13 +74628,12 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border",
height: 30,
height: 24,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
allowBlank: false,
watermark: "",
errorText: "",
triggerWidth: 30
errorText: ""
});
},
@ -74669,9 +74668,9 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
},
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -74703,7 +74702,7 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-icon-trigger",
el: {},
height: 30
height: 24
});
},
_init: function () {
@ -74726,15 +74725,14 @@ BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
hgap: 4
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
height: 24
});
},
@ -74751,7 +74749,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -74766,13 +74764,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
},
disableSelected: true
},
width: 24
width: o.triggerWidth || o.height
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -74808,8 +74806,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30,
triggerWidth: 30
height: 24
});
},
@ -74827,7 +74824,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -74838,7 +74835,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -74974,8 +74971,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20,
triggerWidth: 20
height: 20
});
},
@ -74991,7 +74987,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -75002,7 +74998,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -77311,7 +77307,6 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
yearLength: 4,
yearMonthLength: 7
},
@ -77321,7 +77316,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -77825,7 +77820,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font bi-border-right",
width: 30,
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
@ -78163,7 +78158,6 @@ BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
@ -78191,7 +78185,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
element: this,
items: [{
el: BI.createWidget(),
width: c.triggerWidth
width: o.height
}, {
el: this.text
}]
@ -79027,7 +79021,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-search-editor bi-border",
height: 30,
height: 24,
errorText: "",
watermark: BI.i18nText("BI-Basic_Search"),
validationChecker: BI.emptyFn,
@ -79246,7 +79240,7 @@ BI.TextEditor = BI.inherit(BI.Widget, {
allowBlank: false,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -80801,14 +80795,13 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
},
_defaultConfig: function () {
return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-month-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -80864,15 +80857,15 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Month"),
baseCls: "bi-trigger-month-text",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -81184,8 +81177,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
width: 30,
height: 23
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
if (self.combo.isViewVisible()) {
@ -81197,8 +81190,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
this.changeIcon = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: 30,
height: 23
width: 24,
height: 24
});
@ -88943,7 +88936,6 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
textWidth: 40,
errorText: BI.i18nText("BI-Quarter_Trigger_Error_Text")
},
@ -88951,7 +88943,7 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-quarter-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -89014,9 +89006,9 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -91087,7 +91079,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-combo",
trigger: {},
height: 30,
height: 24,
text: "",
items: []
});
@ -91222,7 +91214,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-trigger",
height: 30,
height: 24,
text: "",
items: []
});
@ -91787,7 +91779,6 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
},
@ -91797,7 +91788,7 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-trigger bi-border",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -91854,15 +91845,15 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
baseCls: "bi-trigger-year-text",
text: BI.i18nText("BI-Multi_Date_Year"),
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -93293,6 +93284,7 @@ BI.i18n = {
"BI-Time_Interval_Error_Text": "请保证前面时间小于/等于后面的时间",
"BI-Basic_Time": "时间",
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Simple_Thursday": "四",
"BI-Multi_Date_Year_Prev": "年前",
"BI-Tiao_Data": "条数据",

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

56
dist/case.js vendored

@ -5137,7 +5137,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-check-editor-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
@ -5457,7 +5457,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-static-combo",
height: 30,
height: 24,
text: "",
el: {},
items: [],
@ -5523,7 +5523,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-check-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: ""
})
@ -6036,7 +6036,7 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-clear-editor",
height: 30,
height: 24,
errorText: "",
watermark: "",
validationChecker: BI.emptyFn,
@ -6215,7 +6215,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30,
height: 24,
textAlign: "left"
})
},
@ -6472,7 +6472,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
errorText: "",
value: "",
text: "",
height: 30
height: 24
})
},
@ -6739,7 +6739,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -6997,7 +6997,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -7271,7 +7271,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -9403,7 +9403,7 @@ BI.Segment = BI.inherit(BI.Widget, {
return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-segment",
items: [],
height: 30
height: 24
});
},
_init: function () {
@ -12263,13 +12263,12 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border",
height: 30,
height: 24,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
allowBlank: false,
watermark: "",
errorText: "",
triggerWidth: 30
errorText: ""
});
},
@ -12304,9 +12303,9 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
},
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12338,7 +12337,7 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-icon-trigger",
el: {},
height: 30
height: 24
});
},
_init: function () {
@ -12361,15 +12360,14 @@ BI.shortcut('bi.icon_trigger', BI.IconTrigger);/**
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
hgap: 4
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
height: 24
});
},
@ -12386,7 +12384,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12401,13 +12399,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
},
disableSelected: true
},
width: 24
width: o.triggerWidth || o.height
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12443,8 +12441,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30,
triggerWidth: 30
height: 24
});
},
@ -12462,7 +12459,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12473,7 +12470,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});
@ -12609,8 +12606,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20,
triggerWidth: 20
height: 20
});
},
@ -12626,7 +12622,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -12637,7 +12633,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});

1
dist/config.js vendored

@ -122,6 +122,7 @@ BI.i18n = {
"BI-Time_Interval_Error_Text": "请保证前面时间小于/等于后面的时间",
"BI-Basic_Time": "时间",
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Simple_Thursday": "四",
"BI-Multi_Date_Year_Prev": "年前",
"BI-Tiao_Data": "条数据",

55
dist/demo.js vendored

@ -5396,11 +5396,16 @@ Demo.FIX_CONFIG = [{
}, {
id: 74,
pId: 7,
text: "watcher表达式",
text: "watcher且或表达式",
value: "demo.fix4"
}, {
id: 75,
pId: 7,
text: "watcher星号表达式",
value: "demo.fix5"
}, {
id: 76,
pId: 7,
text: "一个混合的例子",
value: "demo.fix"
}];Demo.WIDGET_CONFIG = [{
@ -10260,6 +10265,54 @@ BI.shortcut("demo.tmp", Demo.Func);
});
BI.shortcut("demo.fix", Demo.Fix);
}());;(function () {
var model = Fix.define({
name: "原始属性",
arr: [{
n: 'a'
}, {
n: 0
}]
});
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return model;
},
watch: {
"arr.**": function () {
debugger
},
"arr.1.*": function () {
this.button.setText(this.model.name + "-" + this.model.arr[1].n)
}
},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.arr[0].n += 1;
self.model.arr[1].n += 1;
},
text: this.model.name + "-" + this.model.arr[1].n
}
}]
}
},
mounted: function () {
}
});
BI.shortcut("demo.fix5", Demo.Fix);
}());;(function(){
var model = Fix.define({
name: "原始属性",

7
dist/fix/fix.compact.js vendored

@ -42,8 +42,11 @@
BI.Widget.prototype._unMount = function () {
unMount.apply(this, arguments);
this.store && this.store.destroy();
BI.each(this._watchers, function (i, unwatch) {
unwatch();
BI.each(this._watchers, function (i, unwatches) {
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];
BI.each(unwatches, function (j, unwatch) {
unwatch();
})
});
this._watchers && (this._watchers = []);
this.store && (this.store = null);

68
dist/fix/fix.js vendored

@ -395,12 +395,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
Observer.prototype.walk = function walk(obj) {
return defineReactive(obj);
return defineReactive(obj, this);
};
Observer.prototype.observeArray = function observeArray(items) {
for (var i = 0, l = items.length; i < l; i++) {
items[i] = observe(items[i]).model;
items[i] = observe(items[i], this).model;
}
return items;
};
@ -422,32 +422,30 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
}
function observe(value, asRootData) {
function observe(value, parentObserver) {
if (!_.isObject(value)) {
return;
}
var ob = void 0;
if (_.has(value, '__ob__') && value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (observerState.shouldConvert && (_.isArray(value) || isPlainObject(value)) && !value._isVue) {
} else if (observerState.shouldConvert && (_.isArray(value) || isPlainObject(value))) {
ob = new Observer(value);
}
if (asRootData && ob) {
ob.vmCount++;
}
ob.parent = parentObserver || ob.parent;
return ob;
}
function defineReactive(obj, observer, shallow) {
var props = {};
var model = void 0;
_.each(obj, function (val, key) {
if (key in $$skipArray) {
return;
}
var dep = observer && observer['__dep' + key] || new Dep();
observer && (observer['__dep' + key] = dep);
var childOb = !shallow && observe(val);
var childOb = !shallow && observe(val, observer);
props[key] = {
enumerable: true,
configurable: true,
@ -470,13 +468,25 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return;
}
val = newVal;
childOb = !shallow && observe(newVal);
childOb = !shallow && observe(newVal, observer);
obj[key] = childOb ? childOb.model : newVal;
dep.notify();
//触发a.*绑定的hooks
_.each(model.__ob__._deps, function (dep) {
dep.notify();
});
//触发a.**绑定的hooks
var parent = model.__ob__;
while (parent) {
_.each(parent._globalDeps, function (dep) {
dep.notify();
});
parent = parent.parent;
}
}
};
});
return createViewModel$1(obj, props);
return model = createViewModel$1(obj, props);
}
/**
@ -495,9 +505,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return val;
}
var ob = target.__ob__;
if (target._isVue || ob && ob.vmCount) {
return val;
}
if (!ob) {
target[key] = val;
return val;
@ -517,9 +524,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return;
}
var ob = target.__ob__;
if (target._isVue || ob && ob.vmCount) {
return;
}
if (!_.has(target, key)) {
return;
}
@ -951,7 +955,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
options = options || {};
options.user = true;
var exps = void 0;
if (_.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1) {
if (_.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\*/.test(expOrFn)) {
var watcher = new Watcher(vm.model, expOrFn, _.bind(cb, vm), options);
if (options.immediate) {
cb.call(vm, watcher.value);
@ -968,6 +972,34 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (_.has(operators, exp)) {
return;
}
if (/\*\*$|\*$/.test(exp)) {
var isGlobal = /\*\*$/.test(exp);
if (isGlobal) {
//a.**的形式
exp = exp.replace(".**", "");
} else {
//a.*的形式
exp = exp.replace(".*", "");
}
var getter = parsePath(exp);
var v = getter.call(vm.model, vm.model);
var dep = new Dep();
if (isGlobal) {
(v.__ob__._globalDeps || (v.__ob__._globalDeps = [])).push(dep);
} else {
(v.__ob__._deps || (v.__ob__._deps = [])).push(dep);
}
var w = new Watcher(vm.model, function () {
dep.depend();
return NaN;
}, _.bind(cb, vm));
watchers.push(function unwatchFn() {
w.teardown();
v.__ob__._globalDeps && remove(v.__ob__._globalDeps, dep);
v.__ob__._deps && remove(v.__ob__._deps, dep);
});
return;
}
var watcher = new Watcher(vm.model, exp, function () {
if (complete === true) {
return;

BIN
dist/images/1x/icon/slider-active-small.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 289 B

BIN
dist/images/2x/icon/slider-active-small.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 289 B

BIN
dist/images/2x/icon/slider-active.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 497 B

BIN
dist/images/cursor/cursor_drag_hand.cur vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/images/cursor/cursor_hand.cur vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dist/images/cursor/cursor_left_right.cur vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

71
dist/index.html vendored

@ -2,37 +2,56 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="core.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="widget.css" />
<link rel="stylesheet" type="text/css" href="resource.css" />
<link rel="stylesheet" type="text/css" href="demo.css" />
<link rel="stylesheet" type="text/css" href="sliders.css" />
<meta charset="utf-8">
<title></title>
<!--核心css文件-->
<link rel="stylesheet" type="text/css" href="core.css"/>
<!--基础css文件, 包含一些最基本控件的样式-->
<link rel="stylesheet" type="text/css" href="base.css"/>
<!--BI控件样式-->
<link rel="stylesheet" type="text/css" href="widget.css"/>
<!--资源样式, 包括font、icon、background、app-->
<link rel="stylesheet" type="text/css" href="resource.css"/>
<!--单值滑块、双值滑块控件样式-->
<link rel="stylesheet" type="text/css" href="sliders.css"/>
<!--当前demo定义的样式-->
<link rel="stylesheet" type="text/css" href="demo.css"/>
<script src="polyfill.js"></script>
<script src="core.js"></script>
<script src="fix/fix-1.0.js"></script>
<script src="fix/fix.js"></script>
<script src="fix/fix.compact.js"></script>
<script src="jqueryui.js"></script>
<script src="base.js"></script>
<script src="case.js"></script>
<script src="widget.js"></script>
<script src="sliders.js"></script>
<script src="config.js"></script>
<!--图表-->
<!--<script src="vancharts-all.js"></script>-->
<!--<script src="biconst.js"></script>-->
<!--图表用到的常量(直接拿的bi的常量)-->
<!--<script src="chart.js"></script>-->
<!--IE9及以下兼容-->
<script src="polyfill.js"></script>
<!--核心js-->
<script src="core.js"></script>
<!--fix1.0版本框架, 只用ui的话不用引入, 引入的顺序需在core.js之后, 可以和2.0版本同步使用或使用任一个均可-->
<script src="fix/fix-1.0.js"></script>
<!--fix2.0版本框架, 只用ui的话不用引入, 引入的顺序需在core.js之后-->
<script src="fix/fix.js"></script>
<!--fix2.0版本框架, 只用ui的话不用引入, 引入的顺序需在core.js之后-->
<script src="fix/fix.compact.js"></script>
<script src="demo.js"></script>
<!--基础js, 包括最基本的控件-->
<script src="base.js"></script>
<!--基础js, 存放一些通用组件,如选色组件、富文本组件等-->
<script src="case.js"></script>
<!--BI控件js-->
<script src="widget.js"></script>
<!--jqueryui包括jquery的draggable、droppable、resizable-->
<script src="jqueryui.js"></script>
<!--单值滑块、双值滑块js, 因为用了jqueryui,所以提出来了-->
<script src="sliders.js"></script>
<!--工程配置文件,主要是BI.servletURL(根目录)、BI.resourceURL(资源路径)、BI.i18n(国际化)-->
<script src="config.js"></script>
<!--图表-->
<!--<script src="vancharts-all.js"></script>-->
<!--<script src="biconst.js"></script>-->
<!--图表用到的常量(直接拿的bi的常量)-->
<!--<script src="chart.js"></script>-->
<script src="demo.js"></script>
</head>
<body>
<div id="wrapper"></div>
<div id="wrapper"></div>
</body>
</html>

9
dist/sliders.js vendored

@ -6,7 +6,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
EDITOR_WIDTH: 58,
EDITOR_R_GAP: 60,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -51,7 +50,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -78,7 +76,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -122,6 +119,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderOnePosition(significantPercent);
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
ui.helper.removeClass("dragging");
},
start: function (e, ui) {
ui.helper.removeClass("dragging").addClass("dragging");
}
});
@ -1183,7 +1184,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
_constant: {
EDITOR_WIDTH: 90,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -1276,7 +1276,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
cls: "slider-editor-button",
errorText: "",
height: c.HEIGHT,
width: c.EDITOR_WIDTH - 2,
allowBlank: false,
validationChecker: function (v) {

53
dist/widget.js vendored

@ -2293,7 +2293,6 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
yearLength: 4,
yearMonthLength: 7
},
@ -2303,7 +2302,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -2807,7 +2806,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font bi-border-right",
width: 30,
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
@ -3145,7 +3144,6 @@ BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
@ -3173,7 +3171,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
element: this,
items: [{
el: BI.createWidget(),
width: c.triggerWidth
width: o.height
}, {
el: this.text
}]
@ -4009,7 +4007,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-search-editor bi-border",
height: 30,
height: 24,
errorText: "",
watermark: BI.i18nText("BI-Basic_Search"),
validationChecker: BI.emptyFn,
@ -4228,7 +4226,7 @@ BI.TextEditor = BI.inherit(BI.Widget, {
allowBlank: false,
watermark: "",
errorText: "",
height: 30
height: 24
})
},
@ -5783,14 +5781,13 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
},
_defaultConfig: function () {
return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-month-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -5846,15 +5843,15 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Month"),
baseCls: "bi-trigger-month-text",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -6166,8 +6163,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
width: 30,
height: 23
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
if (self.combo.isViewVisible()) {
@ -6179,8 +6176,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
this.changeIcon = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: 30,
height: 23
width: 24,
height: 24
});
@ -13925,7 +13922,6 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
textWidth: 40,
errorText: BI.i18nText("BI-Quarter_Trigger_Error_Text")
},
@ -13933,7 +13929,7 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-quarter-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -13996,9 +13992,9 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});
@ -16069,7 +16065,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-combo",
trigger: {},
height: 30,
height: 24,
text: "",
items: []
});
@ -16204,7 +16200,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-trigger",
height: 30,
height: 24,
text: "",
items: []
});
@ -16769,7 +16765,6 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
},
@ -16779,7 +16774,7 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-trigger bi-border",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -16836,15 +16831,15 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
baseCls: "bi-trigger-year-text",
text: BI.i18nText("BI-Multi_Date_Year"),
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});

1
public/js/index.js

@ -115,6 +115,7 @@ BI.i18n = {
"BI-Time_Interval_Error_Text": "请保证前面时间小于/等于后面的时间",
"BI-Basic_Time": "时间",
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Simple_Thursday": "四",
"BI-Multi_Date_Year_Prev": "年前",
"BI-Tiao_Data": "条数据",

7
src/addons/sliders/js/intervalslider/intervalslider.js

@ -6,7 +6,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
EDITOR_WIDTH: 58,
EDITOR_R_GAP: 60,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -51,7 +50,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -78,7 +76,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button",
errorText: "",
allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH,
validationChecker: function (v) {
return self._checkValidation(v);
@ -122,6 +119,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderOnePosition(significantPercent);
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
ui.helper.removeClass("dragging");
},
start: function (e, ui) {
ui.helper.removeClass("dragging").addClass("dragging");
}
});

2
src/addons/sliders/js/singleslider/singleslider.js

@ -5,7 +5,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
_constant: {
EDITOR_WIDTH: 90,
EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30,
@ -98,7 +97,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
cls: "slider-editor-button",
errorText: "",
height: c.HEIGHT,
width: c.EDITOR_WIDTH - 2,
allowBlank: false,
validationChecker: function (v) {

2
src/base/richeditor/plugins/combo.sizechooser.js

@ -42,7 +42,7 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 12,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Size")
});

2
src/base/single/trigger/trigger.js

@ -9,7 +9,7 @@ BI.Trigger = BI.inherit(BI.Single, {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30
height: 24
})
},

2
src/case/combo/editoriconcheckcombo/combo.editoriconcheck.js

@ -6,7 +6,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-check-editor-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,

2
src/case/combo/staticcombo/combo.static.js

@ -8,7 +8,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-static-combo",
height: 30,
height: 24,
text: "",
el: {},
items: [],

2
src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js

@ -8,7 +8,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-check-combo",
width: 100,
height: 30,
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: ""
})

2
src/case/editor/editor.clear.js

@ -9,7 +9,7 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-clear-editor",
height: 30,
height: 24,
errorText: "",
watermark: "",
validationChecker: BI.emptyFn,

2
src/case/editor/editor.shelter.js

@ -20,7 +20,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30,
height: 24,
textAlign: "left"
})
},

2
src/case/editor/editor.sign.initial.js

@ -19,7 +19,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
errorText: "",
value: "",
text: "",
height: 30
height: 24
})
},

2
src/case/editor/editor.sign.js

@ -20,7 +20,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},

2
src/case/editor/editor.state.js

@ -20,7 +20,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},

2
src/case/editor/editor.state.simple.js

@ -21,7 +21,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 30
height: 24
})
},

2
src/case/segment/segment.js

@ -10,7 +10,7 @@ BI.Segment = BI.inherit(BI.Widget, {
return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-segment",
items: [],
height: 30
height: 24
});
},
_init: function () {

9
src/case/trigger/trigger.editor.js

@ -14,13 +14,12 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border",
height: 30,
height: 24,
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn,
allowBlank: false,
watermark: "",
errorText: "",
triggerWidth: 30
errorText: ""
});
},
@ -55,9 +54,9 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
},
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});

2
src/case/trigger/trigger.icon.js

@ -11,7 +11,7 @@ BI.IconTrigger = BI.inherit(BI.Trigger, {
return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-icon-trigger",
el: {},
height: 30
height: 24
});
},
_init: function () {

11
src/case/trigger/trigger.icon.text.js

@ -7,15 +7,14 @@
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
hgap: 4
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30
height: 24
});
},
@ -32,7 +31,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -47,13 +46,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
},
disableSelected: true
},
width: 24
width: o.triggerWidth || o.height
},
{
el: this.text
}, {
el: this.trigerButton,
width: c.triggerWidth
width: o.triggerWidth || o.height
}
]
});

7
src/case/trigger/trigger.text.js

@ -14,8 +14,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 30,
triggerWidth: 30
height: 24
});
},
@ -33,7 +32,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -44,7 +43,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});

7
src/case/trigger/trigger.text.small.js

@ -13,8 +13,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20,
triggerWidth: 20
height: 20
});
},
@ -30,7 +29,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
width: o.triggerWidth
width: o.triggerWidth || o.height
});
BI.createWidget({
@ -41,7 +40,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
el: this.text
}, {
el: this.trigerButton,
width: o.triggerWidth
width: o.triggerWidth || o.height
}
]
});

9
src/css/base/single/input/input.css

@ -1,4 +1,5 @@
.bi-input {
.bi-input,
.bi-textarea {
border: none;
outline: none;
background-color: transparent;
@ -7,10 +8,12 @@
width: 100%;
height: 100%;
}
.bi-input.bi-input-focus {
.bi-input.bi-input-focus,
.bi-textarea.bi-input-focus {
border: none;
}
.bi-input.bi-input-error {
.bi-input.bi-input-error,
.bi-textarea.bi-input-error {
border: none;
color: #e85050 !important;
}

2
src/less/base/single/input/input.less

@ -1,6 +1,6 @@
@import "../../../bibase";
.bi-input{
.bi-input, .bi-textarea{
border: none;
outline: none;
background-color: transparent;

3
src/widget/date/trigger.date.js

@ -2,7 +2,6 @@ BI.DateTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
yearLength: 4,
yearMonthLength: 7
},
@ -12,7 +11,7 @@ BI.DateTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {

2
src/widget/datetime/datetime.combo.js

@ -79,7 +79,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font bi-border-right",
width: 30,
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {

3
src/widget/datetime/datetime.trigger.js

@ -4,7 +4,6 @@
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
triggerWidth: 30
},
_defaultConfig: function () {
@ -32,7 +31,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
element: this,
items: [{
el: BI.createWidget(),
width: c.triggerWidth
width: o.height
}, {
el: this.text
}]

2
src/widget/editor/editor.search.js

@ -6,7 +6,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-search-editor bi-border",
height: 30,
height: 24,
errorText: "",
watermark: BI.i18nText("BI-Basic_Search"),
validationChecker: BI.emptyFn,

2
src/widget/editor/editor.text.js

@ -19,7 +19,7 @@ BI.TextEditor = BI.inherit(BI.Widget, {
allowBlank: false,
watermark: "",
errorText: "",
height: 30
height: 24
})
},

11
src/widget/month/trigger.month.js

@ -9,14 +9,13 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
},
_defaultConfig: function () {
return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-month-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -72,15 +71,15 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Month"),
baseCls: "bi-trigger-month-text",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});

8
src/widget/multidate/multidate.combo.js

@ -131,8 +131,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
width: 30,
height: 23
width: 24,
height: 24
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
if (self.combo.isViewVisible()) {
@ -144,8 +144,8 @@ BI.MultiDateCombo = BI.inherit(BI.Single, {
this.changeIcon = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: 30,
height: 23
width: 24,
height: 24
});

7
src/widget/quarter/trigger.quarter.js

@ -9,7 +9,6 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 30,
textWidth: 40,
errorText: BI.i18nText("BI-Quarter_Trigger_Error_Text")
},
@ -17,7 +16,7 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-quarter-trigger bi-border",
height: 25
height: 24
});
},
_init: function () {
@ -80,9 +79,9 @@ BI.QuarterTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});

2
src/widget/singletree/singletree.combo.js

@ -8,7 +8,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-combo",
trigger: {},
height: 30,
height: 24,
text: "",
items: []
});

2
src/widget/singletree/singletree.trigger.js

@ -8,7 +8,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-tree-trigger",
height: 30,
height: 24,
text: "",
items: []
});

11
src/widget/year/trigger.year.js

@ -9,7 +9,6 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
triggerWidth: 25,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
},
@ -19,7 +18,7 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-trigger bi-border",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
height: 24
});
},
_init: function () {
@ -76,15 +75,15 @@ BI.YearTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
baseCls: "bi-trigger-year-text",
text: BI.i18nText("BI-Multi_Date_Year"),
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
width: c.triggerWidth
width: o.height
},
width: c.triggerWidth
width: o.height
}
]
});

Loading…
Cancel
Save