|
|
@@ -212,7 +212,7 @@
|
|
|
</p>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <span v-if="showLang" class="multilingual">
|
|
|
+ <span v-if="showLang" class="multilingual" :style="[tdStyle, computedRichStyle(col.content)]">
|
|
|
{{
|
|
|
multilingualTextList[getLang()] &&
|
|
|
multilingualTextList[getLang()][i] &&
|
|
|
@@ -308,22 +308,20 @@ export default {
|
|
|
this.data.col_width.forEach((item) => {
|
|
|
this.table_width += Number(item.value);
|
|
|
});
|
|
|
- if (this.showLang) {
|
|
|
- this.data.multilingual.forEach((item) => {
|
|
|
- let trans_arr = item.translation.split('\n');
|
|
|
- let chunkSize = this.data.property.column_count;
|
|
|
- let chunkedArr = trans_arr.reduce((acc, curr, index) => {
|
|
|
- // 当索引是chunkSize的倍数时,开始一个新的子数组
|
|
|
- if (index % chunkSize === 0) {
|
|
|
- acc.push([curr]); // 开始新的子数组并添加当前元素
|
|
|
- } else {
|
|
|
- acc[acc.length - 1].push(curr); // 将当前元素添加到最后一个子数组中
|
|
|
- }
|
|
|
- return acc;
|
|
|
- }, []);
|
|
|
- this.$set(this.multilingualTextList, item.type, chunkedArr);
|
|
|
- });
|
|
|
- }
|
|
|
+ this.data.multilingual.forEach((item) => {
|
|
|
+ let trans_arr = item.translation.split('\n');
|
|
|
+ let chunkSize = this.data.property.column_count;
|
|
|
+ let chunkedArr = trans_arr.reduce((acc, curr, index) => {
|
|
|
+ // 当索引是chunkSize的倍数时,开始一个新的子数组
|
|
|
+ if (index % chunkSize === 0) {
|
|
|
+ acc.push([curr]); // 开始新的子数组并添加当前元素
|
|
|
+ } else {
|
|
|
+ acc[acc.length - 1].push(curr); // 将当前元素添加到最后一个子数组中
|
|
|
+ }
|
|
|
+ return acc;
|
|
|
+ }, []);
|
|
|
+ this.$set(this.multilingualTextList, item.type, chunkedArr);
|
|
|
+ });
|
|
|
if (!this.isJudgingRightWrong) {
|
|
|
this.answer.answer_list = this.data.answer_list;
|
|
|
}
|
|
|
@@ -450,6 +448,7 @@ $border-color: #e6e6e6;
|
|
|
align-items: end;
|
|
|
|
|
|
p {
|
|
|
+ flex-grow: 1; // 为了常规模式时设置居中显示撑满整个单元格
|
|
|
max-width: 100%;
|
|
|
margin: 0;
|
|
|
}
|
|
|
@@ -532,6 +531,7 @@ $border-color: #e6e6e6;
|
|
|
}
|
|
|
|
|
|
.multilingual {
|
|
|
+ display: block;
|
|
|
word-break: break-word;
|
|
|
}
|
|
|
|