From 93bb2b35949a6aec74b627255f4d67f12ba08844 Mon Sep 17 00:00:00 2001 From: Huangzhe Date: Wed, 28 May 2025 13:06:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor(layout):=20=E4=BC=98=E5=8C=96=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E6=8C=87=E6=95=B0=E5=92=8C=E8=B0=83=E6=9F=A5=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Market/Index.vue 中添加搜索值变量 - 在 SurveyItem.vue 中优化调查标题样式计算逻辑 --- src/views/Home/components/Market/Index.vue | 1 + src/views/Survey/components/SurveyItem.vue | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/Home/components/Market/Index.vue b/src/views/Home/components/Market/Index.vue index fea6936..518a60a 100644 --- a/src/views/Home/components/Market/Index.vue +++ b/src/views/Home/components/Market/Index.vue @@ -57,6 +57,7 @@ const marketIndex = ref(0); const marketInfo = ref([]); // 当前激活的 item 信息 const marketItem = ref(); +// 当前的搜索指 const searchValue = ref(''); const getTableList = async () => { const res = await getListScene(); diff --git a/src/views/Survey/components/SurveyItem.vue b/src/views/Survey/components/SurveyItem.vue index bd16160..3ad9992 100644 --- a/src/views/Survey/components/SurveyItem.vue +++ b/src/views/Survey/components/SurveyItem.vue @@ -69,9 +69,16 @@ onMounted(() => { const surveyTitleStyle = computed(() => { const isPublishNumber = survey.value.is_publish_number; const isSurveyTime = survey.value.is_time; - const width = isSurveyTime && isPublishNumber ? (isShortTitle.value ? '25vw' : '') : ''; + const width = + isSurveyTime && isPublishNumber + ? isShortTitle.value + ? '25vw' + : '' + : isSurveyTime + ? '170px' + : ''; return { - width + maxWidth: width }; });