<template>
  <!-- 桌面 -->
  <div
    id="sds-desktop"
    :style="{ display: display }"
  >
    <Menu></Menu>
    <Shortcut :defaultZIndex="defaultZIndex"></Shortcut>
    <FixWindow
      :defaultZIndex="defaultZIndex"
      :fixWindowData="fixWindowData"
    ></FixWindow>
    <NotifyTrayPanel></NotifyTrayPanel>
    <NotifyTrayPanelDetail
      :defaultZIndex="defaultZIndex"
      :notifyTrayPanelDetailData="notifyTrayPanelDetailData"
    ></NotifyTrayPanelDetail>
    <NotifyShowall
      :defaultZIndex="defaultZIndex"
      :notifyShowAllData="notifyShowAllData"
    ></NotifyShowall>
    <NotifySetting
      :defaultZIndex="defaultZIndex"
      :notifySettingData="notifySettingData"
    ></NotifySetting>
    <UserTrayPanel></UserTrayPanel>
    <UserSetting
      :defaultZIndex="defaultZIndex"
      :userSettingData="userSettingData"
    ></UserSetting>
    <UserAbout :defaultZIndex="defaultZIndex"></UserAbout>
    <!-- <Message></Message> -->
    <!-- <Mask></Mask> -->
  </div>
</template>

<script>
import Menu from "./Menu";
import Shortcut from "./Shortcut";
import FixWindow from "./FixWindow";
import NotifyTrayPanel from "./NotifyTrayPanel";
import NotifyTrayPanelDetail from "./NotifyTrayPanelDetail";
import NotifyShowall from "./NotifyShowall";
import NotifySetting from "./NotifySetting";
import UserTrayPanel from "./UserTrayPanel";
import UserSetting from "./UserSetting";
import UserAbout from "./UserAbout";
// import Message from "./Message";
// import Mask from './Mask'

export default {
  props: [
    "defaultZIndex",
    "userSettingData",
    "fixWindowData",
    "notifyTrayPanelDetailData",
    "notifySettingData",
    "notifyShowAllData",
  ],
  data() {
    return {
      display: "block",
    };
  },
  mounted() {
    this.$bus.on("hiddenOrShowOtherWindow", this.hiddenOrShowThisWindow);
  },
  methods: {
    //是否隐藏本页面
    hiddenOrShowThisWindow(bol) {
      console.log(bol);
      if (bol) {
        this.display = "none";
      } else {
        this.display = "block";
      }
    },
  },
  watch: {
    userSettingData() {
      this.userSettingData = this.userSettingData;
    },
    fixWindowZIndex() {
      this.fixWindowZIndex = this.fixWindowZIndex;
    },
  },
  components: {
    Menu,
    Shortcut,
    FixWindow,
    NotifyTrayPanel,
    NotifyTrayPanelDetail,
    NotifyShowall,
    NotifySetting,
    UserTrayPanel,
    UserSetting,
    UserAbout,
    // Message,
    // Mask,
  },
  name: "Desktop",
};
</script>
