| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616 |
- <!-- -->
- <template>
- <div v-if="curQue" class="NNPE-ArticleView">
- <div
- v-if="
- ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
- config.isHasPY ||
- config.isHasEN) &&
- curQue.property.mp3_position === 'top'
- "
- class="aduioLine-box aduioLine-practice-npc"
- >
- <div class="aduioLine-content">
- <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
- <AudioLine
- ref="audioLine"
- audio-id="artPhraseAudio"
- :mp3="curQue.mp3_list[0].url"
- :get-cur-time="getCurTime"
- :mp3-source="curQue.mp3_list[0].source"
- :width="colLength == 2 ? 200 : 700"
- :attrib="attrib"
- />
- </template>
- </div>
- <div class="aduioLine-right">
- <!-- <span
- :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
- @click="changePinyin"
- v-if="config.isHasPY"
- ></span>
- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
- <SvgIcon
- v-if="config.isHasPY"
- icon-class="pin-btn"
- size="16"
- :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
- :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
- @click="changePinyin"
- />
- <SvgIcon
- v-if="config.isHasEN"
- icon-class="en-btn"
- size="16"
- :class="['EN-16', config.isShowEN ? '' : 'disabled']"
- :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
- @click="changeEN"
- />
- </div>
- </div>
- <template v-if="!config.isHasEN || (config.isHasEN && !config.isShowEN)">
- <template v-if="resArr.length > 0">
- <div class="NPC-sentences-list">
- <div
- v-for="(item, index) in resArr"
- :key="'detail' + index"
- :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
- >
- <div
- class="wordsList-box"
- :class="[
- curQue.detail[index].paragraphAttr
- ? 'wordsList-box-' + curQue.detail[index].paragraphAttr.paragraphAlign
- : '',
- ]"
- >
- <img v-if="articleImg[0] && index == 0" :src="articleImg[index]" />
- <div>
- <div
- v-for="(pItem, pIndex) in item.wordsList"
- :key="'wordsList' + pIndex"
- class="NNPE-words"
- :class="[
- pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
- pItem.chs == '“' ? 'textRight' : '',
- ]"
- >
- <template v-if="!pItem.width">
- <template v-if="pItem.isShow">
- <template
- v-if="
- item.wordsList[pIndex + 1] &&
- item.wordsList[pIndex + 1].chs &&
- chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1
- "
- >
- <span class="NNPE-words-box" @click="showWordDetail($event, pItem)">
- <span
- v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- :class="[pItem.className ? pItem.className : '']"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- <span
- class="NNPE-chs"
- :class="[
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime
- ? 'active'
- : '',
- paraIndex == pItem.paraIndex &&
- sentIndex == pItem.sentIndex &&
- wordIndex == pItem.wordIndex
- ? 'wordActive'
- : '',
- ]"
- :style="{
- fontFamily: pItem.config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- backgroundColor:
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime &&
- attrib
- ? attrib.assist_color
- : '',
- }"
- >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
- >
- <span
- v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- :class="[pItem.className ? pItem.className : '']"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </span>
- <span class="NNPE-words-box" @click="showWordDetail($event, item.wordsList[pIndex + 1])">
- <span
- v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.wordsList[pIndex + 1].pinyin }}</span
- >
- <span
- class="NNPE-chs"
- style="text-align: left"
- :class="[
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime
- ? 'active'
- : '',
- ]"
- :style="{
- fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- backgroundColor:
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime &&
- attrib
- ? attrib.assist_color
- : '',
- }"
- >{{
- NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
- ? item.wordsList[pIndex + 1].chs
- : ''
- }}</span
- >
- <span
- v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.wordsList[pIndex + 1].pinyin }}</span
- >
- </span>
- <span
- v-if="
- item.wordsList[pIndex + 2] &&
- item.wordsList[pIndex + 2].chs &&
- chsFhList.indexOf(item.wordsList[pIndex + 2].chs) > -1
- "
- class="NNPE-words-box"
- @click="showWordDetail($event, item.wordsList[pIndex + 2])"
- >
- <span
- v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
- :class="[
- 'NNPE-pinyin',
- noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.wordsList[pIndex + 2].pinyin }}</span
- >
- <span
- class="NNPE-chs"
- style="text-align: left"
- :class="[
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime
- ? 'active'
- : '',
- pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
- pItem.chstimeList &&
- pItem.chstimeList[pItem.leg - 1] &&
- curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
- curQue.wordTime &&
- curTime <= item.timeList[pItem.sentIndex].ed
- ? 'wordActive'
- : '',
- ]"
- :style="{
- fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- backgroundColor:
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime &&
- attrib
- ? attrib.assist_color
- : '',
- }"
- >{{
- NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
- ? item.wordsList[pIndex + 2].chs
- : ''
- }}</span
- >
- <span
- v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
- :class="[
- 'NNPE-pinyin',
- noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.wordsList[pIndex + 2].pinyin }}</span
- >
- </span>
- </template>
- <template v-else>
- <span
- v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- :class="[
- pItem.chs != '“' && pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- <span
- class="NNPE-chs"
- :class="[
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime
- ? 'active'
- : '',
- pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
- ]"
- :style="{
- fontFamily: pItem.config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- backgroundColor:
- item.timeList &&
- item.timeList[pItem.sentIndex] &&
- curTime >= item.timeList[pItem.sentIndex].bg &&
- curTime <= item.timeList[pItem.sentIndex].ed &&
- curTime &&
- attrib
- ? attrib.assist_color
- : '',
- }"
- @click="showWordDetail($event, pItem)"
- >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs : '' }}</span
- >
- <span
- v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
- class="NNPE-pinyin"
- :class="[
- pItem.chs != '“' && pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- </template>
- </template>
- <template v-else>
- <span
- :style="{
- height: pItem.height + 'px',
- width: pItem.width + 'px',
- }"
- ></span>
- </template>
- </div>
- </div>
- <div
- v-if="curQue.property.multilingual_position === 'para'"
- class="multilingual-para"
- :class="[item.isTitle ? 'multilingual-para-center' : '']"
- >
- {{
- curQue.detail[index].multilingualTextList && curQue.detail[index].multilingualTextList[multilingual]
- ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
- : ''
- }}
- </div>
- <img v-if="articleImg[index + 1]" :src="articleImg[index + 1]" />
- </div>
- </div>
- <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
- {{ items }}
- </div> -->
- </div>
- </template>
- </template>
- <template v-else>
- <template v-if="resObj">
- <!-- -->
- <div class="NPC-sentences-list">
- <div
- v-for="(item, index) in resObj.sentList"
- :key="'detail' + index"
- :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
- >
- <div :class="['NNPE-details']">
- <div
- v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
- :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
- >
- {{ item.enwords }}
- </div>
- <div style="overflow: hidden; clear: both"></div>
- <div
- v-for="(pItem, pIndex) in item.sentArr"
- :key="'wordsList' + pIndex"
- class="NNPE-words"
- :class="[
- pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
- pItem.chs == '“' ? 'textRight' : '',
- ]"
- >
- <template v-if="!pItem.width">
- <template v-if="pItem.isShow">
- <template
- v-if="
- item.sentArr[pIndex + 1] &&
- item.sentArr[pIndex + 1].chs &&
- chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
- "
- >
- <span class="NNPE-words-box" @click="showWordDetail($event, pItem)">
- <template v-if="curQue.property.pinyin_position == 'top'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.className ? pItem.className : '',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- <span
- class="NNPE-chs"
- :class="[
- pItem.padding && config.isShowPY ? 'padding' : '',
- sentIndex == index ? 'wordBlank' : '',
- ]"
- >
- <template>
- <span
- v-for="(wItem, wIndex) in pItem.leg"
- :key="'ci' + wIndex + pIndex + index"
- :class="[]"
- :style="{
- fontFamily: pItem.config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- }"
- >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
- >
- </template>
- </span>
- <template v-if="curQue.property.pinyin_position == 'bottom'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.className ? pItem.className : '',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- </span>
- <span class="NNPE-words-box" @click="showWordDetail($event, item.sentArr[pIndex + 1])">
- <template v-if="curQue.property.pinyin_position == 'top'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.sentArr[pIndex + 1].pinyin }}</span
- >
- </template>
- <span class="NNPE-chs" style="text-align: left">
- <span
- :class="[]"
- :style="{
- fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- }"
- >
- {{
- NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
- ? item.sentArr[pIndex + 1].chs
- : ''
- }}</span
- >
- </span>
- <template v-if="curQue.property.pinyin_position == 'bottom'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.sentArr[pIndex + 1].pinyin }}</span
- >
- </template>
- </span>
- <span
- v-if="
- item.sentArr[pIndex + 2] &&
- item.sentArr[pIndex + 2].chs &&
- chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
- "
- class="NNPE-words-box"
- @click="showWordDetail($event, item.sentArr[pIndex + 2])"
- >
- <template v-if="curQue.property.pinyin_position == 'top'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.sentArr[pIndex + 2].pinyin }}</span
- >
- </template>
- <span class="NNPE-chs" style="text-align: left">
- <span
- :class="[]"
- :style="{
- fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- }"
- >
- {{
- NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
- ? item.sentArr[pIndex + 2].chs
- : ''
- }}</span
- >
- </span>
- <template v-if="curQue.property.pinyin_position == 'bottom'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
- ]"
- style="text-align: left"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size
- ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
- : '22px',
- }"
- >{{ item.sentArr[pIndex + 2].pinyin }}</span
- >
- </template>
- </span>
- </template>
- <template v-else>
- <template v-if="curQue.property.pinyin_position == 'top'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.chs != '“' && pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- <span
- class="NNPE-chs"
- :class="[
- pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
- sentIndex == index ? 'wordBlank' : '',
- ]"
- >
- <template>
- <span
- v-for="(wItem, wIndex) in pItem.leg"
- :key="'ci' + wIndex + pIndex + index"
- :class="[]"
- :style="{
- fontFamily: pItem.config.fontFamily,
- height:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
- lineHeight:
- attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
- display: 'inline-block',
- }"
- >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
- >
- </template>
- </span>
- <template v-if="curQue.property.pinyin_position == 'bottom'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.chs != '“' && pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- sentIndex == index ? 'wordBlank' : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- ]"
- :style="{
- fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
- height:
- attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
- }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- </template>
- </template>
- </template>
- <template v-else>
- <span
- :style="{
- height: pItem.height + 'px',
- width: pItem.width + 'px',
- }"
- ></span>
- </template>
- </div>
- <div style="overflow: hidden; clear: both"></div>
- <div
- v-if="
- item.enwords &&
- config.isShowEN &&
- (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
- "
- :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
- >
- {{ item.enwords }}
- </div>
- <div
- v-if="curQue.property.multilingual_position === 'para'"
- class="multilingual-para"
- :class="[item.isTitle ? 'multilingual-para-center' : '']"
- >
- {{
- curQue.detail[index].multilingualTextList[multilingual]
- ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
- : ''
- }}
- </div>
- </div>
- </div>
- <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
- {{ items }}
- </div> -->
- </div>
- </template>
- </template>
- <template v-for="(items, indexs) in curQue.detail">
- <div
- v-if="
- curQue.property.multilingual_position === 'all' &&
- items.multilingualTextList &&
- items.multilingualTextList[multilingual] &&
- items.multilingualTextList[multilingual].length > 0
- "
- :key="indexs"
- class="multilingual"
- >
- <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
- {{
- items.multilingualTextList && items.multilingualTextList[multilingual]
- ? items.multilingualTextList[multilingual].join(' ')
- : ''
- }}
- </div>
- </div>
- </template>
- <div
- v-if="
- ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
- config.isHasPY ||
- config.isHasEN) &&
- curQue.property.mp3_position === 'bottom'
- "
- class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
- >
- <div class="aduioLine-content">
- <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
- <AudioLine
- ref="audioLine"
- audio-id="artPhraseAudio"
- :mp3="curQue.mp3_list[0].url"
- :get-cur-time="getCurTime"
- :mp3-source="curQue.mp3_list[0].source"
- :width="colLength == 2 ? 200 : 700"
- :attrib="attrib"
- />
- </template>
- </div>
- <div class="aduioLine-right">
- <!-- <span
- :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
- @click="changePinyin"
- v-if="config.isHasPY"
- ></span>
- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
- <SvgIcon
- v-if="config.isHasPY"
- icon-class="pin-btn"
- size="16"
- :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
- :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
- @click="changePinyin"
- />
- <SvgIcon
- v-if="config.isHasEN"
- icon-class="en-btn"
- size="16"
- :class="['EN-16', config.isShowEN ? '' : 'disabled']"
- :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
- @click="changeEN"
- />
- </div>
- </div>
- <template v-if="isShow">
- <div
- ref="wordcard"
- class="NNPE-wordDetail"
- :style="{
- marginLeft:
- word.detail.new_word.length === 1
- ? '-152px'
- : windowWidth > word.detail.new_word.length * 126 + 48
- ? '-' + (word.detail.new_word.length * 63 + 24) + 'px'
- : '0px',
- left: windowWidth > word.detail.new_word.length * 126 + 48 ? '' : '0px',
- }"
- >
- <Wordcard
- :word="word"
- :change-word-card="changeWordCard"
- :theme-color="themeColor"
- :current-tree-i-d="currentTreeID"
- :TaskModel="TaskModel"
- :write-list="curQue.Bookanswer.writeModel"
- :attrib="attrib"
- @changeCurQue="changeCurQue"
- />
- </div>
- </template>
- </div>
- </template>
- <script>
- import AudioLine from '../voice_matrix/components/AudioLine.vue';
- import Wordcard from './components/Wordcard.vue'; // 卡片
- export default {
- name: 'WordModelChs',
- components: {
- AudioLine,
- Wordcard,
- },
- props: [
- 'curQue',
- 'bodyLeft',
- 'NNPENewWordList',
- 'themeColor',
- 'currentTreeID',
- 'config',
- 'TaskModel',
- 'colLength',
- 'noFont',
- 'multilingual',
- 'attrib',
- ],
- data() {
- return {
- resArr: [],
- resObj: null,
- curTime: 0, // 单位s
- chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、', '……'],
- enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
- NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
- newWords: ['鱼', '辩礼义'],
- isShow: false,
- hz: '',
- oldHz: '',
- pinyin: '',
- word: null,
- clientY: 0,
- top: 0,
- left: 0,
- contentWidth: 732,
- articleImg: {}, // 文章图片
- paraIndex: -1,
- sentIndex: -1,
- wordIndex: -1,
- screenHeight: 0,
- cardHeight: 0,
- windowWidth: window.innerWidth,
- };
- },
- computed: {},
- watch: {
- hz: {
- handler(val, oldVal) {
- let _this = this;
- if (val) {
- if (_this.NumberList.indexOf(val) > -1) {
- return;
- }
- _this.handleNewWords(val, _this.top, _this.left);
- }
- },
- // 深度观察监听
- deep: true,
- },
- isShow: {
- handler(val, oldVal) {
- let _this = this;
- if (val) {
- setTimeout(() => {
- _this.cardHeight = _this.$refs.wordcard.offsetHeight;
- // if (_this.screenHeight - _this.clientY > _this.cardHeight) {
- // _this.top = _this.clientY + 20;
- // } else {
- // _this.top = _this.clientY - _this.cardHeight - 30;
- // }
- }, 0);
- }
- },
- // 深度观察监听
- deep: true,
- },
- },
- // 生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- // 生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- if (this.curQue) {
- this.handleData();
- }
- window.addEventListener('resize', this.getScreenHeight);
- this.getScreenHeight();
- },
- beforeCreate() {}, // 生命周期 - 创建之前
- beforeMount() {}, // 生命周期 - 挂载之前
- beforeUpdate() {}, // 生命周期 - 更新之前
- updated() {}, // 生命周期 - 更新之后
- beforeDestroy() {
- this.isShow = false;
- window.removeEventListener('resize', this.getScreenHeight);
- }, // 生命周期 - 销毁之前
- destroyed() {}, // 生命周期 - 销毁完成
- activated() {},
- // 方法集合
- methods: {
- // 拼音的显示和隐藏
- changePinyin() {
- if (this.config.isHasPY) {
- this.$emit('changeConfig', 'isShowPY');
- }
- },
- // 英文的显示和隐藏
- changeEN() {
- if (this.config.isHasEN) {
- this.$emit('changeConfig', 'isShowEN');
- }
- },
- getCurTime(curTime) {
- this.curTime = curTime * 1000;
- this.getSentIndex(this.curTime);
- },
- getSentIndex(curTime) {
- for (let i = 0; i < this.curQue.wordTime.length; i++) {
- let bg = this.curQue.wordTime[i].bg;
- let ed = this.curQue.wordTime[i].ed;
- if (curTime >= bg && curTime <= ed) {
- this.sentIndex = i;
- break;
- }
- }
- },
- handleData() {
- let resArr = [];
- let leg = this.curQue.detail.length;
- let curQue = JSON.parse(JSON.stringify(this.curQue));
- let dhaspinyin = false; // 每段是否有拼音
- curQue.detail.forEach((dItem, dIndex) => {
- dhaspinyin = false;
- let paraArr = [];
- if (!dItem.isTitle) {
- paraArr = [
- {
- pinyin: '',
- chs: '',
- width: 20,
- height: 20,
- },
- {
- width: 20,
- height: 20,
- pinyin: '',
- chs: '',
- },
- ];
- }
- dItem.wordsList.forEach((sItem, sIndex) => {
- sItem.forEach((wItem, wIndex) => {
- // this.judgePad(sItem, wItem, wIndex);
- this.mergeWordSymbol(sItem, wItem, wIndex);
- let obj = {
- paraIndex: dIndex, // 段落索引
- sentIndex: sIndex, // 在段落中句子索引
- wordIndex: wIndex, // 单词的索引
- pinyin:
- curQue.pinyin_type === 'pinyin'
- ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
- ? wItem.pinyin_up
- : wItem.pinyin
- : wItem.pinyin_tone,
- chs: wItem.chs,
- padding: true,
- className: wItem.className,
- isShow: wItem.isShow,
- isNewWord: this.newWords.indexOf(wItem.chs) > -1,
- config: {
- fontFamily: wItem.fontFamily,
- },
- };
- paraArr.push(obj);
- if (wItem.pinyin) dhaspinyin = true;
- });
- });
- let curSentencesLeg = dItem.sentences.length;
- let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
- let endLeg = startLeg + curSentencesLeg;
- dItem.endLeg = endLeg;
- let timeList = curQue.wordTime.slice(startLeg, endLeg);
- let paraObj = {
- wordsList: paraArr,
- timeList,
- dhaspinyin,
- isTitle: dItem.isTitle,
- };
- resArr.push(paraObj);
- });
- this.resArr = resArr;
- // 循环文章图片
- if (curQue.img_list) {
- curQue.img_list.forEach((item) => {
- this.articleImg[item.imgNumber] = item.id;
- });
- }
- let resArrs = [];
- let sentArrTotal = [];
- let timeArr = [];
- let wordTimeList = curQue.wordTime;
- curQue.detail.forEach((dItem, dIndex) => {
- dItem.wordsList.forEach((sItem, sIndex) => {
- let sentArr = [];
- sItem.forEach((wItem, wIndex) => {
- let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
- let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
- // this.judgePad(sItem, wItem, wIndex);
- this.mergeWordSymbol(wItem);
- let obj = {
- paraIndex: dIndex, // 段落索引
- sentIndex: sIndex, // 在段落中句子索引
- wordIndex: wIndex, // 单词的索引
- pinyin:
- curQue.pinyin_type === 'pinyin'
- ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
- ? wItem.pinyin_up
- : wItem.pinyin
- : wItem.pinyin_tone,
- chs: wItem.chs,
- padding: true,
- className: wItem.className,
- isShow: wItem.isShow,
- startIndex,
- endIndex,
- leg: wItem.chs.length,
- timeList: [],
- };
- sentArr.push(obj);
- });
- let objs = {
- sentArr,
- enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
- };
- sentArrTotal.push(sentArr);
- resArrs.push(objs);
- });
- timeArr.push(dItem.timeList);
- });
- if (wordTimeList && wordTimeList.length > 0) {
- this.mergeWordTime(sentArrTotal, wordTimeList);
- }
- let timeList = [];
- timeArr.forEach((item) => {
- item.forEach((aItem) => {
- if (timeList.indexOf(aItem) < 0) {
- timeList.push(aItem);
- }
- });
- });
- this.resObj = { sentList: resArrs, timeList };
- },
- mergeWordTime(resArr, wordTimeList) {
- resArr.forEach((item, index) => {
- let wordsResultList = wordTimeList[index].wordsResultList;
- item.forEach((wItem) => {
- let startIndex = wItem.startIndex;
- let endIndex = wItem.endIndex;
- wItem.timeList = wordsResultList.slice(startIndex, endIndex);
- });
- });
- },
- // 词和标点合一起
- mergeWordSymbol(sItem, wItem, curIndex) {
- let leg = sItem.length;
- if (wItem && wItem.chs) {
- if (this.chsFhList.indexOf(wItem.chs) > -1) {
- wItem.isShow = false;
- } else {
- wItem.isShow = true;
- }
- }
- },
- mergeWordSymbols(wItem) {
- if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.chs) > -1) {
- wItem.isShow = false;
- } else {
- wItem.isShow = true;
- }
- },
- // 判断是否有padding
- judgePad(sItem, wItem, curIndex) {
- let leg = sItem.length;
- if (curIndex < leg - 1) {
- let nextIndex = curIndex + 1;
- let chs = sItem[nextIndex].chs;
- if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
- wItem.padding = false;
- } else {
- wItem.padding = true;
- }
- if (this.enFhList.indexOf(wItem.pinyin) > -1) {
- wItem.className = 'textLeft';
- }
- }
- },
- // 转化时间
- handleTimeList(list) {
- let listRes = [];
- list.forEach((item) => {
- let res = timeStrToSen(item);
- listRes.push(res);
- });
- return listRes;
- },
- // 分:秒转秒
- timeStrToSen(time) {
- if (!time) {
- return -1;
- }
- let pos = time.indexOf(':');
- let min = 0;
- let sec = 0;
- if (pos > 0) {
- min = parseInt(time.substring(0, pos));
- sec = parseFloat(time.substring(pos + 1));
- }
- return min * 60 + sec;
- },
- // 点击播放某个句子
- handleChangeTime(time) {
- this.curTime = time;
- this.$refs.audioLine.onTimeupdateTime(time / 1000);
- },
- showWordDetail(e, item) {
- let _this = this;
- if (
- this.chsFhList.indexOf(item.chs) > -1 ||
- item.chs == '“' ||
- item.chs == '(' ||
- /^[a-zA-Z0-9]/.test(item.chs)
- ) {
- return false;
- }
- if (_this.oldHz != item.chs) {
- this.isShow = false;
- setTimeout(() => {
- _this.hz = item.chs;
- _this.pinyin = item.pinyin;
- _this.paraIndex = item.paraIndex;
- _this.sentIndex = item.sentIndex;
- _this.wordIndex = item.wordIndex;
- }, 50);
- }
- _this.clientY = e.clientY;
- let left = e.clientX;
- let width = 0;
- if (item.chs.length == 1 || item.chs.length == 2) {
- width = 304;
- } else if (item.chs.length == 3 || item.chs.length == 4) {
- width = 432;
- } else if (item.chs.length > 3) {
- width = 560;
- }
- if (left - this.bodyLeft > this.contentWidth / 2) {
- _this.left = left - width + 30;
- } else {
- _this.left = left - 30;
- }
- },
- changeWordCard(isShow) {
- let _this = this;
- _this.isShow = isShow;
- _this.oldHz = '';
- _this.hz = '';
- _this.paraIndex = -1;
- _this.sentIndex = -1;
- _this.wordIndex = -1;
- },
- // 处理分词数据
- handleNewWords(val) {
- this.isShow = true;
- this.word = null;
- let wordlist = val.split('');
- let option = {
- definition_list: [],
- mp3_list: [],
- new_word: val,
- pinyin: this.pinyin,
- };
- this.word = { list: wordlist, detail: option };
- this.oldHz = val;
- },
- getScreenHeight() {
- this.screenHeight = window.innerHeight;
- },
- changeCurQue(answer) {
- if (answer) {
- let writeModel = this.curQue.Bookanswer.writeModel;
- let hz = answer.hz;
- if (writeModel.hasOwnProperty(hz)) {
- writeModel[hz].push(answer);
- } else {
- writeModel[hz] = [answer];
- }
- }
- },
- }, // 如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang="scss" scoped>
- //@import url(); 引入公共css类
- .NNPE-ArticleView {
- width: 100%;
- .aduioLine-practice-npc {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .aduioLine-content {
- flex: 1;
- }
- .aduioLine-right {
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 69px;
- height: 40px;
- padding: 0 12px;
- border-left: 1px solid rgba(0, 0, 0, 10%);
- > span {
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
- }
- }
- .NPC-sentences-list {
- padding: 24px 0;
- }
- .multilingual {
- padding: 6px 24px 12px;
- word-break: break-word;
- }
- .NNPE-detail {
- overflow: hidden;
- clear: both;
- color: rgba(0, 0, 0, 85%);
- .NNPE-words {
- float: left;
- padding-bottom: 5px;
- &-box {
- float: left;
- > span {
- display: block;
- &.NNPE-pinyin {
- height: 22px;
- font-family: 'League';
- font-size: 14px;
- font-weight: normal;
- line-height: 1.5;
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- }
- &.NNPE-chs {
- font-family: '楷体';
- font-size: 20px;
- line-height: 1.4;
- &.active {
- background: rgba(36, 185, 158, 15%);
- }
- // &.wordActive {
- // color: #de4444;
- // }
- }
- &.padding {
- padding: 0 3px;
- }
- }
- }
- &.textLeft {
- text-align: left;
- }
- &.textCenter {
- text-align: center;
- }
- &.textRight {
- text-align: right;
- }
- > span {
- display: block;
- &.NNPE-pinyin {
- height: 22px;
- font-family: 'League';
- font-size: 14px;
- font-weight: normal;
- line-height: 1.5;
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- }
- &.NNPE-chs {
- font-family: '楷体';
- font-size: 20px;
- line-height: 1.4;
- &.active {
- background: rgba(36, 185, 158, 15%);
- }
- // &.wordActive {
- // color: #de4444;
- // }
- }
- &.padding {
- padding: 0 3px;
- }
- }
- }
- &.NNPE-detail-title {
- .wordsList-box {
- > div {
- display: flex;
- flex-flow: wrap;
- justify-content: center;
- width: 100%;
- }
- }
- }
- .index {
- box-sizing: border-box;
- width: 48px;
- padding: 8px;
- text-align: right;
- border-right: 1px solid rgba(0, 0, 0, 10%);
- b {
- font-weight: 400;
- line-height: 1.5;
- color: #000;
- }
- }
- .wordsList-box {
- // display: flex;
- width: 100%;
- padding: 6px 24px 12px;
- &-left {
- justify-content: flex-start;
- }
- &-center {
- justify-content: center;
- }
- &-right {
- justify-content: flex-end;
- }
- > div {
- overflow: hidden;
- clear: both;
- }
- > img {
- display: block;
- max-width: 100%;
- margin: 0 auto;
- }
- }
- }
- }
- .NNPE-wordDetail {
- position: fixed;
- top: 50%;
- left: 50%;
- z-index: 116;
- max-width: 100%;
- margin-top: -196px;
- overflow: auto;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
- // width: 260px;
- // height: 200px;
- // background: #cc0;
- }
- .NNPE-detail-box {
- box-sizing: border-box;
- width: 100%;
- padding: 8px 24px;
- margin-bottom: 8px;
- &.active {
- background: rgba(222, 68, 68, 15%);
- }
- }
- .NNPE-details {
- overflow: hidden;
- clear: both;
- .NNPE-words {
- float: left;
- &-box {
- float: left;
- > span {
- display: block;
- &.NNPE-pinyin {
- height: 20px;
- font-family: 'League';
- font-size: 14px;
- font-weight: normal;
- line-height: 20px;
- color: rgba(0, 0, 0, 85%);
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 85%);
- }
- }
- &.NNPE-chs {
- font-family: '楷体';
- font-size: 20px;
- line-height: 28px;
- color: rgba(0, 0, 0, 85%);
- .active {
- color: #de4444;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 85%);
- }
- }
- // &.padding {
- // padding-right: 6px;
- // }
- }
- }
- &.textLeft {
- text-align: left;
- }
- &.textCenter {
- text-align: center;
- }
- &.textRight {
- text-align: right;
- }
- > span {
- display: block;
- &.NNPE-pinyin {
- height: 20px;
- font-family: 'League';
- font-size: 14px;
- font-weight: normal;
- line-height: 20px;
- color: rgba(0, 0, 0, 85%);
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 85%);
- }
- }
- &.NNPE-chs {
- font-family: '楷体';
- font-size: 20px;
- line-height: 28px;
- color: rgba(0, 0, 0, 85%);
- .active {
- color: #de4444;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 85%);
- }
- }
- &.padding {
- padding: 0 3px;
- }
- }
- }
- }
- .enwords {
- padding-left: 3px;
- font-family: 'Helvetica';
- font-size: 14px;
- font-weight: normal;
- line-height: 22px;
- color: rgba(0, 0, 0, 85%);
- word-break: break-word;
- &.wordBlank {
- color: rgba(0, 0, 0, 85%);
- }
- }
- .multilingual-para {
- text-indent: 40px;
- word-break: break-word;
- &-center {
- text-align: center;
- text-indent: 0;
- }
- }
- .NPC-Big-Book-preview-green {
- .NNPE-ArticleView {
- .NNPE-detail-box {
- &.active {
- background: rgba(36, 185, 158, 15%);
- }
- }
- }
- }
- .NPC-Big-Book-preview-brown {
- .NNPE-ArticleView {
- .NNPE-detail-box {
- &.active {
- background: rgba(189, 136, 101, 15%);
- }
- }
- }
- }
- </style>
|