mediacube-ui 0.1.258 → 0.1.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.259](https://github.com/MediaCubeCo/mcui/compare/v0.1.258...v0.1.259) (2024-04-24)
|
|
6
|
+
|
|
5
7
|
### [0.1.258](https://github.com/MediaCubeCo/mcui/compare/v0.1.257...v0.1.258) (2024-04-23)
|
|
6
8
|
|
|
7
9
|
### [0.1.257](https://github.com/MediaCubeCo/mcui/compare/v0.1.256...v0.1.257) (2024-04-22)
|
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
:maxlength="maxLength"
|
|
49
49
|
v-on="listeners"
|
|
50
50
|
@input="prepareHandleInput"
|
|
51
|
+
@keydown="prepareHandleKeyDown"
|
|
51
52
|
/>
|
|
52
53
|
</template>
|
|
53
54
|
</label>
|
|
@@ -612,6 +613,18 @@ export default {
|
|
|
612
613
|
|
|
613
614
|
this.handleInput(value)
|
|
614
615
|
},
|
|
616
|
+
prepareHandleKeyDown(e) {
|
|
617
|
+
switch (this.type) {
|
|
618
|
+
case 'amount_format':
|
|
619
|
+
case 'num': {
|
|
620
|
+
if (e.key === '.' && typeof this.value === 'string' && this.value?.includes('.')) {
|
|
621
|
+
e.preventDefault()
|
|
622
|
+
}
|
|
623
|
+
break
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
this.$emit('keydown', e)
|
|
627
|
+
},
|
|
615
628
|
formattedToNumber(value) {
|
|
616
629
|
const [first] =
|
|
617
630
|
/-?\d*[\.]?\d*/.exec(
|