|
@@ -50,7 +50,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{ itemCon.chs }}</span>
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -73,7 +73,7 @@
|
|
|
]"
|
|
|
>{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
|
|
|
items.detail.wordsList[indexCon + 1].chs
|
|
|
}}</span>
|
|
|
<span
|
|
@@ -100,7 +100,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{ itemCon.chs }}</span>
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -213,7 +213,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{
|
|
|
itemCon.chs
|
|
|
}}</span>
|
|
|
<span
|
|
@@ -242,7 +242,7 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
}}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
|
|
|
items.detail.wordsList[indexCon + 1].chs
|
|
|
}}</span>
|
|
|
<span
|
|
@@ -271,7 +271,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{ itemCon.chs }}</span>
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -370,7 +370,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{ itemCon.chs }}</span>
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -395,7 +395,7 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
}}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
|
|
|
items.detail.wordsList[indexCon + 1].chs
|
|
|
}}</span>
|
|
|
<span
|
|
@@ -424,7 +424,7 @@
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con">{{ itemCon.chs }}</span>
|
|
|
+ <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -503,7 +503,22 @@ export default {
|
|
|
userErrList: [],
|
|
|
};
|
|
|
},
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ wordStyle() {
|
|
|
+ return function (config) {
|
|
|
+ if(config){
|
|
|
+ let sizeVal = config.fontSize.replace("px", "");
|
|
|
+ return {
|
|
|
+ minHeight: Number(sizeVal) + 9 + "px",
|
|
|
+ lineHeight: Number(sizeVal) + 8 + "px",
|
|
|
+ fontSize: config.fontSize,
|
|
|
+ fontFamily: config.fontFamily
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
@@ -553,6 +568,13 @@ export default {
|
|
|
pinyin: sItem.pinyin,
|
|
|
chs: sItem.chs,
|
|
|
isShow: sItem.isShow,
|
|
|
+ config: {
|
|
|
+ fontColor: sItem.fontColor,
|
|
|
+ fontFamily: sItem.fontFamily,
|
|
|
+ fontSize: sItem.fontSize,
|
|
|
+ underLine: sItem.underLine,
|
|
|
+ wordPadding: sItem.wordPadding,
|
|
|
+ },
|
|
|
};
|
|
|
paraArr.push(obj);
|
|
|
});
|