Просмотр исходного кода

:art: 意思下拉菜单加底色

visuddhinanda 5 лет назад
Родитель
Сommit
76c03eef0c
2 измененных файлов с 21 добавлено и 7 удалено
  1. 9 1
      app/studio/editor.php
  2. 12 6
      app/studio/js/editor.js

+ 9 - 1
app/studio/editor.php

@@ -242,7 +242,14 @@ else{$currDevice="computer";}
 		margin: 0 15px 0 -8px;
 	}
 	.translate_sent_head_toolbar {
-	display: none;
+		display: none;
+	}
+	div#input_org_select .case_dropbtn {
+		background-color: rgb(127 127 127 / 20%);
+		padding: 0 6px;
+		border-radius: 4px;
+		min-width: 1em;
+		min-height: 1.3em;
 	}
 	</style>
 	<link type="text/css" rel="stylesheet" href="css/print.css" media="print" />
@@ -686,6 +693,7 @@ foreach($plugin_list as $info){
 					</div>				
 				</div>
 				<!-- 拆分意思 -->
+
 				<div class="edit_detail_p" >
 					<guide gid="studio_part_meaning"></guide>
 					<span class="edit_detail_span"><?php echo $_local->gui->partmeaning;?>:</span>

+ 12 - 6
app/studio/js/editor.js

@@ -3554,21 +3554,27 @@ function getMeaningMenuList(index, word) {
 	} else {
 		currMeaningList.push("↓↓");
 	}
-	for (MeaningList_i in currMeaningList0) {
-		currMeaningList.push(currMeaningList0[MeaningList_i]);
+	for (const iterator of currMeaningList0) {
+		if (iterator != "") {
+			currMeaningList.push(iterator);
+		}
 	}
+
 	var output = "";
 	output += "<div class=\"case_dropdown\" style='display:inline-block;'>";
 
+	let currMean;
 	output += "<p id='org_part_mean_" + index + "' class='case_dropbtn' >";
 	if (g_initPartMeaning) {
-		output += currMeaningList[0];
-
+		currMean = currMeaningList[0];
 		g_arrPartMean[index] = currMeaningList[0];
 	} else {
-		output += g_arrPartMean[index];
+		currMean = g_arrPartMean[index];
+	}
+	if (currMean == "") {
+		currMean = "↓↓";
 	}
-	output += "</p>";
+	output += currMean + "</p>";
 
 	output += '<div class="case_dropdown-content" id=\'part_mean_menu_' + index + "'>";
 	//直列菜单