WordModelChs.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <!-- -->
  2. <template>
  3. <div v-if="curQue" class="NNPE-ArticleView">
  4. <div
  5. v-if="
  6. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  7. config.isHasPY ||
  8. config.isHasEN) &&
  9. curQue.property.mp3_position === 'top'
  10. "
  11. class="aduioLine-box aduioLine-practice-npc"
  12. >
  13. <div class="aduioLine-content">
  14. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  15. <AudioLine
  16. ref="audioLine"
  17. audio-id="artPhraseAudio"
  18. :mp3="curQue.mp3_list[0].url"
  19. :get-cur-time="getCurTime"
  20. :mp3-source="curQue.mp3_list[0].source"
  21. :width="colLength == 2 ? 200 : 700"
  22. :attrib="attrib"
  23. />
  24. </template>
  25. </div>
  26. <div class="aduioLine-right">
  27. <!-- <span
  28. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  29. @click="changePinyin"
  30. v-if="config.isHasPY"
  31. ></span>
  32. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  33. <SvgIcon
  34. v-if="config.isHasPY"
  35. icon-class="pin-btn"
  36. size="16"
  37. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  38. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  39. @click="changePinyin"
  40. />
  41. <SvgIcon
  42. v-if="config.isHasEN"
  43. icon-class="en-btn"
  44. size="16"
  45. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  46. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  47. @click="changeEN"
  48. />
  49. </div>
  50. </div>
  51. <template v-if="!config.isHasEN || (config.isHasEN && !config.isShowEN)">
  52. <template v-if="resArr.length > 0">
  53. <div class="NPC-sentences-list">
  54. <div
  55. v-for="(item, index) in resArr"
  56. :key="'detail' + index"
  57. :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
  58. >
  59. <div
  60. class="wordsList-box"
  61. :class="[
  62. curQue.detail[index].paragraphAttr
  63. ? 'wordsList-box-' + curQue.detail[index].paragraphAttr.paragraphAlign
  64. : '',
  65. ]"
  66. >
  67. <img v-if="articleImg[0] && index == 0" :src="articleImg[index]" />
  68. <div>
  69. <div
  70. v-for="(pItem, pIndex) in item.wordsList"
  71. :key="'wordsList' + pIndex"
  72. class="NNPE-words"
  73. :class="[
  74. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  75. pItem.chs == '“' ? 'textRight' : '',
  76. ]"
  77. >
  78. <template v-if="!pItem.width">
  79. <template v-if="pItem.isShow">
  80. <template
  81. v-if="
  82. item.wordsList[pIndex + 1] &&
  83. item.wordsList[pIndex + 1].chs &&
  84. chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1
  85. "
  86. >
  87. <span class="NNPE-words-box" @click="showWordDetail($event, pItem)">
  88. <span
  89. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  90. class="NNPE-pinyin"
  91. :class="[pItem.className ? pItem.className : '']"
  92. >{{ pItem.pinyin }}</span
  93. >
  94. <span
  95. class="NNPE-chs"
  96. :class="[
  97. item.timeList &&
  98. item.timeList[pItem.sentIndex] &&
  99. curTime >= item.timeList[pItem.sentIndex].bg &&
  100. curTime <= item.timeList[pItem.sentIndex].ed &&
  101. curTime
  102. ? 'active'
  103. : '',
  104. paraIndex == pItem.paraIndex &&
  105. sentIndex == pItem.sentIndex &&
  106. wordIndex == pItem.wordIndex
  107. ? 'wordActive'
  108. : '',
  109. ]"
  110. :style="{
  111. fontFamily: pItem.config.fontFamily,
  112. height: '28px',
  113. display: 'inline-block',
  114. backgroundColor:
  115. item.timeList &&
  116. item.timeList[pItem.sentIndex] &&
  117. curTime >= item.timeList[pItem.sentIndex].bg &&
  118. curTime <= item.timeList[pItem.sentIndex].ed &&
  119. curTime &&
  120. attrib
  121. ? attrib.assist_color
  122. : '',
  123. }"
  124. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
  125. >
  126. <span
  127. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  128. class="NNPE-pinyin"
  129. :class="[pItem.className ? pItem.className : '']"
  130. >{{ pItem.pinyin }}</span
  131. >
  132. </span>
  133. <span class="NNPE-words-box" @click="showWordDetail($event, item.wordsList[pIndex + 1])">
  134. <span
  135. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  136. class="NNPE-pinyin"
  137. style="text-align: left"
  138. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  139. >
  140. <span
  141. class="NNPE-chs"
  142. style="text-align: left"
  143. :class="[
  144. item.timeList &&
  145. item.timeList[pItem.sentIndex] &&
  146. curTime >= item.timeList[pItem.sentIndex].bg &&
  147. curTime <= item.timeList[pItem.sentIndex].ed &&
  148. curTime
  149. ? 'active'
  150. : '',
  151. ]"
  152. :style="{
  153. fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
  154. height: '28px',
  155. display: 'inline-block',
  156. backgroundColor:
  157. item.timeList &&
  158. item.timeList[pItem.sentIndex] &&
  159. curTime >= item.timeList[pItem.sentIndex].bg &&
  160. curTime <= item.timeList[pItem.sentIndex].ed &&
  161. curTime &&
  162. attrib
  163. ? attrib.assist_color
  164. : '',
  165. }"
  166. >{{
  167. NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
  168. ? item.wordsList[pIndex + 1].chs
  169. : ''
  170. }}</span
  171. >
  172. <span
  173. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  174. class="NNPE-pinyin"
  175. style="text-align: left"
  176. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  177. >
  178. </span>
  179. <span
  180. v-if="
  181. item.wordsList[pIndex + 2] &&
  182. item.wordsList[pIndex + 2].chs &&
  183. chsFhList.indexOf(item.wordsList[pIndex + 2].chs) > -1
  184. "
  185. class="NNPE-words-box"
  186. @click="showWordDetail($event, item.wordsList[pIndex + 2])"
  187. >
  188. <span
  189. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  190. :class="[
  191. 'NNPE-pinyin',
  192. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  193. ]"
  194. style="text-align: left"
  195. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  196. >
  197. <span
  198. class="NNPE-chs"
  199. style="text-align: left"
  200. :class="[
  201. item.timeList &&
  202. item.timeList[pItem.sentIndex] &&
  203. curTime >= item.timeList[pItem.sentIndex].bg &&
  204. curTime <= item.timeList[pItem.sentIndex].ed &&
  205. curTime
  206. ? 'active'
  207. : '',
  208. pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
  209. pItem.chstimeList &&
  210. pItem.chstimeList[pItem.leg - 1] &&
  211. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  212. curQue.wordTime &&
  213. curTime <= item.timeList[pItem.sentIndex].ed
  214. ? 'wordActive'
  215. : '',
  216. ]"
  217. :style="{
  218. fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
  219. height: '28px',
  220. display: 'inline-block',
  221. backgroundColor:
  222. item.timeList &&
  223. item.timeList[pItem.sentIndex] &&
  224. curTime >= item.timeList[pItem.sentIndex].bg &&
  225. curTime <= item.timeList[pItem.sentIndex].ed &&
  226. curTime &&
  227. attrib
  228. ? attrib.assist_color
  229. : '',
  230. }"
  231. >{{
  232. NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
  233. ? item.wordsList[pIndex + 2].chs
  234. : ''
  235. }}</span
  236. >
  237. <span
  238. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  239. :class="[
  240. 'NNPE-pinyin',
  241. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  242. ]"
  243. style="text-align: left"
  244. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  245. >
  246. </span>
  247. </template>
  248. <template v-else>
  249. <span
  250. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  251. class="NNPE-pinyin"
  252. :class="[
  253. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  254. pItem.className ? pItem.className : '',
  255. ]"
  256. >{{ pItem.pinyin }}</span
  257. >
  258. <span
  259. class="NNPE-chs"
  260. :class="[
  261. item.timeList &&
  262. item.timeList[pItem.sentIndex] &&
  263. curTime >= item.timeList[pItem.sentIndex].bg &&
  264. curTime <= item.timeList[pItem.sentIndex].ed &&
  265. curTime
  266. ? 'active'
  267. : '',
  268. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  269. ]"
  270. :style="{
  271. fontFamily: pItem.config.fontFamily,
  272. height: '28px',
  273. display: 'inline-block',
  274. backgroundColor:
  275. item.timeList &&
  276. item.timeList[pItem.sentIndex] &&
  277. curTime >= item.timeList[pItem.sentIndex].bg &&
  278. curTime <= item.timeList[pItem.sentIndex].ed &&
  279. curTime &&
  280. attrib
  281. ? attrib.assist_color
  282. : '',
  283. }"
  284. @click="showWordDetail($event, pItem)"
  285. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
  286. >
  287. <span
  288. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  289. class="NNPE-pinyin"
  290. :class="[
  291. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  292. pItem.className ? pItem.className : '',
  293. ]"
  294. >{{ pItem.pinyin }}</span
  295. >
  296. </template>
  297. </template>
  298. </template>
  299. <template v-else>
  300. <span
  301. :style="{
  302. height: pItem.height + 'px',
  303. width: pItem.width + 'px',
  304. }"
  305. ></span>
  306. </template>
  307. </div>
  308. </div>
  309. <div
  310. v-if="curQue.property.multilingual_position === 'para'"
  311. class="multilingual-para"
  312. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  313. >
  314. {{
  315. curQue.detail[index].multilingualTextList && curQue.detail[index].multilingualTextList[multilingual]
  316. ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
  317. : ''
  318. }}
  319. </div>
  320. <img v-if="articleImg[index + 1]" :src="articleImg[index + 1]" />
  321. </div>
  322. </div>
  323. <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
  324. {{ items }}
  325. </div> -->
  326. </div>
  327. </template>
  328. </template>
  329. <template v-else>
  330. <template v-if="resObj">
  331. <!-- -->
  332. <div class="NPC-sentences-list">
  333. <div
  334. v-for="(item, index) in resObj.sentList"
  335. :key="'detail' + index"
  336. :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
  337. >
  338. <div :class="['NNPE-details']">
  339. <div
  340. v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
  341. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  342. >
  343. {{ item.enwords }}
  344. </div>
  345. <div style="overflow: hidden; clear: both"></div>
  346. <div
  347. v-for="(pItem, pIndex) in item.sentArr"
  348. :key="'wordsList' + pIndex"
  349. class="NNPE-words"
  350. :class="[
  351. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  352. pItem.chs == '“' ? 'textRight' : '',
  353. ]"
  354. >
  355. <template v-if="!pItem.width">
  356. <template v-if="pItem.isShow">
  357. <template
  358. v-if="
  359. item.sentArr[pIndex + 1] &&
  360. item.sentArr[pIndex + 1].chs &&
  361. chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
  362. "
  363. >
  364. <span class="NNPE-words-box" @click="showWordDetail($event, pItem)">
  365. <template v-if="curQue.property.pinyin_position == 'top'">
  366. <span
  367. v-if="config.isShowPY"
  368. class="NNPE-pinyin"
  369. :class="[
  370. pItem.className ? pItem.className : '',
  371. sentIndex == index ? 'wordBlank' : '',
  372. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  373. ]"
  374. >{{ pItem.pinyin }}</span
  375. >
  376. </template>
  377. <span
  378. class="NNPE-chs"
  379. :class="[
  380. pItem.padding && config.isShowPY ? 'padding' : '',
  381. sentIndex == index ? 'wordBlank' : '',
  382. ]"
  383. >
  384. <template>
  385. <span
  386. v-for="(wItem, wIndex) in pItem.leg"
  387. :key="'ci' + wIndex + pIndex + index"
  388. :class="[]"
  389. :style="{
  390. fontFamily: pItem.config.fontFamily,
  391. height: '28px',
  392. display: 'inline-block',
  393. }"
  394. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  395. >
  396. </template>
  397. </span>
  398. <template v-if="curQue.property.pinyin_position == 'bottom'">
  399. <span
  400. v-if="config.isShowPY"
  401. class="NNPE-pinyin"
  402. :class="[
  403. pItem.className ? pItem.className : '',
  404. sentIndex == index ? 'wordBlank' : '',
  405. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  406. ]"
  407. >{{ pItem.pinyin }}</span
  408. >
  409. </template>
  410. </span>
  411. <span class="NNPE-words-box" @click="showWordDetail($event, item.sentArr[pIndex + 1])">
  412. <template v-if="curQue.property.pinyin_position == 'top'">
  413. <span
  414. v-if="config.isShowPY"
  415. :class="[
  416. 'NNPE-pinyin',
  417. sentIndex == index ? 'wordBlank' : '',
  418. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  419. ]"
  420. style="text-align: left"
  421. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  422. >
  423. </template>
  424. <span class="NNPE-chs" style="text-align: left">
  425. <span
  426. :class="[]"
  427. :style="{
  428. fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
  429. height: '28px',
  430. display: 'inline-block',
  431. }"
  432. >
  433. {{
  434. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  435. ? item.sentArr[pIndex + 1].chs
  436. : ''
  437. }}</span
  438. >
  439. </span>
  440. <template v-if="curQue.property.pinyin_position == 'bottom'">
  441. <span
  442. v-if="config.isShowPY"
  443. :class="[
  444. 'NNPE-pinyin',
  445. sentIndex == index ? 'wordBlank' : '',
  446. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  447. ]"
  448. style="text-align: left"
  449. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  450. >
  451. </template>
  452. </span>
  453. <span
  454. v-if="
  455. item.sentArr[pIndex + 2] &&
  456. item.sentArr[pIndex + 2].chs &&
  457. chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
  458. "
  459. class="NNPE-words-box"
  460. @click="showWordDetail($event, item.sentArr[pIndex + 2])"
  461. >
  462. <template v-if="curQue.property.pinyin_position == 'top'">
  463. <span
  464. v-if="config.isShowPY"
  465. :class="[
  466. 'NNPE-pinyin',
  467. sentIndex == index ? 'wordBlank' : '',
  468. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  469. ]"
  470. style="text-align: left"
  471. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  472. >
  473. </template>
  474. <span class="NNPE-chs" style="text-align: left">
  475. <span
  476. :class="[]"
  477. :style="{
  478. fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
  479. height: '28px',
  480. display: 'inline-block',
  481. }"
  482. >
  483. {{
  484. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  485. ? item.sentArr[pIndex + 2].chs
  486. : ''
  487. }}</span
  488. >
  489. </span>
  490. <template v-if="curQue.property.pinyin_position == 'bottom'">
  491. <span
  492. v-if="config.isShowPY"
  493. :class="[
  494. 'NNPE-pinyin',
  495. sentIndex == index ? 'wordBlank' : '',
  496. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  497. ]"
  498. style="text-align: left"
  499. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  500. >
  501. </template>
  502. </span>
  503. </template>
  504. <template v-else>
  505. <template v-if="curQue.property.pinyin_position == 'top'">
  506. <span
  507. v-if="config.isShowPY"
  508. class="NNPE-pinyin"
  509. :class="[
  510. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  511. pItem.className ? pItem.className : '',
  512. sentIndex == index ? 'wordBlank' : '',
  513. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  514. ]"
  515. >{{ pItem.pinyin }}</span
  516. >
  517. </template>
  518. <span
  519. class="NNPE-chs"
  520. :class="[
  521. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  522. sentIndex == index ? 'wordBlank' : '',
  523. ]"
  524. >
  525. <template>
  526. <span
  527. v-for="(wItem, wIndex) in pItem.leg"
  528. :key="'ci' + wIndex + pIndex + index"
  529. :class="[]"
  530. :style="{
  531. fontFamily: pItem.config.fontFamily,
  532. height: '28px',
  533. display: 'inline-block',
  534. }"
  535. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  536. >
  537. </template>
  538. </span>
  539. <template v-if="curQue.property.pinyin_position == 'bottom'">
  540. <span
  541. v-if="config.isShowPY"
  542. class="NNPE-pinyin"
  543. :class="[
  544. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  545. pItem.className ? pItem.className : '',
  546. sentIndex == index ? 'wordBlank' : '',
  547. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  548. ]"
  549. >{{ pItem.pinyin }}</span
  550. >
  551. </template>
  552. </template>
  553. </template>
  554. </template>
  555. <template v-else>
  556. <span
  557. :style="{
  558. height: pItem.height + 'px',
  559. width: pItem.width + 'px',
  560. }"
  561. ></span>
  562. </template>
  563. </div>
  564. <div style="overflow: hidden; clear: both"></div>
  565. <div
  566. v-if="
  567. item.enwords &&
  568. config.isShowEN &&
  569. (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
  570. "
  571. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  572. >
  573. {{ item.enwords }}
  574. </div>
  575. <div
  576. v-if="curQue.property.multilingual_position === 'para'"
  577. class="multilingual-para"
  578. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  579. >
  580. {{
  581. curQue.detail[index].multilingualTextList[multilingual]
  582. ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
  583. : ''
  584. }}
  585. </div>
  586. </div>
  587. </div>
  588. <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
  589. {{ items }}
  590. </div> -->
  591. </div>
  592. </template>
  593. </template>
  594. <div v-for="(items, indexs) in curQue.detail" :key="indexs" class="multilingual">
  595. <div
  596. v-if="curQue.property.multilingual_position === 'all'"
  597. class="multilingual-para"
  598. :class="[items.isTitle ? 'multilingual-para-center' : '']"
  599. >
  600. {{
  601. items.multilingualTextList && items.multilingualTextList[multilingual]
  602. ? items.multilingualTextList[multilingual].join(' ')
  603. : ''
  604. }}
  605. </div>
  606. </div>
  607. <div
  608. v-if="
  609. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  610. config.isHasPY ||
  611. config.isHasEN) &&
  612. curQue.property.mp3_position === 'bottom'
  613. "
  614. class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
  615. >
  616. <div class="aduioLine-content">
  617. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  618. <AudioLine
  619. ref="audioLine"
  620. audio-id="artPhraseAudio"
  621. :mp3="curQue.mp3_list[0].url"
  622. :get-cur-time="getCurTime"
  623. :mp3-source="curQue.mp3_list[0].source"
  624. :width="colLength == 2 ? 200 : 700"
  625. :attrib="attrib"
  626. />
  627. </template>
  628. </div>
  629. <div class="aduioLine-right">
  630. <!-- <span
  631. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  632. @click="changePinyin"
  633. v-if="config.isHasPY"
  634. ></span>
  635. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  636. <SvgIcon
  637. v-if="config.isHasPY"
  638. icon-class="pin-btn"
  639. size="16"
  640. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  641. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  642. @click="changePinyin"
  643. />
  644. <SvgIcon
  645. v-if="config.isHasEN"
  646. icon-class="en-btn"
  647. size="16"
  648. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  649. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  650. @click="changeEN"
  651. />
  652. </div>
  653. </div>
  654. <template v-if="isShow">
  655. <div
  656. ref="wordcard"
  657. class="NNPE-wordDetail"
  658. :style="{
  659. marginLeft:
  660. word.detail.new_word.length === 1
  661. ? '-152px'
  662. : windowWidth > word.detail.new_word.length * 126 + 48
  663. ? '-' + (word.detail.new_word.length * 63 + 24) + 'px'
  664. : '0px',
  665. left: windowWidth > word.detail.new_word.length * 126 + 48 ? '' : '0px',
  666. }"
  667. >
  668. <Wordcard
  669. :word="word"
  670. :change-word-card="changeWordCard"
  671. :theme-color="themeColor"
  672. :current-tree-i-d="currentTreeID"
  673. :TaskModel="TaskModel"
  674. :write-list="curQue.Bookanswer.writeModel"
  675. :attrib="attrib"
  676. @changeCurQue="changeCurQue"
  677. />
  678. </div>
  679. </template>
  680. </div>
  681. </template>
  682. <script>
  683. import AudioLine from '../voice_matrix/components/AudioLine.vue';
  684. import Wordcard from './components/Wordcard.vue'; // 卡片
  685. export default {
  686. name: 'WordModelChs',
  687. components: {
  688. AudioLine,
  689. Wordcard,
  690. },
  691. props: [
  692. 'curQue',
  693. 'bodyLeft',
  694. 'NNPENewWordList',
  695. 'themeColor',
  696. 'currentTreeID',
  697. 'config',
  698. 'TaskModel',
  699. 'colLength',
  700. 'noFont',
  701. 'multilingual',
  702. 'attrib',
  703. ],
  704. data() {
  705. return {
  706. resArr: [],
  707. resObj: null,
  708. curTime: 0, // 单位s
  709. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、', '……'],
  710. enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
  711. NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
  712. newWords: ['鱼', '辩礼义'],
  713. isShow: false,
  714. hz: '',
  715. oldHz: '',
  716. pinyin: '',
  717. word: null,
  718. clientY: 0,
  719. top: 0,
  720. left: 0,
  721. contentWidth: 732,
  722. articleImg: {}, // 文章图片
  723. paraIndex: -1,
  724. sentIndex: -1,
  725. wordIndex: -1,
  726. screenHeight: 0,
  727. cardHeight: 0,
  728. windowWidth: window.innerWidth,
  729. };
  730. },
  731. computed: {},
  732. watch: {
  733. hz: {
  734. handler(val, oldVal) {
  735. let _this = this;
  736. if (val) {
  737. if (_this.NumberList.indexOf(val) > -1) {
  738. return;
  739. }
  740. _this.handleNewWords(val, _this.top, _this.left);
  741. }
  742. },
  743. // 深度观察监听
  744. deep: true,
  745. },
  746. isShow: {
  747. handler(val, oldVal) {
  748. let _this = this;
  749. if (val) {
  750. setTimeout(() => {
  751. _this.cardHeight = _this.$refs.wordcard.offsetHeight;
  752. // if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  753. // _this.top = _this.clientY + 20;
  754. // } else {
  755. // _this.top = _this.clientY - _this.cardHeight - 30;
  756. // }
  757. }, 0);
  758. }
  759. },
  760. // 深度观察监听
  761. deep: true,
  762. },
  763. },
  764. // 生命周期 - 创建完成(可以访问当前this实例)
  765. created() {},
  766. // 生命周期 - 挂载完成(可以访问DOM元素)
  767. mounted() {
  768. if (this.curQue) {
  769. this.handleData();
  770. }
  771. window.addEventListener('resize', this.getScreenHeight);
  772. this.getScreenHeight();
  773. },
  774. beforeCreate() {}, // 生命周期 - 创建之前
  775. beforeMount() {}, // 生命周期 - 挂载之前
  776. beforeUpdate() {}, // 生命周期 - 更新之前
  777. updated() {}, // 生命周期 - 更新之后
  778. beforeDestroy() {
  779. this.isShow = false;
  780. window.removeEventListener('resize', this.getScreenHeight);
  781. }, // 生命周期 - 销毁之前
  782. destroyed() {}, // 生命周期 - 销毁完成
  783. activated() {},
  784. // 方法集合
  785. methods: {
  786. // 拼音的显示和隐藏
  787. changePinyin() {
  788. if (this.config.isHasPY) {
  789. this.$emit('changeConfig', 'isShowPY');
  790. }
  791. },
  792. // 英文的显示和隐藏
  793. changeEN() {
  794. if (this.config.isHasEN) {
  795. this.$emit('changeConfig', 'isShowEN');
  796. }
  797. },
  798. getCurTime(curTime) {
  799. this.curTime = curTime * 1000;
  800. this.getSentIndex(this.curTime);
  801. },
  802. getSentIndex(curTime) {
  803. for (let i = 0; i < this.curQue.wordTime.length; i++) {
  804. let bg = this.curQue.wordTime[i].bg;
  805. let ed = this.curQue.wordTime[i].ed;
  806. if (curTime >= bg && curTime <= ed) {
  807. this.sentIndex = i;
  808. break;
  809. }
  810. }
  811. },
  812. handleData() {
  813. let resArr = [];
  814. let leg = this.curQue.detail.length;
  815. let curQue = JSON.parse(JSON.stringify(this.curQue));
  816. let dhaspinyin = false; // 每段是否有拼音
  817. curQue.detail.forEach((dItem, dIndex) => {
  818. dhaspinyin = false;
  819. let paraArr = [];
  820. if (!dItem.isTitle) {
  821. paraArr = [
  822. {
  823. pinyin: '',
  824. chs: '',
  825. width: 20,
  826. height: 20,
  827. },
  828. {
  829. width: 20,
  830. height: 20,
  831. pinyin: '',
  832. chs: '',
  833. },
  834. ];
  835. }
  836. dItem.wordsList.forEach((sItem, sIndex) => {
  837. sItem.forEach((wItem, wIndex) => {
  838. // this.judgePad(sItem, wItem, wIndex);
  839. this.mergeWordSymbol(sItem, wItem, wIndex);
  840. let obj = {
  841. paraIndex: dIndex, // 段落索引
  842. sentIndex: sIndex, // 在段落中句子索引
  843. wordIndex: wIndex, // 单词的索引
  844. pinyin:
  845. curQue.pinyin_type === 'pinyin'
  846. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  847. ? wItem.pinyin_up
  848. : wItem.pinyin
  849. : wItem.pinyin_tone,
  850. chs: wItem.chs,
  851. padding: true,
  852. className: wItem.className,
  853. isShow: wItem.isShow,
  854. isNewWord: this.newWords.indexOf(wItem.chs) > -1,
  855. config: {
  856. fontFamily: wItem.fontFamily,
  857. },
  858. };
  859. paraArr.push(obj);
  860. if (wItem.pinyin) dhaspinyin = true;
  861. });
  862. });
  863. let curSentencesLeg = dItem.sentences.length;
  864. let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
  865. let endLeg = startLeg + curSentencesLeg;
  866. dItem.endLeg = endLeg;
  867. let timeList = curQue.wordTime.slice(startLeg, endLeg);
  868. let paraObj = {
  869. wordsList: paraArr,
  870. timeList,
  871. dhaspinyin,
  872. isTitle: dItem.isTitle,
  873. };
  874. resArr.push(paraObj);
  875. });
  876. this.resArr = resArr;
  877. // 循环文章图片
  878. if (curQue.img_list) {
  879. curQue.img_list.forEach((item) => {
  880. this.articleImg[item.imgNumber] = item.id;
  881. });
  882. }
  883. let resArrs = [];
  884. let sentArrTotal = [];
  885. let timeArr = [];
  886. let wordTimeList = curQue.wordTime;
  887. curQue.detail.forEach((dItem, dIndex) => {
  888. dItem.wordsList.forEach((sItem, sIndex) => {
  889. let sentArr = [];
  890. sItem.forEach((wItem, wIndex) => {
  891. let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  892. let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  893. // this.judgePad(sItem, wItem, wIndex);
  894. this.mergeWordSymbol(wItem);
  895. let obj = {
  896. paraIndex: dIndex, // 段落索引
  897. sentIndex: sIndex, // 在段落中句子索引
  898. wordIndex: wIndex, // 单词的索引
  899. pinyin:
  900. curQue.pinyin_type === 'pinyin'
  901. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  902. ? wItem.pinyin_up
  903. : wItem.pinyin
  904. : wItem.pinyin_tone,
  905. chs: wItem.chs,
  906. padding: true,
  907. className: wItem.className,
  908. isShow: wItem.isShow,
  909. startIndex,
  910. endIndex,
  911. leg: wItem.chs.length,
  912. timeList: [],
  913. };
  914. sentArr.push(obj);
  915. });
  916. let objs = {
  917. sentArr,
  918. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
  919. };
  920. sentArrTotal.push(sentArr);
  921. resArrs.push(objs);
  922. });
  923. timeArr.push(dItem.timeList);
  924. });
  925. if (wordTimeList && wordTimeList.length > 0) {
  926. this.mergeWordTime(sentArrTotal, wordTimeList);
  927. }
  928. let timeList = [];
  929. timeArr.forEach((item) => {
  930. item.forEach((aItem) => {
  931. if (timeList.indexOf(aItem) < 0) {
  932. timeList.push(aItem);
  933. }
  934. });
  935. });
  936. this.resObj = { sentList: resArrs, timeList };
  937. },
  938. mergeWordTime(resArr, wordTimeList) {
  939. resArr.forEach((item, index) => {
  940. let wordsResultList = wordTimeList[index].wordsResultList;
  941. item.forEach((wItem) => {
  942. let startIndex = wItem.startIndex;
  943. let endIndex = wItem.endIndex;
  944. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  945. });
  946. });
  947. },
  948. // 词和标点合一起
  949. mergeWordSymbol(sItem, wItem, curIndex) {
  950. let leg = sItem.length;
  951. if (wItem && wItem.chs) {
  952. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  953. wItem.isShow = false;
  954. } else {
  955. wItem.isShow = true;
  956. }
  957. }
  958. },
  959. mergeWordSymbols(wItem) {
  960. if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.chs) > -1) {
  961. wItem.isShow = false;
  962. } else {
  963. wItem.isShow = true;
  964. }
  965. },
  966. // 判断是否有padding
  967. judgePad(sItem, wItem, curIndex) {
  968. let leg = sItem.length;
  969. if (curIndex < leg - 1) {
  970. let nextIndex = curIndex + 1;
  971. let chs = sItem[nextIndex].chs;
  972. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  973. wItem.padding = false;
  974. } else {
  975. wItem.padding = true;
  976. }
  977. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  978. wItem.className = 'textLeft';
  979. }
  980. }
  981. },
  982. // 转化时间
  983. handleTimeList(list) {
  984. let listRes = [];
  985. list.forEach((item) => {
  986. let res = timeStrToSen(item);
  987. listRes.push(res);
  988. });
  989. return listRes;
  990. },
  991. // 分:秒转秒
  992. timeStrToSen(time) {
  993. if (!time) {
  994. return -1;
  995. }
  996. let pos = time.indexOf(':');
  997. let min = 0;
  998. let sec = 0;
  999. if (pos > 0) {
  1000. min = parseInt(time.substring(0, pos));
  1001. sec = parseFloat(time.substring(pos + 1));
  1002. }
  1003. return min * 60 + sec;
  1004. },
  1005. // 点击播放某个句子
  1006. handleChangeTime(time) {
  1007. this.curTime = time;
  1008. this.$refs.audioLine.onTimeupdateTime(time / 1000);
  1009. },
  1010. showWordDetail(e, item) {
  1011. let _this = this;
  1012. if (
  1013. this.chsFhList.indexOf(item.chs) > -1 ||
  1014. item.chs == '“' ||
  1015. item.chs == '(' ||
  1016. /^[a-zA-Z0-9]/.test(item.chs)
  1017. ) {
  1018. return false;
  1019. }
  1020. if (_this.oldHz != item.chs) {
  1021. this.isShow = false;
  1022. setTimeout(() => {
  1023. _this.hz = item.chs;
  1024. _this.pinyin = item.pinyin;
  1025. _this.paraIndex = item.paraIndex;
  1026. _this.sentIndex = item.sentIndex;
  1027. _this.wordIndex = item.wordIndex;
  1028. }, 50);
  1029. }
  1030. _this.clientY = e.clientY;
  1031. let left = e.clientX;
  1032. let width = 0;
  1033. if (item.chs.length == 1 || item.chs.length == 2) {
  1034. width = 304;
  1035. } else if (item.chs.length == 3 || item.chs.length == 4) {
  1036. width = 432;
  1037. } else if (item.chs.length > 3) {
  1038. width = 560;
  1039. }
  1040. if (left - this.bodyLeft > this.contentWidth / 2) {
  1041. _this.left = left - width + 30;
  1042. } else {
  1043. _this.left = left - 30;
  1044. }
  1045. },
  1046. changeWordCard(isShow) {
  1047. let _this = this;
  1048. _this.isShow = isShow;
  1049. _this.oldHz = '';
  1050. _this.hz = '';
  1051. _this.paraIndex = -1;
  1052. _this.sentIndex = -1;
  1053. _this.wordIndex = -1;
  1054. },
  1055. // 处理分词数据
  1056. handleNewWords(val) {
  1057. this.isShow = true;
  1058. this.word = null;
  1059. let wordlist = val.split('');
  1060. let option = {
  1061. definition_list: [],
  1062. mp3_list: [],
  1063. new_word: val,
  1064. pinyin: this.pinyin,
  1065. };
  1066. this.word = { list: wordlist, detail: option };
  1067. this.oldHz = val;
  1068. },
  1069. getScreenHeight() {
  1070. this.screenHeight = window.innerHeight;
  1071. },
  1072. changeCurQue(answer) {
  1073. if (answer) {
  1074. let writeModel = this.curQue.Bookanswer.writeModel;
  1075. let hz = answer.hz;
  1076. if (writeModel.hasOwn(hz)) {
  1077. writeModel[hz].push(answer);
  1078. } else {
  1079. writeModel[hz] = [answer];
  1080. }
  1081. }
  1082. },
  1083. }, // 如果页面有keep-alive缓存功能,这个函数会触发
  1084. };
  1085. </script>
  1086. <style lang="scss" scoped>
  1087. //@import url(); 引入公共css类
  1088. .NNPE-ArticleView {
  1089. width: 100%;
  1090. .aduioLine-practice-npc {
  1091. display: flex;
  1092. align-items: center;
  1093. justify-content: flex-start;
  1094. .aduioLine-content {
  1095. flex: 1;
  1096. }
  1097. .aduioLine-right {
  1098. box-sizing: border-box;
  1099. display: flex;
  1100. align-items: center;
  1101. justify-content: space-between;
  1102. width: 69px;
  1103. height: 40px;
  1104. padding: 0 12px;
  1105. border-left: 1px solid rgba(0, 0, 0, 10%);
  1106. > span {
  1107. width: 16px;
  1108. height: 16px;
  1109. cursor: pointer;
  1110. }
  1111. }
  1112. }
  1113. .NPC-sentences-list {
  1114. padding: 24px 0;
  1115. }
  1116. .multilingual {
  1117. padding: 6px 24px 12px;
  1118. word-break: break-word;
  1119. }
  1120. .NNPE-detail {
  1121. overflow: hidden;
  1122. clear: both;
  1123. color: rgba(0, 0, 0, 85%);
  1124. .NNPE-words {
  1125. float: left;
  1126. &-box {
  1127. float: left;
  1128. > span {
  1129. display: block;
  1130. &.NNPE-pinyin {
  1131. height: 22px;
  1132. font-family: 'League';
  1133. font-size: 14px;
  1134. font-weight: normal;
  1135. line-height: 22px;
  1136. &.noFont {
  1137. font-family: initial;
  1138. }
  1139. &.textLeft {
  1140. text-align: left;
  1141. }
  1142. }
  1143. &.NNPE-chs {
  1144. font-family: '楷体';
  1145. font-size: 20px;
  1146. line-height: 28px;
  1147. &.active {
  1148. background: rgba(36, 185, 158, 15%);
  1149. }
  1150. // &.wordActive {
  1151. // color: #de4444;
  1152. // }
  1153. }
  1154. &.padding {
  1155. padding: 0 3px;
  1156. }
  1157. }
  1158. }
  1159. &.textLeft {
  1160. text-align: left;
  1161. }
  1162. &.textCenter {
  1163. text-align: center;
  1164. }
  1165. &.textRight {
  1166. text-align: right;
  1167. }
  1168. > span {
  1169. display: block;
  1170. &.NNPE-pinyin {
  1171. height: 22px;
  1172. font-family: 'League';
  1173. font-size: 14px;
  1174. font-weight: normal;
  1175. line-height: 22px;
  1176. &.noFont {
  1177. font-family: initial;
  1178. }
  1179. &.textLeft {
  1180. text-align: left;
  1181. }
  1182. }
  1183. &.NNPE-chs {
  1184. font-family: '楷体';
  1185. font-size: 20px;
  1186. line-height: 28px;
  1187. &.active {
  1188. background: rgba(36, 185, 158, 15%);
  1189. }
  1190. // &.wordActive {
  1191. // color: #de4444;
  1192. // }
  1193. }
  1194. &.padding {
  1195. padding: 0 3px;
  1196. }
  1197. }
  1198. }
  1199. &.NNPE-detail-title {
  1200. .wordsList-box {
  1201. > div {
  1202. display: flex;
  1203. flex-flow: wrap;
  1204. justify-content: center;
  1205. width: 100%;
  1206. }
  1207. }
  1208. }
  1209. .index {
  1210. box-sizing: border-box;
  1211. width: 48px;
  1212. padding: 8px;
  1213. text-align: right;
  1214. border-right: 1px solid rgba(0, 0, 0, 10%);
  1215. b {
  1216. font-weight: 400;
  1217. line-height: 1.5;
  1218. color: #000;
  1219. }
  1220. }
  1221. .wordsList-box {
  1222. // display: flex;
  1223. width: 100%;
  1224. padding: 6px 24px 12px;
  1225. &-left {
  1226. justify-content: flex-start;
  1227. }
  1228. &-center {
  1229. justify-content: center;
  1230. }
  1231. &-right {
  1232. justify-content: flex-end;
  1233. }
  1234. > div {
  1235. overflow: hidden;
  1236. clear: both;
  1237. }
  1238. > img {
  1239. display: block;
  1240. max-width: 100%;
  1241. margin: 0 auto;
  1242. }
  1243. }
  1244. }
  1245. }
  1246. .NNPE-wordDetail {
  1247. position: fixed;
  1248. top: 50%;
  1249. left: 50%;
  1250. z-index: 116;
  1251. max-width: 100%;
  1252. margin-top: -196px;
  1253. overflow: auto;
  1254. box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
  1255. // width: 260px;
  1256. // height: 200px;
  1257. // background: #cc0;
  1258. }
  1259. .NNPE-detail-box {
  1260. box-sizing: border-box;
  1261. width: 100%;
  1262. padding: 8px 24px;
  1263. margin-bottom: 8px;
  1264. &.active {
  1265. background: rgba(222, 68, 68, 15%);
  1266. }
  1267. }
  1268. .NNPE-details {
  1269. overflow: hidden;
  1270. clear: both;
  1271. .NNPE-words {
  1272. float: left;
  1273. &-box {
  1274. float: left;
  1275. > span {
  1276. display: block;
  1277. &.NNPE-pinyin {
  1278. height: 20px;
  1279. font-family: 'League';
  1280. font-size: 14px;
  1281. font-weight: normal;
  1282. line-height: 20px;
  1283. color: rgba(0, 0, 0, 85%);
  1284. &.noFont {
  1285. font-family: initial;
  1286. }
  1287. &.textLeft {
  1288. text-align: left;
  1289. }
  1290. &.wordBlank {
  1291. color: rgba(0, 0, 0, 85%);
  1292. }
  1293. }
  1294. &.NNPE-chs {
  1295. font-family: '楷体';
  1296. font-size: 20px;
  1297. line-height: 28px;
  1298. color: rgba(0, 0, 0, 85%);
  1299. .active {
  1300. color: #de4444;
  1301. }
  1302. &.wordBlank {
  1303. color: rgba(0, 0, 0, 85%);
  1304. }
  1305. }
  1306. // &.padding {
  1307. // padding-right: 6px;
  1308. // }
  1309. }
  1310. }
  1311. &.textLeft {
  1312. text-align: left;
  1313. }
  1314. &.textCenter {
  1315. text-align: center;
  1316. }
  1317. &.textRight {
  1318. text-align: right;
  1319. }
  1320. > span {
  1321. display: block;
  1322. &.NNPE-pinyin {
  1323. height: 20px;
  1324. font-family: 'League';
  1325. font-size: 14px;
  1326. font-weight: normal;
  1327. line-height: 20px;
  1328. color: rgba(0, 0, 0, 85%);
  1329. &.noFont {
  1330. font-family: initial;
  1331. }
  1332. &.textLeft {
  1333. text-align: left;
  1334. }
  1335. &.wordBlank {
  1336. color: rgba(0, 0, 0, 85%);
  1337. }
  1338. }
  1339. &.NNPE-chs {
  1340. font-family: '楷体';
  1341. font-size: 20px;
  1342. line-height: 28px;
  1343. color: rgba(0, 0, 0, 85%);
  1344. .active {
  1345. color: #de4444;
  1346. }
  1347. &.wordBlank {
  1348. color: rgba(0, 0, 0, 85%);
  1349. }
  1350. }
  1351. &.padding {
  1352. padding: 0 3px;
  1353. }
  1354. }
  1355. }
  1356. }
  1357. .enwords {
  1358. padding-left: 3px;
  1359. font-family: 'Helvetica';
  1360. font-size: 14px;
  1361. font-weight: normal;
  1362. line-height: 22px;
  1363. color: rgba(0, 0, 0, 85%);
  1364. word-break: break-word;
  1365. &.wordBlank {
  1366. color: rgba(0, 0, 0, 85%);
  1367. }
  1368. }
  1369. .multilingual-para {
  1370. text-indent: 40px;
  1371. word-break: break-word;
  1372. &-center {
  1373. text-align: center;
  1374. text-indent: 0;
  1375. }
  1376. }
  1377. .NPC-Big-Book-preview-green {
  1378. .NNPE-ArticleView {
  1379. .NNPE-detail-box {
  1380. &.active {
  1381. background: rgba(36, 185, 158, 15%);
  1382. }
  1383. }
  1384. }
  1385. }
  1386. .NPC-Big-Book-preview-brown {
  1387. .NNPE-ArticleView {
  1388. .NNPE-detail-box {
  1389. &.active {
  1390. background: rgba(189, 136, 101, 15%);
  1391. }
  1392. }
  1393. }
  1394. }
  1395. </style>