diff --git a/src/pages/ques/detail/index.vue b/src/pages/ques/detail/index.vue index 508788e..0071d1f 100644 --- a/src/pages/ques/detail/index.vue +++ b/src/pages/ques/detail/index.vue @@ -102,7 +102,7 @@ @@ -194,6 +194,8 @@ export default { opts.map(m => { m.answer = 0 }) + } else if (type === 'fill_blank') { // 填空题 + n.stem = this.getQuesStem(n) } else { // 简答题 n.answer = '' // 附件 @@ -313,7 +315,7 @@ export default { let result = stem while ((match = regex.exec(stem)) !== null) { - const newInput = `` + const newInput = `${fills && fills.length ? fills[index] : ''}` result = result.replace(match[0], newInput) index++ } @@ -663,18 +665,22 @@ export default { } .fill-input { - width: 100px; + position: relative; + display: inline; + min-width: 50px; height: 28px; - padding: 0 15px; + padding: 3px; margin: 0 10px; - font-size: 13px; + font-size: 14px; line-height: 28px; - color: #606266; - border: 1px solid #DCDEE0; - border-radius: 2px; + color: #333; + border: 0; + border-bottom: 1px solid #DCDEE0; + outline: none; - &:focus { - outline: none; + &:empty { + display: inline-block; + width: 3em; } }