From 6cdf5cfbd020db5b45fedfc84ea4f53d3663f3d2 Mon Sep 17 00:00:00 2001 From: xingyy Date: Fri, 5 Sep 2025 13:23:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ContactModal):=20=E5=B0=86forwardMode?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89=E6=94=B9=E4=B8=BA=E5=AE=8C?= =?UTF-8?q?=E6=95=B4props=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用defineProps的完整对象语法定义forwardMode属性,增加类型检查和默认值 --- src/components/user/ContactModal.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/user/ContactModal.vue b/src/components/user/ContactModal.vue index caecc91..b70ed17 100644 --- a/src/components/user/ContactModal.vue +++ b/src/components/user/ContactModal.vue @@ -30,7 +30,12 @@ const loading = ref(true) const items = ref([]) const keywords = ref('') const loadGroupStatus = ref(false) -const forwardMode = defineProps(['forwardMode']) +const props = defineProps({ + 'forwardMode': { + type: Number, + default: 0 + } +}) // 通讯录弹窗相关状态 const state = reactive({