feat: 快速预定页面调整
This commit is contained in:
@@ -32,7 +32,7 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
// Emit
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
const emit = defineEmits(["update:modelValue", "decrease", "increase"]);
|
||||
|
||||
// Local state
|
||||
const value = ref(props.modelValue);
|
||||
@@ -53,6 +53,7 @@ const decrease = () => {
|
||||
if (value.value > props.min) {
|
||||
value.value--;
|
||||
emit("update:modelValue", value.value);
|
||||
emit("decrease");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -60,6 +61,7 @@ const increase = () => {
|
||||
if (value.value < props.max) {
|
||||
value.value++;
|
||||
emit("update:modelValue", value.value);
|
||||
emit("increase");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user