@carbon/vue 3.0.24 → 3.0.25
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/dist/carbon-vue-3.common.js +9 -5
- package/dist/carbon-vue-3.common.js.map +1 -1
- package/dist/carbon-vue-3.umd.js +9 -5
- package/dist/carbon-vue-3.umd.js.map +1 -1
- package/dist/carbon-vue-3.umd.min.js +1 -1
- package/dist/carbon-vue-3.umd.min.js.map +1 -1
- package/dist/web-types.json +2 -2
- package/package.json +1 -1
- package/src/components/CvDataTable/index.js +14 -1
- package/src/components/CvNumberInput/CvNumberInput.vue +9 -5
|
@@ -13410,7 +13410,7 @@ var __default__ = {
|
|
|
13410
13410
|
disabled: Boolean,
|
|
13411
13411
|
modelValue: {
|
|
13412
13412
|
type: [String, Number],
|
|
13413
|
-
default:
|
|
13413
|
+
default: undefined
|
|
13414
13414
|
},
|
|
13415
13415
|
formItem: {
|
|
13416
13416
|
type: Boolean,
|
|
@@ -13489,17 +13489,21 @@ var __default__ = {
|
|
|
13489
13489
|
var modelValueType = (0,esm_typeof/* default */.A)(props.modelValue);
|
|
13490
13490
|
var valuesToNaN = ['', null, undefined];
|
|
13491
13491
|
var formatInputValueType = function formatInputValueType(value) {
|
|
13492
|
-
if (modelValueType === 'string') return value.toString();
|
|
13492
|
+
if (modelValueType === 'string') return Number(value).toString();
|
|
13493
13493
|
// According to Vue2 component if there is no value NaN is emitted
|
|
13494
13494
|
return valuesToNaN.includes(value) ? NaN : Number(value);
|
|
13495
13495
|
};
|
|
13496
|
+
var displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(props.modelValue || props.min);
|
|
13496
13497
|
var internalValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)({
|
|
13497
13498
|
get: function get() {
|
|
13498
|
-
return props.modelValue;
|
|
13499
|
+
return props.modelValue || displayValue.value;
|
|
13499
13500
|
},
|
|
13500
13501
|
set: function set(value) {
|
|
13501
|
-
|
|
13502
|
-
|
|
13502
|
+
displayValue.value = formatInputValueType(value);
|
|
13503
|
+
if (typeof value === 'string') {
|
|
13504
|
+
input.value.value = '';
|
|
13505
|
+
}
|
|
13506
|
+
onInput(displayValue.value);
|
|
13503
13507
|
}
|
|
13504
13508
|
});
|
|
13505
13509
|
var onInput = function onInput(value) {
|