guy 7 years ago
parent
commit
61d380d6bb
  1. 0
      demo/js/case/editor/demo.shelter_editor.js
  2. 0
      demo/js/case/editor/demo.sign_editor.js
  3. 13
      demo/js/case/editor/demo.sign_initial_editor.js
  4. 1
      demo/js/case/editor/demo.state_editor.js
  5. 8
      demo/js/config/case.js
  6. 43
      demo/js/config/widget.js
  7. 22
      demo/js/widget/editor/demo.record_editor.js
  8. 22
      demo/js/widget/editor/demo.sign_style_editor.js
  9. BIN
      docs/background/auto-color.png
  10. BIN
      docs/background/trans-color.png
  11. 321
      docs/demo.js
  12. 46
      docs/resource.css
  13. 46
      src/css/resource/font.css
  14. 4
      src/less/resource/font.less

0
demo/js/widget/editor/demo.shelter_editor.js → demo/js/case/editor/demo.shelter_editor.js

0
demo/js/widget/editor/demo.sign_editor.js → demo/js/case/editor/demo.sign_editor.js

13
demo/js/widget/editor/demo.sign_initial_editor.js → demo/js/case/editor/demo.sign_initial_editor.js

@ -5,14 +5,23 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "" baseCls: ""
}, },
mounted: function () {
this.editor.setValue({
value: "123",
text: "sdga"
})
},
render: function () { render: function () {
var self = this;
return { return {
type: "bi.horizontal_adapt", type: "bi.horizontal_adapt",
items: [{ items: [{
type: "bi.sign_initial_editor", type: "bi.sign_initial_editor",
ref: function () {
self.editor = this;
},
cls: "layout-bg5", cls: "layout-bg5",
value:"123", text: "原始值",
text:"456",
width: 300 width: 300
}], }],
vgap: 20 vgap: 20

1
demo/js/widget/editor/demo.state_editor.js → demo/js/case/editor/demo.state_editor.js

@ -10,7 +10,6 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
type: "bi.horizontal_adapt", type: "bi.horizontal_adapt",
items: [{ items: [{
type: "bi.state_editor", type: "bi.state_editor",
cls:"bi-border",
value: "123", value: "123",
text: "456", text: "456",
width: 300 width: 300

8
demo/js/config/case.js

@ -6,10 +6,6 @@ Demo.CASE_CONFIG = [{
pId: 3, pId: 3,
id: 301, id: 301,
text: "editors" text: "editors"
}, {
pId: 301,
text: "bi.record_editor",
value: "demo.record_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.shelter_editor", text: "bi.shelter_editor",
@ -18,6 +14,10 @@ Demo.CASE_CONFIG = [{
pId: 301, pId: 301,
text: "bi.sign_editor", text: "bi.sign_editor",
value: "demo.sign_editor" value: "demo.sign_editor"
}, {
pId: 301,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.state_editor", text: "bi.state_editor",

43
demo/js/config/widget.js

@ -107,36 +107,11 @@ Demo.WIDGET_CONFIG = [{
pId: 406, pId: 406,
text: "bi.search_editor", text: "bi.search_editor",
value: "demo.search_editor" value: "demo.search_editor"
}, {
pId: 406,
text: "bi.sign_editor",
value: "demo.sign_editor"
}, {
pId: 406,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, {
pId: 406,
text: "bi.sign_style_editor",
value: "demo.sign_style_editor"
}, {
pId: 406,
text: "bi.state_editor",
value: "demo.state_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.clear_editor", text: "bi.clear_editor",
value: "demo.clear_editor" value: "demo.clear_editor"
}, { }, {
pId: 406,
text: "bi.record_editor",
value: "demo.record_editor"
}, {
pId: 406,
text: "bi.shelter_editor",
value: "demo.shelter_editor"
},
{
pId: 4, pId: 4,
id: 407, id: 407,
text: "下拉框控件", text: "下拉框控件",
@ -165,22 +140,6 @@ Demo.WIDGET_CONFIG = [{
pId: 407, pId: 407,
text: "bi.formula_combo", text: "bi.formula_combo",
value: "demo.formula_combo" value: "demo.formula_combo"
}, {
pId: 4,
id: 408,
text: "选择字段列表",
open: false
}, {
pId: 408,
text: "bi.placeholder"
}, {
pId: 4,
id: 409,
text: "公式编辑器",
open: false
}, {
pId: 409,
text: "bi.placeholder"
}, { }, {
pId: 4, pId: 4,
id: 410, id: 410,
@ -291,7 +250,7 @@ Demo.WIDGET_CONFIG = [{
text: "文件管理" text: "文件管理"
}, { }, {
pId: 419, pId: 419,
text: "demo.file_manager", text: "bi.file_manager",
value: "demo.file_manager" value: "demo.file_manager"
} }
]; ];

22
demo/js/widget/editor/demo.record_editor.js

@ -1,22 +0,0 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.RecordEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.record_editor",
cls: "bi-border",
width: 300,
watermark: "这个是可以记录输入的"
}],
vgap: 20
}
}
})
BI.shortcut("demo.record_editor", Demo.RecordEditor);

22
demo/js/widget/editor/demo.sign_style_editor.js

@ -1,22 +0,0 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignStyleEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_style_editor",
cls:"layout-bg5",
value:"12313",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor);

BIN
docs/background/auto-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

BIN
docs/background/trans-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

321
docs/demo.js

@ -1838,7 +1838,124 @@ BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
}) })
} }
}); });
BI.shortcut("demo.complex_canvas", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { BI.shortcut("demo.complex_canvas", Demo.Func);/**
* Created by Dailer on 2017/7/11.
*/
Demo.ClearEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var editor;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.shelter_editor",
cls: "bi-border",
ref:function(_ref){
editor=_ref;
},
width: 300,
watermark: "这个是带标记的"
},{
type:"bi.button",
text:"setValue",
width:300,
handler:function(){
editor.setValue("凛冬将至");
}
},{
type:"bi.button",
text:"doHighLight",
width:300,
handler:function(){
editor.doHighLight();
console.log(editor.getState());
}
}],
vgap: 20
}
}
})
BI.shortcut("demo.shelter_editor", Demo.ClearEditor);/**
* Created by Dailer on 2017/7/14.
*/
Demo.SignEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_editor",
// cls:"layout-bg5",
value: "123",
text: "456",
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.sign_editor", Demo.SignEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
mounted: function () {
this.editor.setValue({
value: "123",
text: "sdga"
})
},
render: function () {
var self = this;
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_initial_editor",
ref: function () {
self.editor = this;
},
cls: "layout-bg5",
text: "原始值",
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.StateEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.state_editor",
value: "123",
text: "456",
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.state_editor", Demo.StateEditor);Demo.Func = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-func" baseCls: "demo-func"
}, },
@ -3038,10 +3155,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 3, pId: 3,
id: 301, id: 301,
text: "editors" text: "editors"
}, {
pId: 301,
text: "bi.record_editor",
value: "demo.record_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.shelter_editor", text: "bi.shelter_editor",
@ -3050,6 +3163,10 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 301, pId: 301,
text: "bi.sign_editor", text: "bi.sign_editor",
value: "demo.sign_editor" value: "demo.sign_editor"
}, {
pId: 301,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.state_editor", text: "bi.state_editor",
@ -3455,36 +3572,11 @@ Demo.COMPONENT_CONFIG = [{
pId: 406, pId: 406,
text: "bi.search_editor", text: "bi.search_editor",
value: "demo.search_editor" value: "demo.search_editor"
}, {
pId: 406,
text: "bi.sign_editor",
value: "demo.sign_editor"
}, {
pId: 406,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, {
pId: 406,
text: "bi.sign_style_editor",
value: "demo.sign_style_editor"
}, {
pId: 406,
text: "bi.state_editor",
value: "demo.state_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.clear_editor", text: "bi.clear_editor",
value: "demo.clear_editor" value: "demo.clear_editor"
}, { }, {
pId: 406,
text: "bi.record_editor",
value: "demo.record_editor"
}, {
pId: 406,
text: "bi.shelter_editor",
value: "demo.shelter_editor"
},
{
pId: 4, pId: 4,
id: 407, id: 407,
text: "下拉框控件", text: "下拉框控件",
@ -3513,22 +3605,6 @@ Demo.COMPONENT_CONFIG = [{
pId: 407, pId: 407,
text: "bi.formula_combo", text: "bi.formula_combo",
value: "demo.formula_combo" value: "demo.formula_combo"
}, {
pId: 4,
id: 408,
text: "选择字段列表",
open: false
}, {
pId: 408,
text: "bi.placeholder"
}, {
pId: 4,
id: 409,
text: "公式编辑器",
open: false
}, {
pId: 409,
text: "bi.placeholder"
}, { }, {
pId: 4, pId: 4,
id: 410, id: 410,
@ -3639,7 +3715,7 @@ Demo.COMPONENT_CONFIG = [{
text: "文件管理" text: "文件管理"
}, { }, {
pId: 419, pId: 419,
text: "demo.file_manager", text: "bi.file_manager",
value: "demo.file_manager" value: "demo.file_manager"
} }
];Demo.Func = BI.inherit(BI.Widget, { ];Demo.Func = BI.inherit(BI.Widget, {
@ -7453,27 +7529,6 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
BI.shortcut("demo.clear_editor", Demo.ClearEditor);/** BI.shortcut("demo.clear_editor", Demo.ClearEditor);/**
* Created by Dailer on 2017/7/11. * Created by Dailer on 2017/7/11.
*/ */
Demo.RecordEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.record_editor",
cls: "bi-border",
width: 300,
watermark: "这个是可以记录输入的"
}],
vgap: 20
}
}
})
BI.shortcut("demo.record_editor", Demo.RecordEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.SearchEditor = BI.inherit(BI.Widget, { Demo.SearchEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-exceltable" baseCls: "demo-exceltable"
@ -7502,136 +7557,6 @@ Demo.SearchEditor = BI.inherit(BI.Widget, {
BI.shortcut("demo.search_editor", Demo.SearchEditor);/** BI.shortcut("demo.search_editor", Demo.SearchEditor);/**
* Created by Dailer on 2017/7/11. * Created by Dailer on 2017/7/11.
*/ */
Demo.ClearEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var editor;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.shelter_editor",
cls: "bi-border",
ref:function(_ref){
editor=_ref;
},
width: 300,
watermark: "这个是带标记的"
},{
type:"bi.button",
text:"setValue",
width:300,
handler:function(){
editor.setValue("凛冬将至");
}
},{
type:"bi.button",
text:"doHighLight",
width:300,
handler:function(){
editor.doHighLight();
console.log(editor.getState());
}
}],
vgap: 20
}
}
})
BI.shortcut("demo.shelter_editor", Demo.ClearEditor);/**
* Created by Dailer on 2017/7/14.
*/
Demo.SignEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_editor",
// cls:"layout-bg5",
value: "123",
text: "456",
width: 300
}],
vgap: 20
}
}
})
BI.shortcut("demo.sign_editor", Demo.SignEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_initial_editor",
cls:"layout-bg5",
value:"123",
text:"456",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignStyleEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_style_editor",
cls:"layout-bg5",
value:"12313",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.StateEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.state_editor",
cls:"bi-border",
value:"123",
text:"456",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.state_editor", Demo.StateEditor);/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextEditor = BI.inherit(BI.Widget, { Demo.TextEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-exceltable" baseCls: "demo-exceltable"

46
docs/resource.css

@ -818,6 +818,52 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e600"; content: "\e600";
color: #f07d0a; color: #f07d0a;
} }
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font:focus .b-font:before,
.less-font.hover .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
content: "\e633";
color: #3f8ce8;
}
.less-font.native .b-font:before,
.less-font.disabled .b-font:before {
content: "\e633";
color: inherit;
}
.less-equal-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font:focus .b-font:before,
.less-equal-font.hover .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
content: "\e636";
color: #3f8ce8;
}
.less-equal-font.native .b-font:before,
.less-equal-font.disabled .b-font:before {
content: "\e636";
color: inherit;
}
.tree-collapse-icon-type1 .x-icon, .tree-collapse-icon-type1 .x-icon,
.tree-collapse-icon-type1:hover .x-icon, .tree-collapse-icon-type1:hover .x-icon,
.tree-collapse-icon-type1:active .x-icon { .tree-collapse-icon-type1:active .x-icon {

46
src/css/resource/font.css

@ -684,3 +684,49 @@
content: "\e600"; content: "\e600";
color: #f07d0a; color: #f07d0a;
} }
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font:focus .b-font:before,
.less-font.hover .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
content: "\e633";
color: #3f8ce8;
}
.less-font.native .b-font:before,
.less-font.disabled .b-font:before {
content: "\e633";
color: inherit;
}
.less-equal-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font:focus .b-font:before,
.less-equal-font.hover .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
content: "\e636";
color: #3f8ce8;
}
.less-equal-font.native .b-font:before,
.less-equal-font.disabled .b-font:before {
content: "\e636";
color: inherit;
}

4
src/less/resource/font.less

@ -80,3 +80,7 @@
.font-hover(primary-key-font, @font-key); .font-hover(primary-key-font, @font-key);
.font(drag-tag-font, @font-cross, @color-bi-text-redmark); .font(drag-tag-font, @font-cross, @color-bi-text-redmark);
//数值区间
.font-hover-active(less-font, @font-less);
.font-hover-active(less-equal-font, @font-less-equal);
Loading…
Cancel
Save