|
@@ -11,7 +11,12 @@
|
|
|
<span v-if="pinyinPosition === 'top'" class="pinyin">
|
|
|
{{ text.pinyin.replace(/\s+/g, '') }}
|
|
|
</span>
|
|
|
- <span class="text" title="点击校对拼音" @click="correctPinyin1(text.text, i, j, k)">{{ text.text }}</span>
|
|
|
+ <span
|
|
|
+ :style="{ cursor: isPreview ? '' : 'pointer' }"
|
|
|
+ :title="isPreview ? '' : '点击校对拼音'"
|
|
|
+ @click="correctPinyin(text.text, i, j, k)"
|
|
|
+ >{{ text.text }}</span
|
|
|
+ >
|
|
|
<span v-if="pinyinPosition === 'bottom'" class="pinyin">{{ text.pinyin.replace(/\s+/g, '') }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -36,6 +41,10 @@ export default {
|
|
|
type: String,
|
|
|
required: true,
|
|
|
},
|
|
|
+ isPreview: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -49,7 +58,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 校对拼音
|
|
|
- correctPinyin1(text, i, j, k) {
|
|
|
+ correctPinyin(text, i, j, k) {
|
|
|
+ if (this.isPreview) return; // 如果是预览模式,不操作
|
|
|
if (text) {
|
|
|
this.visible = true;
|
|
|
this.selectContent = text;
|
|
@@ -93,10 +103,6 @@ export default {
|
|
|
font-family: 'League';
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
-
|
|
|
- .text {
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|