refactor(layout): 优化市场指数和调查组件布局
- 在 Market/Index.vue 中添加搜索值变量 - 在 SurveyItem.vue 中优化调查标题样式计算逻辑
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -69,9 +69,16 @@ onMounted(() => {
|
||||
const surveyTitleStyle = computed<CSSProperties>(() => {
|
||||
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
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user