Skip to content

Commit

Permalink
fix:修复了换行不显示的问题 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
xixiIBN5100 authored Sep 3, 2024
1 parent 1e2ef7d commit fcbf2c8
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/Modal/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<dialog :id="modalId" class="modal" >
<div class="modal-box p-30" :class="gray ? 'bg-gray-300' : 'bg-indigo-100'">
<div class="modal-box p-30" :class="gray ? 'bg-gray-300' : 'bg-red-50'" >
<form method="dialog">
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2 ">✕</button>
</form>
Expand All @@ -22,7 +22,7 @@
defineProps<{
centerBtn?: boolean,
modalId: string,
gray?: boolean
gray?: boolean,
}>();
</script>
4 changes: 2 additions & 2 deletions src/pages/DetailInfo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</div>
</div>
<div class="p-40">
<div class="bg-base-200 w-750 p-40 shadow-lg rounded-xl flex-col justify-center items-center hover:shadow-2xl hover:-translate-y-2 transform duration-700">
<div class="bg-base-200 w-750 p-40 shadow-lg rounded-xl flex-col justify-center items-center hover:shadow-2xl hover:-translate-y-2 transform duration-700 ">
<div class="flex-col justify-center">
<el-skeleton :loading="loading" :rows="1" animated style="height: 60px">
<template #default>
Expand Down Expand Up @@ -321,7 +321,7 @@ const addQuestion = () => {
content: '',
img: '',
serial_num: 3
},
}
],
other_option: setting.isOtherOptions,
question_type: selectedOption.value,
Expand Down
9 changes: 5 additions & 4 deletions src/pages/DetailInfo/radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
<div class="flex-col p-5 overflow-y-auto h-180 mt-10" ref="scrollContainer" style="scroll-behavior: smooth;">
<div v-for="item in localOptions" :key="item.serial_num" class="flex items-center gap-10 my-5">
<input type="radio" :name="props.serial_num" class="radio-sm my-5" />
<input type="text" class="input input-bordered h-40 shadow-md" placeholder="option" v-model="item.content" />
<input type="text" class="input input-bordered h-40 shadow-md" placeholder="option" v-model="item.content" />
<div class="ml-10 flex items-center gap-20">
<div v-if="item.img" class="mt-4">
<img :src="item.img" alt="Preview" style="max-width: 50px; max-height: 50px;" />
</div>
<input type="file" class="file-input file-input-bordered file-input-sm w-7/12" @change="handleFileChange($event, item.serial_num)" />
</div>
<button class="btn btn-error btn-sm shadow-md" @click="deleteOption(item.serial_num)">删除</button>
<button class="btn btn-error btn-sm shadow-md" @click="deleteOption(item.serial_num);">删除</button>
</div>
</div>
<div class="divider"></div>
Expand Down Expand Up @@ -108,6 +108,7 @@ const addOption = () => {
scrollContainer.value!.scrollTop = scrollContainer.value!.scrollHeight;
}
});
emits('update:options', localOptions)
console.log(localOptions.value)
};
Expand All @@ -118,7 +119,7 @@ const deleteOption = (serial_num: number) => {
item.serial_num -= 1;
}
});
emits('update:options', localOptions.value);
console.log(localOptions.value)
};
// Watchers to sync local state with props
Expand Down Expand Up @@ -167,7 +168,7 @@ watch(localOtherOption, (newOtherOption) => {
emits('update:otherOption', newOtherOption);
});
watch(localOptions.value, (newOptions) => {
watch(localOptions, (newOptions) => {
console.log(localOptions.value)
emits('update:options', newOptions);
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/View/checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<span class="lg:text-xl md:text-md flex gap-5 items-center" >{{ props.title }} <el-tag type="primary" class="ml-5">多选</el-tag> <el-tag type="warning" v-if="!required">选答</el-tag> <el-tag type="danger" v-if="localUnique">唯一</el-tag></span>
</div>
<div class="flex items-center mt-15 ml-10">
<span class="text-sm text-gray-500">{{ props.describe }}</span>
<pre class="text-sm text-gray-500">{{ props.describe }}</pre>
</div>
</div>
<div class="flex-col justify-center items-center">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/View/fill.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</span>
</div>
<div class="flex items-center mt-15 ml-10">
<span class="text-sm text-gray-500">{{ describe }}</span>
<pre class="text-sm text-gray-500">{{ describe }}</pre>
</div>
</div>
<div class="flex-col justify-center items-center"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/View/radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<span class="lg:text-xl md:text-md flex gap-5 items-center" >{{ props.title }} <el-tag type="primary" class="ml-5">单选</el-tag> <el-tag type="warning" v-if="!required">选答</el-tag> <el-tag type="danger" v-if="localUnique">唯一</el-tag></span>
</div>
<div class="flex items-center mt-15 ml-10">
<span class="text-sm text-gray-500">{{ props.describe }}</span>
<pre class="text-sm text-gray-500">{{ props.describe }}</pre>
</div>
</div>
<div class="flex-col justify-center items-center">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/View/textArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</span>
</div>
<div class="flex items-center mt-15 ml-10">
<span class="text-sm text-gray-500">{{ describe }}</span>
<pre class="text-sm text-gray-500">{{ describe }}</pre>
</div>
</div>
<div class="flex-col justify-center items-center"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/View/view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="flex gap-20 my-10 justify-center"><span class="text-4xl break-all px-50">{{ formData.title }}</span></div>
<div class="items-top my-10 items-start mx-20" v-if="formData.desc !== ''">
<div class="items-top my-10 items-start ">
<div class="text-gray-500 flex break-all text-xl" >{{ formData.desc }}</div>
<pre class="text-gray-500 flex break-all text-xl" >{{ formData.desc }}</pre>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
server:{
proxy:{
'/api':{
target:"https://phlin.top",
target:"https://qa.qianqianzyk.top",
changeOrigin: true,
rewrite:(path) => path.replace(/^\/api/,'')
}
Expand Down

0 comments on commit fcbf2c8

Please sign in to comment.