mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-06-16 09:20:49 +08:00
Move pin templates to subdirectory
This commit is contained in:
25
js/template/pin/RealInputPinTemplate.js
Normal file
25
js/template/pin/RealInputPinTemplate.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { html } from "lit"
|
||||
import IInputPinTemplate from "./IInputPinTemplate"
|
||||
import INumericPinTemplate from "./INumericInputPinTemplate"
|
||||
import Utility from "../../Utility"
|
||||
|
||||
/**
|
||||
* @template {Number} T
|
||||
* @extends INumericPinTemplate<T>
|
||||
*/
|
||||
export default class RealInputPinTemplate extends INumericPinTemplate {
|
||||
|
||||
setDefaultValue(values = [], rawValues = values) {
|
||||
this.element.setDefaultValue(values[0])
|
||||
}
|
||||
|
||||
renderInput() {
|
||||
return html`
|
||||
<div class="ueb-pin-input">
|
||||
<ueb-input .singleLine="${true}"
|
||||
.innerText="${IInputPinTemplate.stringFromUEToInput(Utility.minDecimals(this.element.entity.DefaultValue))}">
|
||||
</ueb-input>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user