GongJuZuJian.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="gong-ju-body" style="right: 20px;top: 100px;" @click="dianJiGongJuLan">
  3. <div class="gong-ju-wen-zi"><i class="el-icon-setting"></i></div>
  4. </div>
  5. <el-dialog title="工具箱" v-model="dialog">
  6. 兼容模式:
  7. <el-switch
  8. active-color="#13ce66"
  9. inactive-color="#ff4949"
  10. active-text="启用"
  11. inactive-text="停用"
  12. :active-value="true"
  13. :inactive-value="false"
  14. v-model="jianRongMoShi"
  15. @change="dianJiJianRongKaiGuan"
  16. >
  17. </el-switch>
  18. <span style="color: #e9ae62;margin-left: 10px;">如果电脑过于卡顿请使用该模式</span>
  19. </el-dialog>
  20. </template>
  21. <script>
  22. import {ref} from "vue";
  23. import store from '../../../store'
  24. export default {
  25. name: "GongJuZuJian",
  26. setup() {
  27. const dialog = ref(false)
  28. const jianRongMoShi = ref(true)
  29. jianRongMoShi.value = store.state.app.yiZhuLuRu.jianRongMoShi
  30. const dianJiGongJuLan = () => {
  31. dialog.value = true
  32. }
  33. const dianJiJianRongKaiGuan = (val) => {
  34. store.commit('app/setJianRongMuShi', val)
  35. }
  36. return {
  37. dianJiGongJuLan,
  38. dialog,
  39. jianRongMoShi,
  40. dianJiJianRongKaiGuan
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. .gong-ju-body {
  47. position: fixed;
  48. background-color: #bacff3;
  49. width: 40px;
  50. height: 40px;
  51. border-radius: 50%;
  52. color: #bacff3;
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. font-size: 20px;
  57. box-shadow: 0 0 6px #0000001f;
  58. cursor: pointer;
  59. z-index: 5;
  60. }
  61. .gong-ju-wen-zi {
  62. height: 100%;
  63. width: 100%;
  64. background-color: rgb(242, 245, 246);
  65. box-shadow: rgb(0 0 0 / 12%) 0 0 6px;
  66. text-align: center;
  67. line-height: 40px;
  68. color: rgb(25, 137, 250);
  69. }
  70. </style>