all
heyujie
2021-07-21 b5e2e236828b7fbc0e8f2bdbf66651ad8907e3b1
src/pages/desktop/index/App.vue
@@ -1,8 +1,8 @@
<template>
  <div id="app" @contextmenu.prevent>
    <tools></tools>
    <tools @jumpToDock="onJumpToDock"></tools>
    <desktop></desktop>
    <tools-entry ref="dock_model"></tools-entry>
    <tools-entry @changeBg="onChangeBg" ref="dock_model"></tools-entry>
    <notice-tip ref="notice_tip_model"></notice-tip>
    <notification-center></notification-center>
  </div>
@@ -29,7 +29,8 @@
  },
  data() {
    return {
      buttonAuthority: sessionStorage.getItem('buttonAuthoritys') || []
      buttonAuthority: sessionStorage.getItem('buttonAuthoritys') || [],
      defaultBgUrl:"/images/desktop/background.png"
    }
  },
  computed: {
@@ -47,7 +48,9 @@
    }
  },
  mounted() {
    document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL;
    // document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL;
    document.getElementById('app').style.backgroundImage = `url(${this.defaultBgUrl})`
    this.showApps();
    let _that = this;
@@ -79,6 +82,14 @@
    });
  },
  methods: {
    onJumpToDock(item){
      debugger
      this.$refs.dock_model.onJumpToDock(item)
    },
    onChangeBg(v){
       document.getElementById('app').style.backgroundImage = "url(" + v + ")"
       this.defaultBgUrl = v
    },
    showApps() {
      let _that = this;