Demo:支持配置仅在导出时显示水印
This commit is contained in:
parent
2bcf763ea2
commit
d19fd7e186
@ -27,6 +27,7 @@ export default {
|
|||||||
enableFreeDrag: 'Enable node free drag',
|
enableFreeDrag: 'Enable node free drag',
|
||||||
watermark: 'Watermark',
|
watermark: 'Watermark',
|
||||||
showWatermark: 'Is show watermark',
|
showWatermark: 'Is show watermark',
|
||||||
|
onlyExport: 'Only export',
|
||||||
watermarkDefaultText: 'Watermark text',
|
watermarkDefaultText: 'Watermark text',
|
||||||
watermarkText: 'Watermark text',
|
watermarkText: 'Watermark text',
|
||||||
watermarkTextColor: 'Text color',
|
watermarkTextColor: 'Text color',
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export default {
|
|||||||
watermark: '水印',
|
watermark: '水印',
|
||||||
showWatermark: '是否显示水印',
|
showWatermark: '是否显示水印',
|
||||||
watermarkDefaultText: '水印文字',
|
watermarkDefaultText: '水印文字',
|
||||||
|
onlyExport: '是否仅在导出时显示',
|
||||||
watermarkText: '水印文字',
|
watermarkText: '水印文字',
|
||||||
watermarkTextColor: '文字颜色',
|
watermarkTextColor: '文字颜色',
|
||||||
watermarkLineSpacing: '水印行间距',
|
watermarkLineSpacing: '水印行间距',
|
||||||
|
|||||||
@ -566,6 +566,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="watermarkConfig.show">
|
<template v-if="watermarkConfig.show">
|
||||||
|
<!-- 是否仅在导出时显示 -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="rowItem">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="watermarkConfig.onlyExport"
|
||||||
|
@change="updateWatermarkConfig"
|
||||||
|
>{{ $t('baseStyle.onlyExport') }}</el-checkbox
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- 水印文字 -->
|
<!-- 水印文字 -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="rowItem">
|
<div class="rowItem">
|
||||||
@ -878,6 +888,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watermarkConfig: {
|
watermarkConfig: {
|
||||||
show: false,
|
show: false,
|
||||||
|
onlyExport: false,
|
||||||
text: '',
|
text: '',
|
||||||
lineSpacing: 100,
|
lineSpacing: 100,
|
||||||
textSpacing: 100,
|
textSpacing: 100,
|
||||||
@ -1019,7 +1030,7 @@ export default {
|
|||||||
// 初始化水印配置
|
// 初始化水印配置
|
||||||
initWatermark() {
|
initWatermark() {
|
||||||
let config = this.mindMap.getConfig('watermarkConfig')
|
let config = this.mindMap.getConfig('watermarkConfig')
|
||||||
;['text', 'lineSpacing', 'textSpacing', 'angle'].forEach(key => {
|
;['text', 'lineSpacing', 'textSpacing', 'angle', 'onlyExport'].forEach(key => {
|
||||||
this.watermarkConfig[key] = config[key]
|
this.watermarkConfig[key] = config[key]
|
||||||
})
|
})
|
||||||
this.watermarkConfig.show = !!config.text
|
this.watermarkConfig.show = !!config.text
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user