mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 23:37:30 +08:00
Move pin templates to subdirectory
This commit is contained in:
22
js/template/pin/IntPinTemplate.js
Normal file
22
js/template/pin/IntPinTemplate.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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>
|
||||
`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user