12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781 |
- <template>
- <div :class="['voicefull', bgIndex === 0 ? 'bg1' : 'bg2']">
- <div
- class="voicefull-top"
- @mouseover="setTopShow(true)"
- @mouseleave="setTopShow(false)"
- >
- <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
- <div class="top-left">
- <div :class="['select-bg', bgIndex === 1 ? 'select-bg-blue' : '']">
- <div :class="['bg-green-box', bgIndex === 1 ? 'active' : '']">
- <span
- :class="['bg-green', bgIndex === 1 ? 'active' : '']"
- @click="changeBg(1)"
- />
- </div>
- <div :class="['bg-white-box', bgIndex === 0 ? 'active' : '']">
- <span
- :class="['bg-white', bgIndex === 0 ? 'active' : '']"
- @click="changeBg(0)"
- />
- </div>
- </div>
- <div
- :class="['set-fontSize', bgIndex === 1 ? 'set-fontSize-green' : '']"
- >
- <template v-if="hzSize >= 34">
- <span
- :class="[
- 'font-jian-black',
- bgIndex === 1 ? 'font-jian-yellow' : ''
- ]"
- @click="setFontSize('-')"
- />
- </template>
- <template v-else>
- <span
- :class="[
- 'font-jian-black',
- bgIndex === 1
- ? 'font-jian-yellow-disabled'
- : 'font-jian-white-disabled'
- ]"
- />
- </template>
- <span
- :class="[
- 'font-img-black',
- bgIndex === 1 ? 'font-img-yellow' : ''
- ]"
- />
- <template v-if="hzSize <= 76">
- <span
- :class="[
- 'font-jia-black',
- bgIndex === 1 ? 'font-jia-yellow' : ''
- ]"
- @click="setFontSize('+')"
- />
- </template>
- <template v-else>
- <span
- :class="[
- 'font-jia-black',
- bgIndex === 1
- ? 'font-jia-yellow-disabled'
- : 'font-jia-white-disabled'
- ]"
- />
- </template>
- </div>
- <div
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
- @click="changeStatus('isKeyboard')"
- >
- <span
- :class="[
- 'keyboard-icon',
- !isKeyboard ? 'disabled' : '',
- isKeyboard && bgIndex === 1 ? 'keyboard-icon-yellow' : ''
- ]"
- />
- </div>
- </div>
- <div class="top-middle">
- <template v-if="mp3">
- <voice-matrix-fullscreen-audio
- ref="audioLine"
- audio-id="voiceMatrixAudio"
- :bg-index="bgIndex"
- :mp3="mp3"
- :get-cur-time="getCurTime"
- :stop-audio="stopAudio"
- :has-selected-cell="hasSelectedCell"
- @playChange="playChange"
- @parentPlayAudio="playAudio"
- @handleChangeStopAudio="handleChangeStopAudio"
- />
- </template>
- <div
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
- @click="setStatus"
- >
- <span
- :class="[
- 'repeat-icon',
- !isRepeat && !isAuto ? 'disabled' : '',
- isRepeat && !isAuto ? 'auto-icon' : '',
- !isRepeat && bgIndex === 1 ? 'repeat-icon-yellow' : '',
- isRepeat && !isAuto && bgIndex === 1 ? 'auto-icon-yellow' : ''
- ]"
- />
- </div>
- <div
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
- @click="changePinyin"
- >
- <span
- :class="[
- 'pinyin-icon',
- !isShowPY || !isHasPY ? 'disabled' : '',
- isShowPY && isHasPY && bgIndex === 1 ? 'pinyin-icon-yellow' : ''
- ]"
- />
- </div>
- <div
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
- @click="changeEN"
- >
- <span
- :class="[
- 'en-icon',
- !isShowEN || !isHasEN ? 'disabled' : '',
- isShowEN && bgIndex === 1 && isHasEN ? 'en-icon-yellow' : ''
- ]"
- />
- </div>
- </div>
- <div
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
- @click="exitFullScreen"
- >
- <span
- :class="['close-icon', bgIndex === 1 ? 'close-icon-white' : '']"
- />
- </div>
- </div>
- </div>
- <div class="voicefull-content">
- <div
- v-if="curQue.voiceMatrix.matrix.length > 0"
- class="matrix"
- :style="{
- 'grid-template': `96px repeat(${curQue.voiceMatrix.matrix.length}, auto) minmax(1.5em, 1fr) / 112px repeat(${curQue.voiceMatrix.matrix[0].length}, auto) minmax(124px, 1fr)`,
- 'font-size': `${hzSize}px`
- }"
- @mouseleave="clearSelectCell"
- >
- <!-- 顶部单元格 -->
- <div class="matrix-top" @mouseenter="clearSelectCell" />
- <template v-for="(row, i) in curQue.voiceMatrix.matrix[0]">
- <div
- :key="`top-${i}`"
- :class="['matrix-top']"
- @mouseenter="checkboxMouseenter(selectColumn === i, 'column')"
- >
- <span
- v-if="
- row.type !== 'connection' && curQue.voiceMatrix.columnSelection
- "
- v-show="
- selectColumn === i ||
- (selectedLine.type === 'column' && selectedLine.index === i)
- "
- :class="[
- `matrix-checkbox-row-${themeColor}`,
- selectedLine.type === 'column' && selectedLine.index === i
- ? 'active'
- : ''
- ]"
- @click="selectRowOrColumn(i, 'column')"
- />
- </div>
- </template>
- <div class="matrix-top" @mouseenter="clearSelectCell" />
- <!-- 主矩阵 -->
- <template v-for="(row, i) in curQue.voiceMatrix.matrix">
- <div
- :key="`start-${i}`"
- :class="['column-wrapper']"
- @mouseenter="checkboxMouseenter(selectRow === i, 'row')"
- >
- <span
- v-if="curQue.voiceMatrix.rowSelection"
- v-show="
- selectRow === i ||
- (selectedLine.type === 'row' && selectedLine.index === i)
- "
- :class="[
- `matrix-checkbox-column-${themeColor}`,
- selectedLine.type === 'row' && selectedLine.index === i
- ? 'active'
- : ''
- ]"
- @click="selectRowOrColumn(i, 'row')"
- />
- </div>
- <!-- 单元格 -->
- <template v-for="(column, j) in row">
- <div
- :key="`wrapper-${i}-${j}`"
- :class="[
- 'column-wrapper',
- (i === 0 && curQue.voiceMatrix.firstLineHighlight) ||
- (j === row.length - 1 && curQue.voiceMatrix.lastColumnHighlight)
- ? `highlight-${themeColor}`
- : ''
- ]"
- @mouseenter="matrixCellMouseenter(i, j, column.type)"
- >
- <!-- 文本 -->
- <div
- v-if="column.type === 'text'"
- :key="`column-${i}-${j}`"
- :class="[
- column.text.length === 0 ? 'space' : `column-${themeColor}`,
- (selectCell.row === i && selectCell.column === j) ||
- (selectedLine.type === 'column' &&
- selectedLine.index === j) ||
- (selectedLine.type === 'row' && selectedLine.index === i)
- ? 'selected'
- : '',
- playing &&
- column.lrc_data.begin_time / 1000 <= curTime &&
- (curTime < column.lrc_data.end_time / 1000 ||
- column.lrc_data.end_time === -1)
- ? 'playing'
- : '',
- column.isTitle ? 'title' : ''
- ]"
- @click="matrixCellClick(i, j)"
- >
- <span>{{ column.text }}</span>
- </div>
- <!-- 连接线 -->
- <div
- v-else-if="column.type === 'connection'"
- :key="`column-${i}-${j}`"
- :class="[
- 'connection',
- i === 0 && curQue.voiceMatrix.firstLineHighlight
- ? `highlight-bc-${themeColor}`
- : ''
- ]"
- />
- <!-- 分词 -->
- <div
- v-else-if="column.type === 'SentenceSegwordChs'"
- :key="`column-${i}-${j}`"
- :class="[
- `sentence-${themeColor}`,
- (selectCell.row === i && selectCell.column === j) ||
- (selectedLine.type === 'column' &&
- selectedLine.index === j) ||
- (selectedLine.type === 'row' && selectedLine.index === i)
- ? 'selected'
- : '',
- playing &&
- column.lrc_data.begin_time / 1000 <= curTime &&
- (curTime < column.lrc_data.end_time / 1000 ||
- column.lrc_data.end_time === -1)
- ? 'playing'
- : '',
- column.isTitle ? 'title' : ''
- ]"
- :style="{
- 'grid-template-columns': `repeat(${column.sentence_data.wordsList.length}, auto)`
- }"
- @click="matrixCellClick(i, j)"
- >
- <template
- v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
- >
- <span
- :key="`${column.sentence_data.pyPosition === 'top' ? 'pinyin' : 'chs'}-${w}`"
- :style="{visibility: column.sentence_data.pyPosition === 'top' && isShowPY ? 'visible' : 'hidden'}"
- :class="column.sentence_data.pyPosition === 'top' ? 'pinyin' : 'chs'"
- >
- {{ column.sentence_data.pyPosition === 'top' ? pinyin : chs }}
- </span>
- </template>
- <template
- v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
- >
- <span
- :key="`${column.sentence_data.pyPosition === 'top' ? 'chs' : 'pinyin'}-${w}`"
- :style="{visibility: column.sentence_data.pyPosition !== 'top' && isShowPY ? 'hidden' : 'visible'}"
- :class="column.sentence_data.pyPosition === 'top' ? 'chs' : 'pinyin'"
- >
- {{ column.sentence_data.pyPosition === 'top' ? chs : pinyin }}
- </span>
- </template>
- </div>
- <!-- 拼音 + 英文 -->
- <div
- v-else-if="column.type === 'PinyinEnglish'"
- :key="`column-${i}-${j}`"
- :class="[
- `pinyinEnglish-${themeColor}`,
- (selectCell.row === i && selectCell.column === j) ||
- (selectedLine.type === 'column' &&
- selectedLine.index === j) ||
- (selectedLine.type === 'row' && selectedLine.index === i)
- ? 'selected'
- : '',
- playing &&
- column.lrc_data.begin_time / 1000 <= curTime &&
- (curTime < column.lrc_data.end_time / 1000 ||
- column.lrc_data.end_time === -1)
- ? 'playing'
- : '',
- column.isTitle ? 'title' : ''
- ]"
- @click="matrixCellClick(i, j)"
- >
- <div class="inside-wrapper">
- <div
- class="pinyin"
- >
- {{ column.pinyin_english_data.pinyin }}
- </div>
- <div class="english" :style="{visibility: isShowEN ? 'visible' : 'hidden'}">
- {{ column.pinyin_english_data.english }}
- </div>
- </div>
- </div>
- <!-- 文本中有括号 -->
- <div
- v-else-if="column.type === 'textBrackets'"
- :key="`column-${i}-${j}`"
- :class="[
- `textBrackets-${themeColor}`,
- (selectCell.row === i && selectCell.column === j) ||
- (selectedLine.type === 'column' &&
- selectedLine.index === j) ||
- (selectedLine.type === 'row' && selectedLine.index === i)
- ? 'selected'
- : '',
- playing &&
- column.lrc_data.begin_time / 1000 <= curTime &&
- (curTime < column.lrc_data.end_time / 1000 ||
- column.lrc_data.end_time === -1)
- ? 'playing'
- : '',
- column.isTitle ? 'title' : ''
- ]"
- @click="matrixCellClick(i, j)"
- >
- <span>
- <span class="brackets-text">{{
- column.text_brackets.brackets_outer
- }}</span>
- <span class="brackets"> [ </span>
- <span class="brackets-text">{{
- column.text_brackets.brackets_inner
- }}</span>
- <span class="brackets"> ]</span>
- </span>
- </div>
- </div>
- </template>
- <div :key="`end-${i}`" @mouseenter="clearSelectCell" />
- </template>
- <!-- 底部格子 -->
- <div class="matrix-bottom" @mouseenter="clearSelectCell" />
- <template v-for="(row, i) in curQue.voiceMatrix.matrix[0]">
- <div :key="`bottom-${i}`" @mouseenter="clearSelectCell" />
- </template>
- <div class="matrix-bottom" @mouseenter="clearSelectCell" />
- </div>
- </div>
- <div
- class="voicefull-bottom"
- @mouseover="setBottomShow(true)"
- @mouseleave="setBottomShow(false)"
- >
- <div :class="['voicefull-bottom-show', isBottomShow ? '' : 'hidden']">
- <div class="bottom-left">
- <soundrecorddiff
- ref="Soundrecorddiff"
- :bg-index="bgIndex"
- :file-name="fileName"
- :select-data="selectData"
- @getSelectData="getSelectData"
- @getWavblob="getWavblob"
- @handleParentPlay="handleParentPlay"
- @sentPause="sentPause"
- @getRerordStatus="getRerordStatus"
- @getMicrophoneStatus="getMicrophoneStatus"
- @getPlayStatus="getPlayStatus"
- />
- <div
- v-if="isShowCompare"
- :class="['compare-box', bgIndex === 1 ? 'compare-box-white' : '']"
- >
- <audio-compare
- type="full"
- :theme-color="themeColor"
- :url="mp3"
- :wavblob="wavblob"
- :sent-pause="sentPause"
- :is-record="isRecord"
- :handle-change-stop-audio="handleChangeStopAudio"
- :get-play-status="getPlayStatus"
- :matrix-select-lrc="matrixSelectLrc"
- :get-cur-time="getCurTime"
- :cur-time="curTime"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import VoiceMatrixFullscreenAudio from "./VoiceMatrixFullscreenAudio.vue";
- import Soundrecorddiff from "./Soundrecorddiff.vue";
- import AudioCompare from "./AudioCompareMatrix.vue";
- import Wordcard from "./components/Wordcard.vue";
- export default {
- components: {
- VoiceMatrixFullscreenAudio,
- Soundrecorddiff,
- AudioCompare,
- Wordcard
- },
- props: ["mp3", "curQue", "themeColor"],
- data() {
- return {
- hzSize: 48,
- bgIndex: 1,
- item: null,
- curTime: 0,
- stopAudio: false,
- isShowCompare: false,
- clientY: 0,
- top: 0,
- left: 0,
- isShow: false,
- curWordTime: 0,
- playing: false,
- isAuto: false,
- autoCount: 0,
- key: "isRepeat",
- isKeyboard: true,
- isTopShow: false,
- isBottomShow: false,
- isRecording: false,
- recordPlaying: false,
- fileName: "",
- // 底色行、列
- selectRow: -1,
- selectColumn: -1,
- // 行、列选中
- selectedLine: {
- type: "",
- index: 0
- },
- // 点击选中
- selectCell: {
- row: -1,
- column: -1
- },
- isRepeat: false,
- // 跟读所需属性
- wavblob: null,
- isRecord: false,
- matrixSelectLrc: null,
- unWatch: null,
- lrcArray: [],
- cellTimer: null,
- // 拼音、英文显隐判断
- isShowPY: true,
- isShowEN: true
- };
- },
- computed: {
- isHasPY() {
- let matrix = this.curQue.voiceMatrix.matrix;
- for (let i = 0; i < matrix.length; i++) {
- if (matrix[i].some(({ type }) => type === "SentenceSegwordChs")) {
- return true;
- }
- }
- return false;
- },
- isHasEN() {
- let matrix = this.curQue.voiceMatrix.matrix;
- for (let i = 0; i < matrix.length; i++) {
- if (matrix[i].some(({ type }) => type === "PinyinEnglish")) return true;
- }
- return false;
- },
- hasSelectedCell() {
- let { type, index } = this.selectedLine;
- let { row, column } = this.selectCell;
- return (type.length > 0 && index >= 0) || (row >= 0 && column >= 0);
- },
- selectData() {
- let { type, index } = this.selectedLine;
- let { row, column } = this.selectCell;
- return {
- type: type.length > 0 && index >= 0 ? type : "cell",
- index,
- row,
- column
- };
- },
- // 矩阵的行、列数从 0 开始
- matrix() {
- const matrixArr = this.curQue.voiceMatrix.matrix;
- return {
- rows: matrixArr.length - 1,
- columns: matrixArr.length > 0 ? matrixArr[0].length - 1 : -1
- };
- }
- },
- watch: {
- isRecording(newVal) {
- if (newVal) {
- this.isBottomShow = newVal;
- }
- },
- recordPlaying(newVal) {
- if (newVal) {
- this.isBottomShow = newVal;
- }
- },
- isShow(val) {
- 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;
- }
- }, 50);
- }
- }
- },
- created() {
- document.addEventListener("keyup", this.handleKeyup);
- [
- "fullscreenchange",
- "mozfullscreenchange",
- "webkitfullscreenchange",
- "msfullscreenchange"
- ].forEach(event => {
- document.addEventListener(event, this.handleFullscreen);
- });
- },
- beforeDestroy() {
- document.removeEventListener("keyup", this.handleKeyup);
- [
- "fullscreenchange",
- "mozfullscreenchange",
- "webkitfullscreenchange",
- "msfullscreenchange"
- ].forEach(event => {
- document.removeEventListener(event, this.handleFullscreen);
- });
- },
- // 方法集合
- methods: {
- // #region
- /** 语音矩阵方法开始 **/
- // 鼠标移入移出
- matrixCellMouseenter(i, j, type) {
- if (type === "connection") {
- this.selectRow = -1;
- this.selectColumn = -1;
- } else {
- this.selectRow = i;
- this.selectColumn = j;
- }
- },
- clearSelectCell() {
- this.selectRow = -1;
- this.selectColumn = -1;
- },
- // 单击单元格
- matrixCellClick(row, column) {
- if (this.playing) this.handleParentPlay();
- if (this.unWatch) this.unWatch();
- this.lrcArray = [];
- if (row === this.selectCell.row && column === this.selectCell.column) {
- this.selectCell = { row: -1, column: -1 };
- return;
- }
- this.selectedLine = { type: "", index: -1 };
- this.selectCell = { row, column };
- this.handleChangeTime(
- this.curQue.voiceMatrix.matrix[row][column].lrc_data
- );
- // 设置录音文件名
- this.setRecordingFileName(row, column);
- },
- setRecordingFileName(row, column) {
- let {
- type,
- text,
- sentence_data,
- pinyin_english_data,
- text_brackets
- } = this.curQue.voiceMatrix.matrix[row][column];
- if (type === "text") this.fileName = text;
- if (type === "SentenceSegwordChs") this.fileName = sentence_data.sentence;
- if (type === "PinyinEnglish") this.fileName = pinyin_english_data.pinyin;
- if (type === "textBrackets") {
- this.fileName = `${text_brackets.brackets_outer}[${text_brackets.brackets_inner}]`;
- }
- },
- checkboxMouseenter(isSelected, type) {
- if (!isSelected) return this.clearSelectCell();
- if (type === "row") this.selectColumn = -1;
- if (type === "column") this.selectRow = -1;
- },
- // 选中行、列
- selectRowOrColumn(index, type) {
- this.handleParentPlay();
- this.lrcArray = [];
- this.selectCell = { row: -1, column: -1 };
- if (this.unWatch) this.unWatch();
- if (
- this.selectedLine.type === type &&
- this.selectedLine.index === index
- ) {
- this.selectedLine = { type: "", index: -1 };
- return;
- }
- this.selectedLine = { type, index };
- let number = index;
- if (type === "column") {
- this.curQue.voiceMatrix.matrix[index].forEach(({ type }, i) => {
- if (i >= index) return;
- if (type === "connection") number -= 1;
- });
- }
- this.fileName = `第 ${number + 1} ${type === "row" ? "行" : "列"}`;
- },
- playAudio() {
- if (!this.hasSelectedCell) return;
- if (this.playing) return this.handleParentPlay();
- if (this.lrcArray.length > 0) return this.$refs.audioLine.PlayAudio();
- if (this.unWatch) this.unWatch();
- this.lrcArray = [];
- let { type, index } = this.selectedLine;
- if (type.length > 0 && index >= 0 && type === "row") {
- this.curQue.voiceMatrix.matrix[index].forEach(item => {
- let data = this.getLrcData(item);
- if (data) this.lrcArray.push(data);
- });
- if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
- return;
- }
- if (type.length > 0 && index >= 0 && type === "column") {
- this.curQue.voiceMatrix.matrix.forEach(item => {
- let data = this.getLrcData(item[index]);
- if (data) this.lrcArray.push(data);
- });
- if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
- return;
- }
- let { row, column } = this.selectCell;
- if (row >= 0 && column >= 0) {
- this.handleChangeTime(
- this.curQue.voiceMatrix.matrix[row][column].lrc_data
- );
- }
- },
- lrcPlay({ begin_time, end_time }, index) {
- this.handleParentPlay();
- this.$nextTick(() => {
- this.$refs.audioLine.onTimeupdateTime(begin_time / 1000);
- this.$refs.audioLine.PlayAudio();
- if (end_time === -1) return;
- let end = end_time / 1000 - 0.01;
- this.unWatch = this.$watch("curTime", val => {
- if (val >= end) {
- if (!this.hasSelectedCell) return this.unWatch();
- this.handleParentPlay();
- this.$refs.audioLine.onTimeupdateTime(end);
- this.unWatch();
- let i = index + 1;
- if (i < this.lrcArray.length) {
- return this.lrcPlay(this.lrcArray[i], i);
- }
- // 多次循环
- if (this.isRepeat) {
- return this.lrcPlay(this.lrcArray[0], 0);
- }
- // 单次循环
- if (this.isAuto && this.autoCount === 1) {
- this.autoCount = 0;
- this.lrcArray = [];
- return;
- }
- if (this.isAuto && this.autoCount === 0) {
- this.autoCount += 1;
- return this.lrcPlay(this.lrcArray[0], 0);
- }
- this.lrcArray = [];
- }
- });
- });
- },
- // 暂停音频播放
- handleParentPlay() {
- this.stopAudio = true;
- },
- // 音频播放时改变布尔值
- handleChangeStopAudio() {
- this.stopAudio = false;
- },
- getCurTime(curTime) {
- this.curTime = curTime;
- },
- getWavblob(wavblob) {
- this.wavblob = wavblob;
- },
- getSelectData({ type, index, row, column }) {
- if (type === "") return;
- let arr = [];
- if (type.length > 0 && index >= 0 && type === "row") {
- this.curQue.voiceMatrix.matrix[index].forEach(item => {
- let data = this.getLrcData(item);
- if (data) arr.push(data);
- });
- this.matrixSelectLrc = arr;
- return;
- }
- if (type.length > 0 && index >= 0 && type === "column") {
- this.curQue.voiceMatrix.matrix.forEach(item => {
- let data = this.getLrcData(item[index]);
- if (data) arr.push(data);
- });
- this.matrixSelectLrc = arr;
- return;
- }
- if (type === "cell" && row >= 0 && column >= 0) {
- let lrcData = this.curQue.voiceMatrix.matrix[row][column].lrc_data;
- if (lrcData.end_time === -1) lrcData.end_time = this.mp3Duration;
- this.matrixSelectLrc = [lrcData];
- }
- },
- getLrcData({ type, text, lrc_data }) {
- if (
- type === "SentenceSegwordChs" ||
- type === "PinyinEnglish" ||
- type === "textBrackets" ||
- (type === "text" && text.length > 0)
- ) {
- if (lrc_data.end_time === -1) {
- return {
- begin_time: lrc_data.begin_time,
- end_time: this.mp3Duration,
- text: lrc_data.text
- };
- }
- return lrc_data;
- }
- return false;
- },
- sentPause(isRecord) {
- this.isRecord = isRecord;
- },
- handleChangeTime({ begin_time, end_time }) {
- if (this.unWatch) this.unWatch();
- this.handleParentPlay();
- this.$nextTick(() => {
- this.$refs.audioLine.onTimeupdateTime(begin_time / 1000);
- this.$refs.audioLine.PlayAudio();
- // 监听是否已到结束时间,为了选中效果 - 0.01
- if (end_time === -1) return;
- let end = end_time / 1000 - 0.01;
- this.unWatch = this.$watch("curTime", val => {
- if (val >= end) {
- this.handleParentPlay();
- this.$refs.audioLine.onTimeupdateTime(end);
- this.unWatch();
- this.unWatch = null;
- }
- });
- });
- },
- /** 语音矩阵方法结束 **/
- // #endregion
- /* 全局事件处理 */
- handleKeyup({ key }) {
- if (!this.isKeyboard) return;
- if (key === "Enter") {
- this.$refs.Soundrecorddiff.microphone();
- }
- if (key === " ") {
- this.hasSelectedCell
- ? this.playAudio()
- : this.$refs.audioLine.PlayAudio();
- }
- if (!this.hasSelectedCell) return;
- if (key === "ArrowUp") {
- let { type, index, row, column } = this.selectData;
- if (type === "cell" && row > 0) {
- return this.matrixCellClick(row - 1, column);
- }
- if ((type === "column" || type === "row") && index > 0) {
- return this.selectRowOrColumn(index - 1, type);
- }
- }
- if (key === "ArrowDown") {
- let { type, index, row, column } = this.selectData;
- let { rows } = this.matrix;
- if (type === "cell" && row < rows) {
- return this.matrixCellClick(row + 1, column);
- }
- if ((type === "column" || type === "row") && index < rows) {
- return this.selectRowOrColumn(index + 1, type);
- }
- }
- if (key === "ArrowLeft") {
- let { type, row, column } = this.selectData;
- if (type !== "cell") return;
- if (column > 0) {
- return this.matrixCellClick(row, column - 1);
- }
- }
- if (key === "ArrowRight") {
- let { columns } = this.matrix;
- let { type, row, column } = this.selectData;
- if (type !== "cell") return;
- if (column < columns) {
- return this.matrixCellClick(row, column + 1);
- }
- }
- },
- handleFullscreen() {
- let isFullscreen = Boolean(
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen ||
- document.webkitFullScreen ||
- document.msFullScreen
- );
- if (!isFullscreen) this.changeFullScreen();
- },
- setTopShow(bool) {
- this.isTopShow = bool;
- },
- setBottomShow(bool) {
- if (!this.recordPlaying && !this.isRecording) {
- this.isBottomShow = bool;
- }
- },
- getPlayStatus(bool) {
- this.recordPlaying = bool;
- },
- setFontSize(type) {
- if (this.hzSize >= 34 || this.hzSize <= 76) {
- type === "+" ? (this.hzSize += 4) : (this.hzSize -= 4);
- }
- },
- playChange(bool) {
- this.playing = bool;
- },
- changeStatus(key) {
- this[key] = !this[key];
- },
- setStatus() {
- if (this.key === "isRepeat") {
- if (this.isRepeat) {
- this.isRepeat = false;
- this.isAuto = true;
- this.autoCount = 0;
- this.key = "isAuto";
- } else {
- this.isRepeat = true;
- this.key = "isRepeat";
- }
- } else if (this.key === "isAuto") {
- if (this.isAuto) {
- this.isRepeat = false;
- this.isAuto = false;
- this.key = "isRepeat";
- }
- }
- },
- getRerordStatus(bool) {
- this.isShowCompare = bool;
- },
- getMicrophoneStatus(bool) {
- this.isRecording = bool;
- },
- getCurCompareTime(curTime) {
- this.curTime = curTime * 1000;
- },
- getCurWordTime(curTime) {
- this.curWordTime = curTime * 1000;
- },
- changePinyin() {
- if (!this.isHasPY) return;
- this.isShowPY = !this.isShowPY;
- },
- changeEN() {
- if (!this.isHasEN) return;
- this.isShowEN = !this.isShowEN;
- },
- changeBg(bgIndex) {
- this.bgIndex = bgIndex;
- },
- pauseAudio() {
- let audio = document.getElementsByTagName("audio");
- audio.forEach(item => {
- item.pause();
- });
- },
- exitFullScreen() {
- this.pauseAudio();
- this.$emit("exitFullscreen");
- },
- changeFullScreen() {
- this.pauseAudio();
- this.$emit("changeIsFull");
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- $select-color: #de4444;
- $border-color: #e6e6e6;
- $select-color-green: #24b99e;
- $select-color-green-bc: rgba(36, 185, 158, 0.25);
- $select-color-green-hover: #3dd4b8;
- $select-color-green-active: #1fa189;
- $select-color-brown: #bd8865;
- $select-color-brown-bc: rgba(189, 136, 101, 0.25);
- $select-color-brown-hover: #d6a687;
- $select-color-brown-active: #a37557;
- $dark-color: #ffc600;
- $dark-color-play: #fff2c6;
- .voicefull {
- width: 100%;
- height: 100vh;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- &.bg1 {
- background: #fff;
- color: #062211;
- .playing {
- color: $select-color !important;
- }
- }
- // 黑暗模式 强制替换颜色
- &.bg2 {
- background: linear-gradient(180deg, #274533 0%, #385f45 100%);
- color: #fff;
- .column-wrapper {
- &:hover {
- color: $dark-color !important;
- }
- .selected {
- color: $dark-color !important;
- }
- .playing {
- color: $dark-color-play;
- text-shadow: 0 0 0.1em, 0 0 0.3em;
- }
- &.highlight-,
- &.highlight-red,
- &.highlight-brown,
- &.highlight-green {
- color: $dark-color !important;
- }
- .matrix-checkbox-column-,
- .matrix-checkbox-column-red,
- .matrix-checkbox-column-brown,
- .matrix-checkbox-column-green {
- &.active {
- border-color: $dark-color !important;
- &::after {
- border-color: $dark-color !important;
- }
- }
- }
- .connection {
- &.highlight-bc-,
- &.highlight-bc-red,
- &.highlight-bc-brown,
- &.highlight-bc-green {
- background-color: $dark-color !important;
- }
- }
- }
- .matrix-top {
- .matrix-checkbox-row-,
- .matrix-checkbox-row-green,
- .matrix-checkbox-row-brown,
- .matrix-checkbox-row-red {
- &.active {
- border-color: $dark-color !important;
- &::after {
- border-color: $dark-color !important;
- }
- }
- }
- }
- }
- &-top {
- height: 136px;
- width: 100%;
- padding: 0 40px;
- .voicefull-top-hidden {
- width: 100%;
- height: 136px;
- visibility: hidden;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .voicefull-top-show {
- width: 100%;
- height: 136px;
- visibility: visible;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .top-left {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- .select-bg {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 96px;
- height: 56px;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 32px;
- &.select-bg-blue {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- > div {
- width: 36px;
- height: 36px;
- border-radius: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- &.bg-white-box {
- background: 0 0;
- margin-right: 4px;
- &.active {
- background: #de4444;
- }
- }
- &.bg-green-box {
- background: #fff;
- &.active {
- background: #ffc600;
- }
- }
- > span {
- width: 24px;
- height: 24px;
- border-radius: 100%;
- cursor: pointer;
- &.bg-white {
- background: #fff;
- }
- &.bg-green {
- background: linear-gradient(180deg, #274533 0%, #385f45 100%);
- }
- }
- }
- }
- .set-fontSize {
- padding: 0 20px;
- height: 56px;
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- &-green {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- > span {
- width: 24px;
- height: 24px;
- margin: 0 4px;
- &.font-jian {
- &-black {
- background: url("../../../assets/NPC/jian-black.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow {
- background: url("../../../assets/NPC/jian-white.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-white-disabled {
- background: url("../../../assets/NPC/jian-white-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow-disabled {
- background: url("../../../assets/NPC/jian-yellow-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- }
- &.font-img {
- &-black {
- background: url("../../../assets/NPC/fontSize-black.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/NPC/fontSize-white.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- }
- &.font-jia {
- &-black {
- background: url("../../../assets/NPC/jia-black.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow {
- background: url("../../../assets/NPC/jia-white.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-white-disabled {
- background: url("../../../assets/NPC/jia-white-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow-disabled {
- background: url("../../../assets/NPC/jia-yellow-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- }
- }
- }
- .top-middle {
- display: flex;
- justify-content: center;
- align-items: center;
- .audio-box {
- width: 56px;
- height: 56px;
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- &-green {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- }
- }
- }
- .op-btn {
- width: 56px;
- height: 56px;
- border-radius: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- margin-left: 32px;
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- &-green {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- &.close-btn {
- background: #274533;
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- > span {
- width: 24px;
- height: 24px;
- &.close-icon {
- background: url("../../../assets/icon/cross-24-normal-black.png")
- no-repeat left top;
- background-size: 100% 100%;
- &-white {
- background: url("../../../assets/icon/cross-24-normal-white.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- }
- }
- .repeat-icon {
- background: url("../../../assets/icon/Repeat-24-normal-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &.disabled {
- background: url("../../../assets/icon/Repeat-24-disable-Black.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/icon/Repeat-24-normal-yellow.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- &.auto-icon {
- background: url("../../../assets/icon/Auto-24-next-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &-yellow {
- background: url("../../../assets/icon/Auto-24-next-yellow.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- }
- .pinyin-icon {
- background: url("../../../assets/icon/pinyin-24-normal-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &.disabled {
- background: url("../../../assets/icon/pinyin-24-disable-Black.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/icon/pinyin-24-normal-yellow.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- .en-icon {
- background: url("../../../assets/icon/EN-24-normal-Red.png") no-repeat left
- top;
- background-size: 100% 100%;
- &.disabled {
- background: url("../../../assets/icon/EN-24-disable-Black.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/icon/EN-24-normal-yellow.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- }
- .keyboard-icon {
- background: url("../../../assets/icon/enter-24-keyboard-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &.disabled {
- background: url("../../../assets/icon/enter-24-keyboard-disable-Black.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/icon/enter-24-keyboard-yellow.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- &-content {
- flex: 1;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- // 语音矩阵
- .matrix {
- display: inline-grid;
- gap: 20px 48px;
- height: 100%;
- word-break: break-word;
- %matrix-checkbox {
- position: relative;
- top: calc(50% - 0.25em);
- display: block;
- width: 0.5em;
- height: 0.5em;
- border: 1.5px solid #b0b0b0;
- border-radius: 4px;
- margin: 0 auto;
- cursor: pointer;
- &.active {
- border-color: $select-color;
- &::after {
- box-sizing: content-box;
- content: "";
- border: 1px solid $select-color;
- border-left: 0;
- border-top: 0;
- width: 0.1em;
- height: 0.25em;
- top: 18%;
- left: 37%;
- position: absolute;
- transform: rotate(45deg) scaleY(1);
- transition: transform 0.15s ease-in 0.05s;
- transform-origin: center;
- }
- }
- }
- .matrix-checkbox-row-,
- .matrix-checkbox-row-red {
- @extend %matrix-checkbox;
- }
- .matrix-checkbox-row-green {
- @extend %matrix-checkbox;
- &.active {
- border-color: $select-color-green-active;
- &::after {
- border-color: $select-color-green-active;
- }
- }
- }
- .matrix-checkbox-row-brown {
- @extend %matrix-checkbox;
- &.active {
- border-color: $select-color-brown-active;
- &::after {
- border-color: $select-color-brown-active;
- }
- }
- }
- %matrix-checkbox-column,
- .matrix-checkbox-column-,
- .matrix-checkbox-column-red {
- @extend %matrix-checkbox;
- top: calc(50% - 0.25em);
- right: -48px;
- }
- .matrix-checkbox-column-green {
- @extend %matrix-checkbox-column;
- &.active {
- border-color: $select-color-green-active;
- &::after {
- border-color: $select-color-green-active;
- }
- }
- }
- .matrix-checkbox-column-brown {
- @extend %matrix-checkbox-column;
- &.active {
- border-color: $select-color-brown-active;
- &::after {
- border-color: $select-color-brown-active;
- }
- }
- }
- .read {
- background-color: #eaeaea;
- }
- .highlight-,
- .highlight-red {
- color: $select-color;
- }
- .highlight-green {
- color: $select-color-green;
- }
- .highlight-brown {
- color: $select-color-brown;
- }
- .column-wrapper {
- padding: 4px;
- %column {
- width: 100%;
- height: 100%;
- min-height: 32px;
- border-radius: 8px;
- transition: 0.2s;
- cursor: pointer;
- user-select: none;
- &:hover {
- border-color: #8c8c8c;
- }
- &.selected {
- color: $select-color;
- border-color: $select-color;
- }
- &.title {
- background-color: transparent;
- border-color: transparent;
- }
- > span {
- display: inline-block;
- padding: 4px 12px;
- }
- }
- %column-red,
- .column-,
- .column-red {
- @extend %column;
- position: relative;
- font-family: "GB-PINYINOK-B", "FZJCGFKTK";
- &::before {
- display: inline-block;
- content: "";
- vertical-align: middle;
- }
- }
- .column-green {
- @extend %column-red;
- &.selected {
- color: $select-color-green;
- border-color: $select-color-green;
- }
- }
- .column-brown {
- @extend %column-red;
- &.selected {
- color: $select-color-brown;
- border-color: $select-color-brown;
- }
- }
- %sentence,
- .sentence-,
- .sentence-red {
- @extend %column;
- display: inline-grid;
- padding: 4px 12px;
- column-gap: 8px;
- justify-items: center;
- justify-content: start;
- > span {
- padding: 0;
- }
- .pinyin {
- font-family: "GB-PINYINOK-B";
- opacity: 0.45;
- font-size: 0.75em;
- }
- .chs {
- font-family: "FZJCGFKTK";
- font-size: 1em;
- }
- }
- .sentence-green {
- @extend %sentence;
- &.selected {
- color: $select-color-green;
- border-color: $select-color-green;
- }
- }
- .sentence-brown {
- @extend %sentence;
- &.selected {
- color: $select-color-brown;
- border-color: $select-color-brown;
- }
- }
- .connection {
- position: relative;
- top: calc(50% - 1px);
- height: 2px;
- width: 16px;
- margin: 0 -4px;
- border-radius: 4px;
- background-color: #252525;
- &.highlight-bc-,
- &.highlight-bc-red {
- background-color: $select-color;
- }
- &.highlight-bc-green {
- background-color: $select-color-green;
- }
- &.highlight-bc-brown {
- background-color: $select-color-brown;
- }
- }
- // 拼音 + 文字
- %pinyinEnglish,
- .pinyinEnglish-,
- .pinyinEnglish-red {
- @extend %column;
- .inside-wrapper {
- padding: 4px 12px;
- .pinyin {
- font-family: "GB-PINYINOK-B";
- font-size: 1em;
- }
- .english {
- font-family: "robot";
- opacity: 0.45;
- font-size: 0.75em;
- }
- }
- }
- .pinyinEnglish-green {
- @extend %pinyinEnglish;
- &.selected {
- color: $select-color-green;
- border-color: $select-color-green;
- }
- }
- .pinyinEnglish-brown {
- @extend %pinyinEnglish;
- &.selected {
- color: $select-color-brown;
- border-color: $select-color-brown;
- }
- }
- %textBrackets,
- .textBrackets-,
- .textBrackets-red {
- @extend %column;
- .brackets-text {
- font-family: "GB-PINYINOK-B";
- }
- .brackets {
- font-size: 1em;
- font-family: "FZJCGFKTK";
- }
- }
- .textBrackets-green {
- @extend %textBrackets;
- &.selected {
- color: $select-color-green;
- border-color: $select-color-green;
- }
- }
- .textBrackets-brown {
- @extend %textBrackets;
- &.selected {
- color: $select-color-brown;
- border-color: $select-color-brown;
- }
- }
- }
- }
- }
- &-bottom {
- height: 136px;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-right: 40px;
- .voicefull-bottom-show {
- height: 136px;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- visibility: visible;
- &.hidden {
- visibility: hidden;
- }
- }
- .bottom-left {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .compare-box {
- height: 56px;
- padding: 16px 16px;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 0 40px 40px 0;
- border-left: 0px solid rgba(0, 0, 0, 0.1);
- &-white {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-left: 0;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .NPC-Big-Book-preview-green {
- .bg1 {
- .repeat-icon {
- background: url("../../../assets/icon/Repeat-24-normal-Green.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- .pinyin-icon {
- background: url("../../../assets/icon/pinyin-24-normal-green.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- .en-icon {
- background: url("../../../assets/icon/EN-24-normal-Green.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- }
- }
- .NPC-Big-Book-preview-brown {
- .bg1 {
- .repeat-icon {
- background: url("../../../assets/icon/Repeat-24-normal-Brown.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- .en-icon {
- background: url("../../../assets/icon/EN-24-normal-Brown.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- .coll-icon {
- background: url("../../../assets/icon/bookmarkfill-24-normal-brown.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- }
- </style>
|