|
@@ -10,8 +10,10 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div class="set_title">
|
|
|
- <span>表单问题:</span><el-input v-model="checkJson.title" class="input" placeholder="请输入标题"></el-input>
|
|
|
+ <div class="set_title" style="align-items: flex-start;">
|
|
|
+ <span>表单问题:</span><textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
|
|
|
+ placeholder="请输入标题"></textarea>
|
|
|
+ <!-- <el-input v-model="checkJson.title" class="input" placeholder="请输入标题"></el-input> -->
|
|
|
</div>
|
|
|
<div class="set_title">
|
|
|
<span>题目分数:</span><el-input v-model="checkJson.score" class="input" placeholder="请输入分数" style="width: 120px" @change="numberPan"></el-input>
|
|
@@ -65,6 +67,21 @@ export default {
|
|
|
checkJson: {}
|
|
|
}
|
|
|
},
|
|
|
+ directives: {
|
|
|
+ autoHeight: {
|
|
|
+ update(el, binding) {
|
|
|
+ const { value } = binding
|
|
|
+ if (value && typeof value === 'number') {
|
|
|
+ el.style.height = `${value}px`
|
|
|
+ } else {
|
|
|
+ el.style.height = 'auto'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ componentUpdated(el) {
|
|
|
+ el.style.height = `${el.scrollHeight + 5}px`
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
watch: {
|
|
|
checkJson: {
|
|
|
handler(newVal) {
|
|
@@ -245,4 +262,36 @@ export default {
|
|
|
border-bottom: 10px solid #f6f6f6;
|
|
|
border-top: 10px solid transparent;
|
|
|
} */
|
|
|
+
|
|
|
+.binfo_input {
|
|
|
+ width: 100%;
|
|
|
+ margin: 0;
|
|
|
+ padding: 12px 14px;
|
|
|
+ display: block;
|
|
|
+ min-width: 0;
|
|
|
+ outline: none;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: none;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ background: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ resize: none;
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+ min-height: 48px;
|
|
|
+ /* border: 1px solid #3682fc00; */
|
|
|
+ border: 1px solid #CAD1DC;
|
|
|
+}
|
|
|
+
|
|
|
+.binfo_textarea {
|
|
|
+ border: 1px solid #CAD1DC;
|
|
|
+ font-size: 16px;
|
|
|
+ resize: none;
|
|
|
+ /* background: #f6f6f6; */
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+}
|
|
|
+
|
|
|
+.binfo_input:focus-visible {
|
|
|
+ border: 1px solid #3681FC !important;
|
|
|
+}
|
|
|
</style>
|