diff --git a/src/components/Select/SelectMch.vue b/src/components/Select/SelectMch.vue index 3c112467..afb219d7 100644 --- a/src/components/Select/SelectMch.vue +++ b/src/components/Select/SelectMch.vue @@ -19,6 +19,8 @@ import { reactive } from "vue" import * as mchApi from "/@/api/wallet/mch-manage" +const emit = defineEmits(['update:modelValue']); + const selectId = defineModel() const props = withDefaults( @@ -71,6 +73,7 @@ async function getOptions() { state.options = data.records ?? [] if (props.autoFirst && state.options.length != 0) { state.selectId = state.options[0].id + emit("update:modelValue", state.selectId) } } finally { setTimeout(() => (state.loading = false), 500) diff --git a/src/views/canteen/canteenDailyMenu/index.vue b/src/views/canteen/canteenDailyMenu/index.vue index b1574eef..ee804da7 100644 --- a/src/views/canteen/canteenDailyMenu/index.vue +++ b/src/views/canteen/canteenDailyMenu/index.vue @@ -1,34 +1,26 @@