Ver Fonte

提交文件

hongrunxia há 7 meses atrás
pai
commit
fa6383c7a6
1 ficheiros alterados com 52 adições e 0 exclusões
  1. 52 0
      src/layouts/default/header/components/VoiceBroadcast.vue

+ 52 - 0
src/layouts/default/header/components/VoiceBroadcast.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="btn" @click="showWarningBroad">
+    <!-- <div>语音播报</div>
+    <a-badge :count="10">
+      <a href="#" class="head-example"></a>
+    </a-badge> -->
+    <a-badge dot>
+      <notification-outlined />
+    </a-badge>
+  </div>
+  <div v-if="isShowWarningBroad" class="broadcast">
+    <div class="title">消息通知</div>
+    <div class="context"> </div>
+  </div>
+</template>
+<script lang="ts">
+  import { Tooltip, Badge } from 'ant-design-vue';
+  import { NotificationOutlined } from '@ant-design/icons-vue';
+  import Icon from '/@/components/Icon';
+  import { defineComponent, ref } from 'vue';
+
+  export default defineComponent({
+    name: 'VoiceBroadcast',
+    components: { Icon, Tooltip, Badge, NotificationOutlined },
+
+    setup() {
+      const isShowWarningBroad = ref(false);
+      function showWarningBroad() {
+        isShowWarningBroad.value = !isShowWarningBroad.value;
+      }
+      return { showWarningBroad, isShowWarningBroad };
+    },
+  });
+</script>
+<style lang="less" scoped>
+  .btn {
+    line-height: 30px;
+    margin-right: 20px;
+    cursor: pointer;
+    display: flex;
+  }
+  .broadcast {
+    width: 400px;
+    height: 250px;
+    padding: 10px;
+    position: fixed;
+    top: 42px;
+    right: 20px;
+    background-color: aqua;
+    z-index: 999;
+  }
+</style>