fix: 修改数量弹窗第一次显示数量为0
This commit is contained in:
parent
7cd9db724c
commit
410dbb5fcf
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue