|
@@ -3,19 +3,26 @@
|
|
|
<template #content>
|
|
|
<!-- eslint-disable max-len -->
|
|
|
<div class="fill-wrapper">
|
|
|
- <el-input v-model="data.character" :placeholder="'汉字'" style="flex-shrink: 0; width: 80px" />
|
|
|
- <el-input
|
|
|
- v-model="data.content"
|
|
|
- placeholder="拼音间用空格隔开,如:ni3 hao3"
|
|
|
- @blur="handleItemAnswer(data)"
|
|
|
- @change="changePinyin(data)"
|
|
|
- />
|
|
|
- <el-input
|
|
|
- v-model="matically_pinyin_str[data.mark]"
|
|
|
- :placeholder="'拼音预览'"
|
|
|
- :readonly="true"
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <div class="content-box">
|
|
|
+ <el-input
|
|
|
+ v-if="data.property.audio_generation_method === 'auto'"
|
|
|
+ v-model="data.character"
|
|
|
+ :placeholder="'汉字'"
|
|
|
+ style="flex-shrink: 0; width: 80px"
|
|
|
+ />
|
|
|
+ <el-input
|
|
|
+ v-model="data.content"
|
|
|
+ placeholder="拼音间用空格隔开,如:ni3 hao3"
|
|
|
+ @blur="handleItemAnswer(data)"
|
|
|
+ @change="changePinyin(data)"
|
|
|
+ />
|
|
|
+ <el-input
|
|
|
+ v-model="matically_pinyin_str[data.mark]"
|
|
|
+ :placeholder="'拼音预览'"
|
|
|
+ :readonly="true"
|
|
|
+ style="width: 200px"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div v-if="data.audio_file_id">
|
|
|
<SoundRecord :wav-blob.sync="data.audio_file_id" />
|
|
|
</div>
|
|
@@ -62,6 +69,14 @@ export default {
|
|
|
UploadAudio,
|
|
|
},
|
|
|
mixins: [ModuleMixin],
|
|
|
+ watch: {
|
|
|
+ 'data.property.answer_mode': {
|
|
|
+ handler(val) {
|
|
|
+ this.handleChangeType();
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
data: getPinyinBaseData(),
|
|
@@ -158,6 +173,7 @@ export default {
|
|
|
this.res_arr = [];
|
|
|
this.$set(this.matically_pinyin_obj, item.mark, []);
|
|
|
this.$set(this.matically_pinyin_str, item.mark, '');
|
|
|
+ this.data.answer.answer_list = [];
|
|
|
content_arr.forEach((items, index) => {
|
|
|
let items_trim = items.trim();
|
|
|
if (items_trim) {
|
|
@@ -192,7 +208,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- this.data.answer.answer_list[0].value = select_item.split(' ');
|
|
|
+ let obj = {
|
|
|
+ mark: item.mark,
|
|
|
+ value: select_item.split(' '),
|
|
|
+ };
|
|
|
+ this.data.answer.answer_list.push(obj);
|
|
|
item.content_view = content_preview.trim().split(' ');
|
|
|
// item.matically_pinyin = matically_pinyin.trim().split(' ').join(',');
|
|
|
},
|
|
@@ -202,7 +222,7 @@ export default {
|
|
|
},
|
|
|
// 修改拼音
|
|
|
changePinyin(item) {
|
|
|
- if (this.data.other.audio_generation_method === 'auto') {
|
|
|
+ if (this.data.property.audio_generation_method === 'auto') {
|
|
|
item.audio_file_id = '';
|
|
|
}
|
|
|
},
|
|
@@ -286,4 +306,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.content-box {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 8px;
|
|
|
+}
|
|
|
</style>
|