feat: add number-to-string conversion in mValue watcher for api components

pull/54/head
chenminjie 2024-11-29 18:34:00 +08:00
parent 9f649b9565
commit 07c741f124
3 changed files with 27 additions and 0 deletions

View File

@ -123,6 +123,15 @@ watch(
}, },
{ deep: true }, { deep: true },
); );
watch(
() => mValue.value,
(newValue) => {
if (typeof newValue === 'number') {
mValue.value = `${newValue}`;
}
},
);
</script> </script>
<template> <template>

View File

@ -125,6 +125,15 @@ watch(
}, },
{ deep: true }, { deep: true },
); );
watch(
() => mValue.value,
(newValue) => {
if (typeof newValue === 'number') {
mValue.value = `${newValue}`;
}
},
);
</script> </script>
<template> <template>

View File

@ -119,6 +119,15 @@ watch(
}, },
{ deep: true }, { deep: true },
); );
watch(
() => mValue.value,
(newValue) => {
if (typeof newValue === 'number') {
mValue.value = `${newValue}`;
}
},
);
</script> </script>
<template> <template>