|
|
@@ -77,15 +77,17 @@
|
|
|
<CheckWord :data="wordData" @saveWord="saveWord" />
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-button
|
|
|
- v-show="isEnable(data.property.view_pinyin)"
|
|
|
- style="margin-left: 10px"
|
|
|
- class="btn"
|
|
|
- @click.native="generatPinyin"
|
|
|
- >生成拼音</el-button
|
|
|
- >
|
|
|
-
|
|
|
- <el-divider v-if="isEnable(data.property.view_pinyin)" content-position="left">拼音效果</el-divider>
|
|
|
+ <el-divider v-if="isEnable(data.property.view_pinyin)" content-position="left">
|
|
|
+ 拼音效果
|
|
|
+ <el-button
|
|
|
+ v-show="isEnable(data.property.view_pinyin)"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ title="刷新"
|
|
|
+ class="refresh-pinyin-btn"
|
|
|
+ @click.native="generatPinyin"
|
|
|
+ />
|
|
|
+ </el-divider>
|
|
|
<PinyinText
|
|
|
v-if="isEnable(data.property.view_pinyin)"
|
|
|
:id="richId + '_pinyin_text'"
|
|
|
@@ -197,21 +199,21 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- uploads(file_id, index, file_url) {
|
|
|
+ uploads(file_id, file_url) {
|
|
|
this.data.audio_file_id = file_id;
|
|
|
},
|
|
|
- deleteFiles(index) {
|
|
|
+ deleteFiles() {
|
|
|
this.data.audio_file_id = '';
|
|
|
},
|
|
|
// 生成音频
|
|
|
- handleMatic(con, index) {
|
|
|
+ handleMatic(con) {
|
|
|
TextToAudioFile({
|
|
|
text: con.replace(/<[^>]+>/g, ''),
|
|
|
voice_type: this.data.property.voice_type,
|
|
|
emotion: this.data.property.emotion,
|
|
|
speed_ratio: this.data.property.speed_ratio,
|
|
|
})
|
|
|
- .then(({ status, file_id, file_url }) => {
|
|
|
+ .then(({ status, file_id }) => {
|
|
|
if (status === 1) {
|
|
|
this.data.audio_file_id = file_id;
|
|
|
}
|
|
|
@@ -220,7 +222,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async saveWord(saveArr) {
|
|
|
- const text = this.data.content.replace(/<[^>]+>/g, '');
|
|
|
+ // const text = this.data.content.replace(/<[^>]+>/g, '');
|
|
|
await this.createParsedTextInfoPinyin(null, null, saveArr);
|
|
|
this.showWordFlag = false;
|
|
|
},
|
|
|
@@ -248,8 +250,8 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let styles = this.$refs.richText.getFirstCharStyles();
|
|
|
- let content = this.$refs.richText.getRichContent();
|
|
|
- let text = content.replace(/<[^>]+>/g, '');
|
|
|
+ // let content = this.$refs.richText.getRichContent();
|
|
|
+ // let text = content.replace(/<[^>]+>/g, '');
|
|
|
this.createParsedTextInfoPinyin(null, styles);
|
|
|
},
|
|
|
showSetting() {
|
|
|
@@ -498,4 +500,17 @@ export default {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.refresh-pinyin-btn {
|
|
|
+ cursor: pointer;
|
|
|
+ outline: none;
|
|
|
+
|
|
|
+ &:focus {
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:active {
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|