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.
48 lines
1.2 KiB
48 lines
1.2 KiB
import { shortcut, Widget, createWidget } from "@/core"; |
|
|
|
@shortcut() |
|
export class ClearEditor extends Widget { |
|
static xtype = "demo.shelter_editor"; |
|
|
|
props = { baseCls: "" }; |
|
|
|
render() { |
|
const editor = createWidget({ |
|
type: "bi.shelter_editor", |
|
cls: "bi-border", |
|
validationChecker(v) { |
|
return v != "a"; |
|
}, |
|
watermark: "可以设置标记的输入框", |
|
value: "这是一个遮罩", |
|
keyword: "z", |
|
}); |
|
createWidget({ |
|
type: "bi.vertical", |
|
element: this, |
|
hgap: 30, |
|
vgap: 20, |
|
bgap: 50, |
|
items: [editor], |
|
}); |
|
createWidget({ |
|
type: "bi.absolute", |
|
element: this, |
|
items: [ |
|
{ |
|
el: { |
|
type: "bi.button", |
|
text: "focus", |
|
height: 25, |
|
handler() { |
|
editor.focus(); |
|
}, |
|
}, |
|
right: 10, |
|
left: 10, |
|
bottom: 10, |
|
} |
|
], |
|
}); |
|
} |
|
}
|
|
|