mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-13 11:47:30 +08:00
Input system cleanup
This commit is contained in:
@@ -5,6 +5,7 @@ import { LitElement } from "lit"
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../input/IInput").default} IInput
|
||||
* @typedef {import("../template/ITemplate").default} ITemplate
|
||||
* @typedef {import("lit").PropertyDeclarations} PropertyDeclarations
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,7 @@ import { LitElement } from "lit"
|
||||
*/
|
||||
export default class IElement extends LitElement {
|
||||
|
||||
/** @type {import("lit").PropertyDeclarations} */
|
||||
/** @type {PropertyDeclarations} */
|
||||
static properties = {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,28 @@
|
||||
import InputTemplate from "../template/InputTemplate"
|
||||
import Utility from "../Utility"
|
||||
import IElement from "./IElement"
|
||||
|
||||
export default class InputElement extends IElement {
|
||||
|
||||
static properties = {
|
||||
...super.properties,
|
||||
singleLine: {
|
||||
type: Boolean,
|
||||
attribute: "data-single-line",
|
||||
converter: Utility.booleanConverter,
|
||||
reflect: true,
|
||||
},
|
||||
blurOnEnter: {
|
||||
type: Boolean,
|
||||
attribute: "data-blur-enter",
|
||||
converter: Utility.booleanConverter,
|
||||
reflect: true,
|
||||
},
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super({}, new InputTemplate())
|
||||
this.singleLine = false
|
||||
this.blurOnEnter = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user