forked from github/dataease
fix(仪表板): 修复社区板仪表板因不支持水印设置导致的控制台报错问题
This commit is contained in:
parent
6fb20c0aa2
commit
1557162d00
@ -215,25 +215,14 @@ watch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const initWatermark = (waterDomId = 'editor-canvas-main') => {
|
const initWatermark = (waterDomId = 'editor-canvas-main') => {
|
||||||
if (
|
try {
|
||||||
dvInfo.value.watermarkInfo &&
|
if (
|
||||||
dvInfo.value.watermarkInfo.settingContent &&
|
dvInfo.value.watermarkInfo &&
|
||||||
isMainCanvas(canvasId.value)
|
dvInfo.value.watermarkInfo.settingContent &&
|
||||||
) {
|
isMainCanvas(canvasId.value)
|
||||||
const scale = dashboardActive.value ? 1 : curScale.value
|
) {
|
||||||
if (userInfo.value) {
|
const scale = dashboardActive.value ? 1 : curScale.value
|
||||||
activeWatermark(
|
if (userInfo.value) {
|
||||||
dvInfo.value.watermarkInfo.settingContent,
|
|
||||||
userInfo.value,
|
|
||||||
waterDomId,
|
|
||||||
canvasId.value,
|
|
||||||
dvInfo.value.selfWatermarkStatus,
|
|
||||||
scale
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
const method = personInfoApi
|
|
||||||
method().then(res => {
|
|
||||||
userInfo.value = res.data
|
|
||||||
activeWatermark(
|
activeWatermark(
|
||||||
dvInfo.value.watermarkInfo.settingContent,
|
dvInfo.value.watermarkInfo.settingContent,
|
||||||
userInfo.value,
|
userInfo.value,
|
||||||
@ -242,8 +231,23 @@ const initWatermark = (waterDomId = 'editor-canvas-main') => {
|
|||||||
dvInfo.value.selfWatermarkStatus,
|
dvInfo.value.selfWatermarkStatus,
|
||||||
scale
|
scale
|
||||||
)
|
)
|
||||||
})
|
} else {
|
||||||
|
const method = personInfoApi
|
||||||
|
method().then(res => {
|
||||||
|
userInfo.value = res.data
|
||||||
|
activeWatermark(
|
||||||
|
dvInfo.value.watermarkInfo.settingContent,
|
||||||
|
userInfo.value,
|
||||||
|
waterDomId,
|
||||||
|
canvasId.value,
|
||||||
|
dvInfo.value.selfWatermarkStatus,
|
||||||
|
scale
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('Watermarks are not supported!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user