|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
Demo.Editor = BI.inherit(BI.Widget, { |
|
|
|
|
props: { |
|
|
|
|
baseCls: "demo-editor" |
|
|
|
|
baseCls: "demo-editor", |
|
|
|
|
}, |
|
|
|
|
render: function () { |
|
|
|
|
var editor1 = BI.createWidget({ |
|
|
|
@ -9,7 +9,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
watermark: "报错信息显示在控件上方", |
|
|
|
|
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", |
|
|
|
|
width: 200, |
|
|
|
|
height: 24 |
|
|
|
|
height: 24, |
|
|
|
|
}); |
|
|
|
|
editor1.on(BI.Editor.EVENT_ENTER, function () { |
|
|
|
|
editor1.blur(); |
|
|
|
@ -24,11 +24,12 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
if (v == "a") { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
allowBlank: true, |
|
|
|
|
width: 200, |
|
|
|
|
height: 24 |
|
|
|
|
height: 24, |
|
|
|
|
}); |
|
|
|
|
var editor3 = BI.createWidget({ |
|
|
|
|
type: "bi.editor", |
|
|
|
@ -40,6 +41,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
if (v == "a") { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
quitChecker: function (v) { |
|
|
|
@ -47,7 +49,17 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
allowBlank: true, |
|
|
|
|
width: 300, |
|
|
|
|
height: 24 |
|
|
|
|
height: 24, |
|
|
|
|
}); |
|
|
|
|
var editor4 = BI.createWidget({ |
|
|
|
|
type: "bi.editor", |
|
|
|
|
cls: "bi-border", |
|
|
|
|
inputType: "password", |
|
|
|
|
autocomplete: "new-password", |
|
|
|
|
watermark: "请输入密码", |
|
|
|
|
allowBlank: true, |
|
|
|
|
width: 300, |
|
|
|
|
height: 24, |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
@ -55,15 +67,19 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
items: [{ |
|
|
|
|
el: editor1, |
|
|
|
|
left: 0, |
|
|
|
|
top: 0 |
|
|
|
|
top: 0, |
|
|
|
|
}, { |
|
|
|
|
el: editor2, |
|
|
|
|
left: 250, |
|
|
|
|
top: 30 |
|
|
|
|
top: 30, |
|
|
|
|
}, { |
|
|
|
|
el: editor3, |
|
|
|
|
left: 500, |
|
|
|
|
top: 60 |
|
|
|
|
top: 60, |
|
|
|
|
}, { |
|
|
|
|
el: editor4, |
|
|
|
|
left: 700, |
|
|
|
|
top: 60, |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.button", |
|
|
|
@ -73,10 +89,10 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
editor2.setEnable(false); |
|
|
|
|
editor3.setEnable(false); |
|
|
|
|
}, |
|
|
|
|
height: 30 |
|
|
|
|
height: 30, |
|
|
|
|
}, |
|
|
|
|
left: 100, |
|
|
|
|
bottom: 60 |
|
|
|
|
bottom: 60, |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.button", |
|
|
|
@ -86,12 +102,12 @@ Demo.Editor = BI.inherit(BI.Widget, {
|
|
|
|
|
editor2.setEnable(true); |
|
|
|
|
editor3.setEnable(true); |
|
|
|
|
}, |
|
|
|
|
height: 30 |
|
|
|
|
height: 30, |
|
|
|
|
}, |
|
|
|
|
left: 200, |
|
|
|
|
bottom: 60 |
|
|
|
|
}] |
|
|
|
|
bottom: 60, |
|
|
|
|
}], |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("demo.editor", Demo.Editor); |