|
@@ -13,19 +13,25 @@
|
|
|
<el-input
|
|
|
:key="j"
|
|
|
v-model="li.content"
|
|
|
- :style="[{ width: Math.max(80, li.content.length * 21.3) + 'px' }, { 'font-family': fontFamily }]"
|
|
|
+ :class="[data.property.fill_font]"
|
|
|
+ :style="[{ width: Math.max(80, li.content.length * 21.3) + 'px' }]"
|
|
|
/>
|
|
|
</template>
|
|
|
</template>
|
|
|
</p>
|
|
|
</div>
|
|
|
- <SoundRecord ref="record" type="normal" class="record-box" />
|
|
|
+ <SoundRecord
|
|
|
+ v-if="isEnable(data.property.is_enable_voice_answer)"
|
|
|
+ ref="record"
|
|
|
+ type="normal"
|
|
|
+ class="record-box"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getFillData, fillFontList, arrangeTypeList } from '@/views/book/courseware/data/fill';
|
|
|
+import { getFillData, fillFontList, arrangeTypeList, audioPositionList } from '@/views/book/courseware/data/fill';
|
|
|
|
|
|
import PreviewMixin from '../common/PreviewMixin';
|
|
|
import AudioFill from './components/AudioFillPlay.vue';
|
|
@@ -67,14 +73,24 @@ export default {
|
|
|
methods: {
|
|
|
getMainStyle() {
|
|
|
const isRow = this.data.property.arrange_type === arrangeTypeList[0].value;
|
|
|
+ const isFront = this.data.property.audio_position === audioPositionList[0].value;
|
|
|
+ const isEnableVoice = this.data.property.is_enable_voice_answer === 'true';
|
|
|
+ let _list = [
|
|
|
+ { name: 'audio', value: '24px' },
|
|
|
+ { name: 'fill', value: '1fr' },
|
|
|
+ ];
|
|
|
+ if (!isFront) {
|
|
|
+ _list = _list.reverse();
|
|
|
+ }
|
|
|
+ let grid = isRow
|
|
|
+ ? `"${_list[0].name} ${_list[1].name}${isEnableVoice ? ' record' : ''}" auto / ${_list[0].value} ${_list[1].value}${isEnableVoice ? ' 160px' : ''}`
|
|
|
+ : `"${_list[0].name}" ${_list[0].value} "${_list[1].name}" ${_list[1].value}${isEnableVoice ? `" record" 32px ` : ''} / 1fr`;
|
|
|
let style = {
|
|
|
- 'flex-direction': isRow ? 'row' : 'column',
|
|
|
+ 'grid-auto-flow': isRow ? 'column' : 'row',
|
|
|
+ 'column-gap': isRow ? '16px' : undefined,
|
|
|
+ 'row-gap': isRow ? undefined : '8px',
|
|
|
+ grid,
|
|
|
};
|
|
|
- if (isRow) {
|
|
|
- style['column-gap'] = '16px';
|
|
|
- } else {
|
|
|
- style['row-gap'] = '8px';
|
|
|
- }
|
|
|
return style;
|
|
|
},
|
|
|
},
|
|
@@ -88,12 +104,12 @@ export default {
|
|
|
@include preview-base;
|
|
|
|
|
|
.main {
|
|
|
- display: flex;
|
|
|
- align-items: flex-start;
|
|
|
+ display: grid;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.fill-wrapper {
|
|
|
- flex: 1;
|
|
|
+ grid-area: fill;
|
|
|
font-size: 16pt;
|
|
|
|
|
|
p {
|
|
@@ -106,6 +122,18 @@ export default {
|
|
|
width: 120px;
|
|
|
margin: 0 2px;
|
|
|
|
|
|
+ &.pinyin :deep input.el-input__inner {
|
|
|
+ font-family: 'PINYIN-B', sans-serif;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.chinese :deep input.el-input__inner {
|
|
|
+ font-family: 'arial', sans-serif;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.english :deep input.el-input__inner {
|
|
|
+ font-family: 'arial', sans-serif;
|
|
|
+ }
|
|
|
+
|
|
|
:deep input.el-input__inner {
|
|
|
padding: 0;
|
|
|
font-size: 16pt;
|