qiushang 1 vuosi sitten
vanhempi
commit
3de619e123
2 muutettua tiedostoa jossa 13 lisäystä ja 7 poistoa
  1. 1 1
      src/renderer/components/header.vue
  2. 12 6
      src/renderer/components/home.vue

+ 1 - 1
src/renderer/components/header.vue

@@ -73,7 +73,7 @@
 				</div>
 				<div class="font-12" style="padding: 20px; margin-bottom: 10px;">
 					<div style="text-align: center; margin-bottom: 30px;">
-						<p class="font-13">试用时限制文件大小为200KB</p>
+						<p class="font-13">试用时文字限制在20个以内</p>
 						<p style="font-size: 20px; font-weight: 600; color: #000000;">开通会员即享以下权益</p>
 					</div>
 					<el-row :gutter="20" class="micon-list">

+ 12 - 6
src/renderer/components/home.vue

@@ -28,11 +28,11 @@
 					<div style="padding: 15px 20px 0 20px; height: calc(100% - 150px);">
 						<el-row :gutter="20" style="height: 100%;" v-if="pinyinType == 1">
 							<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 :span="12" style="height: 100%;">
 								<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-row>
 						
@@ -133,7 +133,7 @@
 							</div>
 							<div class="set-item">
 								<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 class="set-item">
@@ -144,7 +144,7 @@
 								</el-popover>
 							</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>
 					</div>
 
@@ -419,9 +419,14 @@
 				this.pinSetting.separator = this.separator == '' ? ' ' : this.separator;
 				if(this.pinBuild == 1){ // 上下结构
 					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">&nbsp;</span>');
 					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(/rt/g, 'span');
 					this.txtHtml = htmls;
@@ -584,6 +589,7 @@
 							let htmls = html(data, {toneType : this.pinSetting.toneType, wrapNonChinese: true});
 							htmls = htmls.replace(/py-non-chinese-item"> <\/span>/g, 'py-non-chinese-item">&nbsp;</span>');
 							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;
 						}else{
 							outContent = pinyin(data, this.pinSetting);
@@ -762,7 +768,7 @@
 	}
 	
 	.set-item{
-		margin-right: 20px;
+		margin-right: 15px;
 		
 		.set-title{
 			font-size: 13px;