mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Demo:支持配置仅在导出时显示水印
This commit is contained in:
parent
2bcf763ea2
commit
d19fd7e186
@ -27,6 +27,7 @@ export default {
|
||||
enableFreeDrag: 'Enable node free drag',
|
||||
watermark: 'Watermark',
|
||||
showWatermark: 'Is show watermark',
|
||||
onlyExport: 'Only export',
|
||||
watermarkDefaultText: 'Watermark text',
|
||||
watermarkText: 'Watermark text',
|
||||
watermarkTextColor: 'Text color',
|
||||
|
||||
@ -28,6 +28,7 @@ export default {
|
||||
watermark: '水印',
|
||||
showWatermark: '是否显示水印',
|
||||
watermarkDefaultText: '水印文字',
|
||||
onlyExport: '是否仅在导出时显示',
|
||||
watermarkText: '水印文字',
|
||||
watermarkTextColor: '文字颜色',
|
||||
watermarkLineSpacing: '水印行间距',
|
||||
|
||||
@ -566,6 +566,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<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="rowItem">
|
||||
@ -878,6 +888,7 @@ export default {
|
||||
},
|
||||
watermarkConfig: {
|
||||
show: false,
|
||||
onlyExport: false,
|
||||
text: '',
|
||||
lineSpacing: 100,
|
||||
textSpacing: 100,
|
||||
@ -1019,7 +1030,7 @@ export default {
|
||||
// 初始化水印配置
|
||||
initWatermark() {
|
||||
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.show = !!config.text
|
||||
|
||||
Loading…
Reference in New Issue
Block a user