<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>
    <SearchInput :searchInputData="searchInputData"  :defaultZIndex="defaultZIndex"></SearchInput>
    <!-- <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 SearchInput from "./SearchInput";
// import Message from "./Message";
// import Mask from './Mask'

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