fix: 修改数量弹窗第一次显示数量为0

This commit is contained in:
YeMingfei666 2025-03-15 13:41:18 +08:00
parent 7cd9db724c
commit 410dbb5fcf
1 changed files with 1 additions and 10 deletions

View File

@ -97,12 +97,7 @@ const props = defineProps({
const number = defineModel({ const number = defineModel({
default: 0, default: 0,
}); });
watch(
() => props.value,
(newval) => {
number.value = newval;
}
);
const emits = defineEmits(["input", "confirm"]); const emits = defineEmits(["input", "confirm"]);
function clearFunction() { function clearFunction() {
@ -145,10 +140,6 @@ function keyboradReduce() {
function keyboradConfirm() { function keyboradConfirm() {
this.$emit("confirm", number.value); this.$emit("confirm", number.value);
} }
onMounted(() => {
number.value = `${props.value}`;
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>