mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 00:24:48 +08:00
23 lines
740 B
JavaScript
23 lines
740 B
JavaScript
import { html } from "lit"
|
|
import IntegerEntity from "../entity/IntegerEntity"
|
|
import INumericInputPinTemplate from "./INumericInputPinTemplate"
|
|
|
|
/** @typedef {import("../entity/IntegerEntity").default} IntEntity */
|
|
|
|
/** @extends INumericInputPinTemplate<IntEntity> */
|
|
export default class IntInputPinTemplate extends INumericInputPinTemplate {
|
|
|
|
setDefaultValue(values = [], rawValues = values) {
|
|
this.element.setDefaultValue(new IntegerEntity(values[0]))
|
|
}
|
|
|
|
renderInput() {
|
|
return html`
|
|
<div class="ueb-pin-input">
|
|
<ueb-input .singleLine="${true}" .innerText="${this.element.entity.DefaultValue?.toString() ?? "0"}">
|
|
</ueb-input>
|
|
</div>
|
|
`
|
|
}
|
|
}
|