feat: 用类文本框显示文本
This commit is contained in:
parent
4d9a0006b6
commit
39960affb2
|
@ -1,10 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="rlhf-box">
|
<div class="rlhf-box">
|
||||||
<div v-for="(line, idx) in fileContent.split('<whale_n>')" :key="idx" class="line" @click="clickLine(idx)">
|
<div v-for="(line, idx) in fileContent.split('<whale_n>')" :key="idx" class="line" @click="clickLine(idx)">
|
||||||
<template v-for="(word, idx) in line">
|
<!-- <template v-for="(word, idx) in line">
|
||||||
<span class="word" v-if="word !== '\n'" :key="idx">{{ word }}</span>
|
<span class="word" v-if="word !== '\n'" :key="idx">{{ word }}</span>
|
||||||
<br v-if="word === '\n'" :key="idx"/>
|
<br v-if="word === '\n'" :key="idx"/>
|
||||||
</template>
|
</template> -->
|
||||||
|
<div class="textarea">{{line}}</div>
|
||||||
<span class="rank" v-if="annoDetails.indexOf(String(idx+1)) !== -1">{{annoDetails.indexOf(String(idx+1)) + 1}}</span>
|
<span class="rank" v-if="annoDetails.indexOf(String(idx+1)) !== -1">{{annoDetails.indexOf(String(idx+1)) + 1}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,4 +126,7 @@ export default ({
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
.textarea {
|
||||||
|
white-space: break-spaces;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue