forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
/** |
|
* Created by Dailer on 2017/7/11. |
|
*/ |
|
Demo.ClearEditor = BI.inherit(BI.Widget, { |
|
props: { |
|
baseCls: "" |
|
}, |
|
render: function () { |
|
var editor = BI.createWidget({ |
|
type: "bi.shelter_editor", |
|
cls: "bi-border", |
|
validationChecker: function (v) { |
|
return v != "a"; |
|
}, |
|
watermark: "可以设置标记的输入框", |
|
value: "这是一个遮罩", |
|
keyword: "z" |
|
}); |
|
BI.createWidget({ |
|
type: "bi.vertical", |
|
element: this, |
|
hgap: 30, |
|
vgap: 20, |
|
bgap: 50, |
|
items: [editor] |
|
}); |
|
BI.createWidget({ |
|
type: "bi.absolute", |
|
element: this, |
|
items: [{ |
|
el: { |
|
type: "bi.button", |
|
text: "focus", |
|
height: 25, |
|
handler: function () { |
|
editor.focus(); |
|
} |
|
}, |
|
right: 10, |
|
left: 10, |
|
bottom: 10 |
|
}] |
|
}); |
|
} |
|
}); |
|
|
|
BI.shortcut("demo.shelter_editor", Demo.ClearEditor); |