33 <div v-if =" mode === 'ques'" class =" bg-base-200 dark:bg-customGray flex-1 overflow-y-auto h-[80vh]" >
44 <div v-if =" schema && schema.quesConfig" class =" flex-col justify-center p-20 pb-0" >
55 <div class =" flex justify-center items-center flex-col gap-10" >
6- <input v-model =" schema.quesConfig.title" class =" input bg-base-200 flex focus:bg-base-100 hover:border-gray-300 text-2xl w-[100%] text-center dark:bg-customGray " placeholder =" 问卷标题" >
7- <textarea v-model =" schema.quesConfig.desc" class =" textarea bg-base-200 flex focus:bg-base-100 hover:border-gray-300 text-md w-[100%] resize-none dark:bg-customGray " placeholder =" 问卷描述" />
6+ <input v-model =" schema.quesConfig.title" class =" input questionHeader text-2xl text-center" placeholder =" 问卷标题" >
7+ <textarea v-model =" schema.quesConfig.desc" class =" textarea questionHeader text-md resize-none" placeholder =" 问卷描述" />
88 </div >
99 </div >
1010 <div class =" divider" />
1515 @click =" activeSerial = q.serialNum"
1616 >
1717 <div class =" relative flex items-center gap-4 w-full dark:bg-[#1A1A1A]" >
18- <div v-if =" q.quesSetting.questionType === QuesItemType.RADIO" class =" flex-grow w-full " >
18+ <div v-if =" q.quesSetting.questionType === QuesItemType.RADIO" class =" questionItems " >
1919 <el-skeleton animated :loading =" loading" >
2020 <radio
2121 v-model:title =" q.subject"
3030 />
3131 </el-skeleton >
3232 </div >
33- <div v-if =" q.quesSetting.questionType === QuesItemType.CHECKBOX" class =" flex-grow w-full " >
33+ <div v-if =" q.quesSetting.questionType === QuesItemType.CHECKBOX" class =" questionItems " >
3434 <el-skeleton animated :loading =" loading" >
3535 <template #template >
3636 <skeleton-card />
5252 </template >
5353 </el-skeleton >
5454 </div >
55- <div v-if =" q.quesSetting.questionType === QuesItemType.INPUT" class =" flex-grow w-full " >
55+ <div v-if =" q.quesSetting.questionType === QuesItemType.INPUT" class =" questionItems " >
5656 <el-skeleton animated :loading =" loading" >
5757 <template #template >
5858 <skeleton-card />
7171 </template >
7272 </el-skeleton >
7373 </div >
74- <div v-if =" q.quesSetting.questionType === QuesItemType.TEXTAREA" class =" flex-grow w-full " >
74+ <div v-if =" q.quesSetting.questionType === QuesItemType.TEXTAREA" class =" questionItems " >
7575 <el-skeleton :loading =" loading" >
7676 <template #template >
7777 <skeleton-card />
8989 </template >
9090 </el-skeleton >
9191 </div >
92- <div v-if =" q.quesSetting.questionType === QuesItemType.PHOTO" class =" flex-grow w-full " >
92+ <div v-if =" q.quesSetting.questionType === QuesItemType.PHOTO" class =" questionItems " >
9393 <el-skeleton animated :loading =" loading" >
9494 <template #template >
9595 <skeleton-card />
111111 <div v-if =" q.serialNum === activeSerial" class =" flex flex-col gap-10" >
112112 <button
113113 v-if =" q.serialNum !== 1"
114- class =" rounded-full w-24 h-24 flex justify-center items-center bg-gray-300 hover:bg-gray-400 text-white transition-colors duration-200 "
114+ class =" questionButton "
115115 @click.stop =" activeMove(activeSerial-1, 'up')"
116116 >
117117 ↑
118118 </button >
119119
120120 <button
121121 v-if =" q.serialNum !== schema.quesConfig.questionList.length"
122- class =" rounded-full w-24 h-24 flex justify-center items-center bg-gray-300 hover:bg-gray-400 text-white transition-colors duration-200 "
122+ class =" questionButton "
123123 @click.stop =" activeMove(activeSerial-1, 'down')"
124124 >
125125 ↓
126126 </button >
127127
128128 <button
129- class =" rounded-full w-24 h-24 flex justify-center items-center bg-gray-300 hover:bg-gray-400 text-white transition-colors duration-200 "
129+ class =" questionButton "
130130 @click.stop =" activeDelete(activeSerial-1)"
131131 >
132132 x
139139 <div class =" flex justify-center items-center gap-10 mt-10" >
140140 <button
141141 v-show =" isNew === 'true'"
142- class =" btn dark:opacity-75 dark:text-white btn-sm flex-1 bg-red-100 hover:bg-red-200 hover:border-red-300 "
142+ class =" btn btn-sm questionActionButton "
143143 style =" border-radius : 0 "
144144 @click =" showModal('SaveQuestionnaireSubmit')"
145145 >
146146 保存
147147 </button >
148148 <button
149149 v-show =" isNew === 'true'"
150- class =" btn btn-sm dark:opacity-75 dark:text-white flex-1 hover:bg-red-200 bg-red-100 hover:border-red-300 "
150+ class =" btn btn-sm questionActionButton "
151151 style =" border-radius : 0 "
152152 @click =" showModal(surveyId === -1?'NewQuestionnaireSubmit':'SaveQuestionnaireSubmit')"
153153 >
@@ -288,4 +288,19 @@ const saveEdit = () => {
288288 }
289289 });
290290};
291- </script >
291+ </script >
292+
293+ <style scoped>
294+ .questionButton {
295+ @apply rounded-full w- 24 h- 24 flex justify-center items-center bg-gray- 300 hover :bg-gray-400 text-white transition-colors duration-200
296+ }
297+ .questionHeader {
298+ @apply bg-base- 200 flex focus :bg-base-100 hover:border-gray-300 w-[100% ] dark :bg-customGray
299+ }
300+ .questionItems {
301+ @apply flex-grow w-full
302+ }
303+ .questionActionButton {
304+ @apply dark :opacity-75 dark :text-white flex-1 hover:bg-red-200 bg-red-100 hover:border-red-300
305+ }
306+ </style >
0 commit comments