fix: 修改数量弹窗第一次显示数量为0
This commit is contained in:
parent
7cd9db724c
commit
410dbb5fcf
|
|
@ -97,12 +97,7 @@ const props = defineProps({
|
|||
const number = defineModel({
|
||||
default: 0,
|
||||
});
|
||||
watch(
|
||||
() => props.value,
|
||||
(newval) => {
|
||||
number.value = newval;
|
||||
}
|
||||
);
|
||||
|
||||
const emits = defineEmits(["input", "confirm"]);
|
||||
|
||||
function clearFunction() {
|
||||
|
|
@ -145,10 +140,6 @@ function keyboradReduce() {
|
|||
function keyboradConfirm() {
|
||||
this.$emit("confirm", number.value);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
number.value = `${props.value}`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue