|
@@ -28,11 +28,11 @@
|
|
<div style="padding: 15px 20px 0 20px; height: calc(100% - 150px);">
|
|
<div style="padding: 15px 20px 0 20px; height: calc(100% - 150px);">
|
|
<el-row :gutter="20" style="height: 100%;" v-if="pinyinType == 1">
|
|
<el-row :gutter="20" style="height: 100%;" v-if="pinyinType == 1">
|
|
<el-col :span="12" style="height: 100%;">
|
|
<el-col :span="12" style="height: 100%;">
|
|
- <el-input style="height: 100%; font-size: 20px;" type="textarea" placeholder="请输入文字内容" v-model="txt1" @input="inputChange"></el-input>
|
|
|
|
|
|
+ <el-input style="height: 100%; font-size: 20px;" type="textarea" placeholder="请输入需要注音的文字内容" v-model="txt1" @input="inputChange"></el-input>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12" style="height: 100%;">
|
|
<el-col :span="12" style="height: 100%;">
|
|
<div class="outarea" v-html="txtHtml" v-if="pinBuild == 1"></div>
|
|
<div class="outarea" v-html="txtHtml" v-if="pinBuild == 1"></div>
|
|
- <el-input class="outtext" v-if="pinBuild == 2" type="textarea" placeholder="请输入文字内容" v-model="txtHtml"></el-input>
|
|
|
|
|
|
+ <el-input class="outtext" v-if="pinBuild == 2" type="textarea" readonly v-model="txtHtml"></el-input>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
@@ -133,7 +133,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="set-item">
|
|
<div class="set-item">
|
|
<span class="set-title">分隔符:</span>
|
|
<span class="set-title">分隔符:</span>
|
|
- <el-input type="text" maxlength="5" :show-word-limit="true" v-model="separator" size="small" placeholder="默认为空格" style="width:125px;" @input="dataChange"></el-input>
|
|
|
|
|
|
+ <el-input type="text" maxlength="4" :show-word-limit="true" v-model="separator" size="small" placeholder="默认为空格" style="width:125px;" @input="dataChange"></el-input>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="set-item">
|
|
<div class="set-item">
|
|
@@ -144,7 +144,7 @@
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <el-button type="danger" class="export-btn" @click="exportFile()" :loading="loading">开始注音</el-button>
|
|
|
|
|
|
+ <el-button type="danger" class="export-btn" @click="exportFile()" :loading="loading">导出注音</el-button>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -419,9 +419,14 @@
|
|
this.pinSetting.separator = this.separator == '' ? ' ' : this.separator;
|
|
this.pinSetting.separator = this.separator == '' ? ' ' : this.separator;
|
|
if(this.pinBuild == 1){ // 上下结构
|
|
if(this.pinBuild == 1){ // 上下结构
|
|
let htmls = html(val, {toneType : this.pinSetting.toneType, wrapNonChinese: true});
|
|
let htmls = html(val, {toneType : this.pinSetting.toneType, wrapNonChinese: true});
|
|
|
|
+
|
|
|
|
+ // htmls = htmls.replace(/rp>/g, 'span>');
|
|
|
|
+ // htmls = htmls.replace(/<rt class/g, '<span class');
|
|
|
|
+ // htmls = htmls.replace(/<\/rt>/g, '</span>');
|
|
|
|
+
|
|
htmls = htmls.replace(/py-non-chinese-item"> <\/span>/g, 'py-non-chinese-item"> </span>');
|
|
htmls = htmls.replace(/py-non-chinese-item"> <\/span>/g, 'py-non-chinese-item"> </span>');
|
|
htmls = htmls.replace(/py-non-chinese-item">\n<\/span>/g, 'py-non-chinese-item">\n</span><br>');
|
|
htmls = htmls.replace(/py-non-chinese-item">\n<\/span>/g, 'py-non-chinese-item">\n</span><br>');
|
|
- htmls = htmls.replace(/<\/span><span class="py-result-item">/g, '</span>'+this.separator+'<span class="py-result-item">');
|
|
|
|
|
|
+ htmls = htmls.replace(/<\/span><span class="py-result-item">/g, '</span>'+this.pinSetting.separator+'<span class="py-result-item">');
|
|
// htmls = htmls.replace(/rp/g, 'span');
|
|
// htmls = htmls.replace(/rp/g, 'span');
|
|
// htmls = htmls.replace(/rt/g, 'span');
|
|
// htmls = htmls.replace(/rt/g, 'span');
|
|
this.txtHtml = htmls;
|
|
this.txtHtml = htmls;
|
|
@@ -584,6 +589,7 @@
|
|
let htmls = html(data, {toneType : this.pinSetting.toneType, wrapNonChinese: true});
|
|
let htmls = html(data, {toneType : this.pinSetting.toneType, wrapNonChinese: true});
|
|
htmls = htmls.replace(/py-non-chinese-item"> <\/span>/g, 'py-non-chinese-item"> </span>');
|
|
htmls = htmls.replace(/py-non-chinese-item"> <\/span>/g, 'py-non-chinese-item"> </span>');
|
|
htmls = htmls.replace(/py-non-chinese-item">\n<\/span>/g, 'py-non-chinese-item">\n</span><br>');
|
|
htmls = htmls.replace(/py-non-chinese-item">\n<\/span>/g, 'py-non-chinese-item">\n</span><br>');
|
|
|
|
+ htmls = htmls.replace(/<\/span><span class="py-result-item">/g, '</span>'+this.pinSetting.separator+'<span class="py-result-item">');
|
|
outContent = htmls;
|
|
outContent = htmls;
|
|
}else{
|
|
}else{
|
|
outContent = pinyin(data, this.pinSetting);
|
|
outContent = pinyin(data, this.pinSetting);
|
|
@@ -762,7 +768,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.set-item{
|
|
.set-item{
|
|
- margin-right: 20px;
|
|
|
|
|
|
+ margin-right: 15px;
|
|
|
|
|
|
.set-title{
|
|
.set-title{
|
|
font-size: 13px;
|
|
font-size: 13px;
|