|
@@ -46,12 +46,11 @@
|
|
|
<el-input
|
|
|
v-model="li.text"
|
|
|
:disabled="disabled"
|
|
|
+ type="textarea"
|
|
|
class="fill"
|
|
|
+ resize="none"
|
|
|
placeholder="请输入"
|
|
|
- :style="[
|
|
|
- { cursor: disabled ? 'not-allowed' : 'pointer' },
|
|
|
- { width: Math.max(80, li.text.length * 12) + 'pt' },
|
|
|
- ]"
|
|
|
+ :style="[{ cursor: disabled ? 'not-allowed' : 'pointer' }]"
|
|
|
@blur="handleTone(li.text, i, j)"
|
|
|
/>
|
|
|
</template>
|
|
@@ -134,8 +133,9 @@ export default {
|
|
|
this.optionList.forEach((item) => {
|
|
|
item.forEach((li) => {
|
|
|
if (['input'].includes(li.type)) {
|
|
|
- let findIndex = this.answer.answer_list.findIndex(({ mark }) => mark === li.mark);
|
|
|
- if (findIndex === -1 && li.text.length <= 0) {
|
|
|
+ const findIndex = this.answer.answer_list.findIndex(({ mark }) => mark === li.mark);
|
|
|
+ if (findIndex === -1 && li.text.length <= 0) return;
|
|
|
+ if (findIndex !== -1 && li.text.length <= 0) {
|
|
|
this.answer.answer_list.splice(findIndex, 1);
|
|
|
return;
|
|
|
}
|
|
@@ -148,7 +148,6 @@ export default {
|
|
|
}
|
|
|
if (findIndex !== -1) {
|
|
|
this.answer.answer_list[findIndex].value = li.text;
|
|
|
- return;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -235,17 +234,16 @@ $table-border: 1px solid #e0e0e0;
|
|
|
overflow: auto;
|
|
|
|
|
|
.item-content {
|
|
|
+ flex: 1;
|
|
|
padding: 8px 12px;
|
|
|
}
|
|
|
|
|
|
- %input,
|
|
|
- .el-input.fill {
|
|
|
+ .el-textarea.fill {
|
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
|
- width: 120px;
|
|
|
margin: 0 2px;
|
|
|
|
|
|
- :deep input.el-input__inner {
|
|
|
+ :deep .el-textarea__inner {
|
|
|
padding: 0;
|
|
|
font-size: 16px;
|
|
|
color: $font-color;
|
|
@@ -253,15 +251,10 @@ $table-border: 1px solid #e0e0e0;
|
|
|
background-color: #fff;
|
|
|
border-width: 0;
|
|
|
border-radius: 0;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- .input {
|
|
|
- @extend %input;
|
|
|
-
|
|
|
- :deep input.el-input__inner {
|
|
|
- text-align: center;
|
|
|
- border-bottom: 1px solid $font-color;
|
|
|
+ &::placeholder {
|
|
|
+ line-height: 42px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|