refactor(layout): 优化市场指数和调查组件布局

- 在 Market/Index.vue 中添加搜索值变量
- 在 SurveyItem.vue 中优化调查标题样式计算逻辑
This commit is contained in:
Huangzhe
2025-05-28 13:06:33 +08:00
parent fced5acf2f
commit 93bb2b3594
2 changed files with 10 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ const marketIndex = ref(0);
const marketInfo = ref([]); const marketInfo = ref([]);
// 当前激活的 item 信息 // 当前激活的 item 信息
const marketItem = ref(); const marketItem = ref();
// 当前的搜索指
const searchValue = ref(''); const searchValue = ref('');
const getTableList = async () => { const getTableList = async () => {
const res = await getListScene(); const res = await getListScene();

View File

@@ -69,9 +69,16 @@ onMounted(() => {
const surveyTitleStyle = computed<CSSProperties>(() => { const surveyTitleStyle = computed<CSSProperties>(() => {
const isPublishNumber = survey.value.is_publish_number; const isPublishNumber = survey.value.is_publish_number;
const isSurveyTime = survey.value.is_time; const isSurveyTime = survey.value.is_time;
const width = isSurveyTime && isPublishNumber ? (isShortTitle.value ? '25vw' : '') : ''; const width =
isSurveyTime && isPublishNumber
? isShortTitle.value
? '25vw'
: ''
: isSurveyTime
? '170px'
: '';
return { return {
width maxWidth: width
}; };
}); });