|
@@ -1,8 +1,7 @@
|
|
|
<!-- 选择 -> 拖拽 -->
|
|
|
<template>
|
|
|
<div
|
|
|
- class="select-drag"
|
|
|
- :class="[isPhone ? 'select-drag-phone' : '']"
|
|
|
+ class="select-drag select-drag-phone"
|
|
|
v-if="curQue && judgeAnswer == 'standardAnswer' ? IsError : true"
|
|
|
>
|
|
|
<!-- 选项 -->
|
|
@@ -74,7 +73,8 @@
|
|
|
:style="{
|
|
|
'grid-template': item.isSpace
|
|
|
? ''
|
|
|
- : `repeat(${item.wordsList.length}, auto) / repeat(${item.wordsList.length}, auto)`
|
|
|
+ : `repeat(${item.wordsList.length}, auto) / repeat(${item.wordsList.length}, auto)`,
|
|
|
+ fontSize: baseSizePhone + 2 + 'px'
|
|
|
}"
|
|
|
>
|
|
|
<!-- 空格 -> 拖拽 -->
|
|
@@ -108,18 +108,31 @@
|
|
|
:key="`${isPyTop ? 'pinyin' : 'chs'}-${k}`"
|
|
|
:class="[`${isPyTop ? 'pinyin' : 'chs'}`]"
|
|
|
v-text="isPyTop ? pinyin : chs"
|
|
|
+ :style="{
|
|
|
+ fontSize: isPyTop
|
|
|
+ ? baseSizePhone + 'px'
|
|
|
+ : baseSizePhone + 2 + 'px'
|
|
|
+ }"
|
|
|
/>
|
|
|
<span
|
|
|
v-for="({ chs, pinyin }, k) in item.dragList[0].wordsList"
|
|
|
:key="`${isPyTop ? 'chs' : 'pinyin'}-${k}`"
|
|
|
:class="[`${isPyTop ? 'chs' : 'pinyin'}`]"
|
|
|
v-text="isPyTop ? chs : pinyin"
|
|
|
+ :style="{
|
|
|
+ fontSize: isPyTop
|
|
|
+ ? baseSizePhone + 2 + 'px'
|
|
|
+ : baseSizePhone + 'px'
|
|
|
+ }"
|
|
|
/>
|
|
|
</template>
|
|
|
<span
|
|
|
v-else
|
|
|
:class="['chs']"
|
|
|
v-text="item.dragList[0].sentence"
|
|
|
+ :style="{
|
|
|
+ fontSize: baseSizePhone + 2 + 'px'
|
|
|
+ }"
|
|
|
/>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -130,6 +143,11 @@
|
|
|
v-for="({ chs, pinyin }, k) in item.wordsList"
|
|
|
:key="`${isPyTop ? 'pinyin' : 'chs'}-${k}`"
|
|
|
:class="[`${isPyTop ? 'pinyin' : 'chs'}`]"
|
|
|
+ :style="{
|
|
|
+ fontSize: isPyTop
|
|
|
+ ? baseSizePhone + 'px'
|
|
|
+ : baseSizePhone + 2 + 'px'
|
|
|
+ }"
|
|
|
>
|
|
|
{{ isPyTop ? pinyin : chs }}
|
|
|
</span>
|
|
@@ -137,11 +155,22 @@
|
|
|
v-for="({ chs, pinyin }, k) in item.wordsList"
|
|
|
:key="`${isPyTop ? 'chs' : 'pinyin'}-${k}`"
|
|
|
:class="[`${isPyTop ? 'chs' : 'pinyin'}`]"
|
|
|
+ :style="{
|
|
|
+ fontSize: isPyTop
|
|
|
+ ? baseSizePhone + 2 + 'px'
|
|
|
+ : baseSizePhone + 'px'
|
|
|
+ }"
|
|
|
>
|
|
|
{{ isPyTop ? chs : pinyin }}
|
|
|
</span>
|
|
|
</template>
|
|
|
- <span :class="['chs']" v-else>
|
|
|
+ <span
|
|
|
+ :class="['chs']"
|
|
|
+ v-else
|
|
|
+ :style="{
|
|
|
+ fontSize: baseSizePhone + 2 + 'px'
|
|
|
+ }"
|
|
|
+ >
|
|
|
{{ item.sentence }}
|
|
|
</span>
|
|
|
</span>
|
|
@@ -172,9 +201,8 @@ export default {
|
|
|
type: String,
|
|
|
required: true
|
|
|
},
|
|
|
- isPhone: {
|
|
|
- type: Boolean,
|
|
|
- required: true
|
|
|
+ baseSizePhone: {
|
|
|
+ type: Number
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -459,7 +487,7 @@ export default {
|
|
|
|
|
|
&-options {
|
|
|
width: 100%;
|
|
|
- background-color: #f7f7f7;
|
|
|
+ // background-color: #f7f7f7;
|
|
|
border: 1px solid #dedede;
|
|
|
border-radius: 8px;
|
|
|
padding: 24px;
|
|
@@ -467,15 +495,15 @@ export default {
|
|
|
.draggable-options {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
- column-gap: 16px;
|
|
|
- row-gap: 24px;
|
|
|
+ column-gap: 6px;
|
|
|
+ row-gap: 6px;
|
|
|
|
|
|
.drag-option {
|
|
|
- min-width: 96px;
|
|
|
+ min-width: 66px;
|
|
|
// height: 58px;
|
|
|
text-align: center;
|
|
|
- padding: 8px 12px;
|
|
|
- background-color: #fff;
|
|
|
+ padding: 4px 10px;
|
|
|
+ // background-color: #fff;
|
|
|
border: 1px solid #dedede;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
@@ -485,13 +513,13 @@ export default {
|
|
|
.select-drag-options {
|
|
|
padding: 10px;
|
|
|
.draggable-options {
|
|
|
- gap: 10px;
|
|
|
+ gap: 6px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
&-sentences {
|
|
|
.drag-sentence {
|
|
|
- margin-top: 24px;
|
|
|
+ margin-top: 10px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
flex-flow: wrap;
|
|
@@ -525,10 +553,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
&-item {
|
|
|
- padding: 8px 12px;
|
|
|
+ padding: 4px 10px;
|
|
|
// height: 58px;
|
|
|
- height: 42px;
|
|
|
- background-color: #fff;
|
|
|
+ min-height: 34px;
|
|
|
+ // background-color: #fff;
|
|
|
border: 1px solid #dedede;
|
|
|
border-radius: 8px;
|
|
|
margin-left: 4px;
|
|
@@ -544,7 +572,7 @@ export default {
|
|
|
|
|
|
&.space {
|
|
|
min-width: 96px;
|
|
|
- background-color: #f1f1f1;
|
|
|
+ // background-color: #f1f1f1;
|
|
|
}
|
|
|
|
|
|
.drag-list {
|