Skip to content

Commit d08413c

Browse files
committed
fix: 解决 rightMenu.vue 合并冲突
2 parents 0ca205b + a34cdea commit d08413c

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/pages/DetailInfo/rightMenu.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<div class="bg-base-100 dark:bg-[#1A1A1A] flex-1">
33
<!-- 题型显示 -->
44
<div class="flex bg-base-200 dark:bg-customGray_shallow w-full opacity-0.6 items-center" style="height: 4vh;">
5-
<div v-if="activeSerial!==-1" class="text-red-400 dark:text-white pl-16 text-sm">
5+
<div v-if="questionList[activeSerial - 1]" class="text-red-400 dark:text-white pl-16 text-sm">
66
{{ typeChinese[currentType] }}
77
</div>
88
</div>
99

1010
<!-- 垂直间距 -->
1111
<div class="w-full" style="height: 2vh;" />
1212

13-
<div v-if="activeSerial!==-1" class="pl-16">
13+
<div v-if="questionList[activeSerial-1]" class="pl-16">
1414
<!-- 所有题型通用 -->
1515
<div class="text-sm font-medium">
1616
基础配置
@@ -42,6 +42,7 @@
4242
<div class="pt-16">
4343
<el-input
4444
v-model="questionList[activeSerial-1].description"
45+
type="textarea"
4546
style="width: 240px"
4647
placeholder="Please input"
4748
/>
@@ -100,6 +101,7 @@ import { basicReg } from "@/utilities/regs";
100101
import { storeToRefs } from "pinia";
101102
102103
const typeChinese = {
104+
0: "",
103105
1: "单项选择题",
104106
2: "多项选择题",
105107
3: "单行输入框",
@@ -123,7 +125,7 @@ const questionList = computed({
123125
}
124126
});
125127
126-
const currentType = computed<number>(() => {
128+
const currentType = computed<QuesItemType>(() => {
127129
if (activeSerial.value === -1) {
128130
return 0;
129131
} else {

src/stores/edit.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ function defaultSchema() {
3838
required: true,
3939
unique: false,
4040
otherOption: false,
41-
questionType: QuesItemType.RADIO
41+
questionType: QuesItemType.RADIO,
42+
minimumOption: 1,
43+
maximumOption: 1,
44+
reg: "^.*$"
4245
},
4346
options: [
4447
{

src/utilities/constMap.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ enum QuesType {
1010
}
1111

1212
enum QuesItemType {
13+
UNDEFINED = 0,
1314
RADIO = 1,
1415
CHECKBOX = 2,
1516
INPUT = 3,
1617
TEXTAREA = 4,
17-
PHOTO = 5
18+
PHOTO = 5,
19+
VOTE = 6
1820
}
1921

2022
export {

0 commit comments

Comments
 (0)