7979 </el-form-item >
8080
8181 <el-form-item :label =" $t('setting.watermark')" v-if =" isMasterProductPro" prop =" watermark" >
82- <el-radio-group class =" w-full" @change =" onChangeWatermark" v-model =" form.watermarkItem " >
82+ <el-radio-group class =" w-full" @change =" onChangeWatermark" v-model =" form.watermarkShow " >
8383 <el-radio-button value =" Enable" >
8484 <span >{{ $t('commons.button.enable') }}</span >
8585 </el-radio-button >
8686 <el-radio-button value =" Disable" >
8787 <span >{{ $t('commons.button.disable') }}</span >
8888 </el-radio-button >
8989 </el-radio-group >
90- <div v-if =" form.watermarkItem === 'Enable'" >
90+ <div v-if =" form.watermarkShow === 'Enable'" >
9191 <div >
9292 <el-button link type =" primary" @click =" onChangeWatermark" >
9393 {{ $t('commons.button.view') }}
@@ -274,7 +274,7 @@ const form = reactive({
274274 panelName: ' ' ,
275275 theme: ' ' ,
276276 watermark: ' ' ,
277- watermarkItem : ' ' ,
277+ watermarkShow : ' ' ,
278278 themeColor: {} as ThemeColor ,
279279 menuTabs: ' ' ,
280280 language: ' ' ,
@@ -372,12 +372,12 @@ const search = async () => {
372372 globalStore .themeConfig .theme = form .theme ;
373373 form .proxyDocker = xpackRes .data .proxyDocker ;
374374 form .watermark = xpackRes .data .watermark ;
375+ form .watermarkShow = xpackRes .data .watermarkShow ;
375376 try {
376377 globalStore .watermark = JSON .parse (xpackRes .data .watermark );
377378 } catch {
378379 globalStore .watermark = null ;
379380 }
380- form .watermarkItem = xpackRes .data .watermark ? ' Enable' : ' Disable' ;
381381 }
382382 } else {
383383 globalStore .themeConfig .theme = form .theme ;
@@ -421,7 +421,7 @@ const onChangeThemeColor = () => {
421421};
422422
423423const onChangeWatermark = async () => {
424- if (form .watermarkItem === ' Enable' ) {
424+ if (form .watermarkShow === ' Enable' ) {
425425 watermarkRef .value .acceptParams (form .watermark );
426426 return ;
427427 }
@@ -431,10 +431,11 @@ const onChangeWatermark = async () => {
431431 })
432432 .then (async () => {
433433 loading .value = true ;
434- await updateXpackSettingByKey (' Watermark ' , ' ' )
434+ await updateXpackSettingByKey (' WatermarkShow ' , ' Disable ' )
435435 .then (() => {
436436 loading .value = false ;
437437 globalStore .watermark = null ;
438+ globalStore .watermarkShow = false ;
438439 search ();
439440 MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
440441 })
@@ -443,7 +444,7 @@ const onChangeWatermark = async () => {
443444 });
444445 })
445446 .catch (() => {
446- form .watermarkItem = ' Enable' ;
447+ form .watermarkShow = ' Enable' ;
447448 });
448449};
449450
0 commit comments