WordModelChs.vue 47 KB

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