|
|
@ -11,11 +11,10 @@ |
|
|
let centerPlaceholder = textAlign === "center" |
|
|
let centerPlaceholder = textAlign === "center" |
|
|
|
|
|
|
|
|
let style = buildStyle({ width, textAlign }) |
|
|
let style = buildStyle({ width, textAlign }) |
|
|
|
|
|
|
|
|
function handleChange(val) { |
|
|
function handleChange(val) { |
|
|
value = val |
|
|
value = val |
|
|
let _value = suffix ? value + suffix : value |
|
|
onChange(value) |
|
|
onChange(_value) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value |
|
|
$: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value |
|
|
|