二十六、 jeecgboot“通知通告“数据加载过程学习

一,通知消息的图标位置

二,头部布局文件与异步装载图标

在src\layouts\default\header\index.vue中的图标文件:Notify组件

<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />

Notify组件是动态异步装载

 import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';

从src\layouts\default\header\components\index.ts文件createAsyncComponent()装载进来

export const Notify = createAsyncComponent(() => import('./notify/index.vue'));

三,通知图标文件:

src\layouts\default\header\components\notify\index.vue


<template>
  <div :class="prefixCls">
    <!-- //生成通知图标 -->
<Badge :count="count" :overflowCount="9" :offset="[-4, 10]"
 :numberStyle="numberStyle" @click="clickBadge">

      <BellOutlined />
    </Badge>
    <!-- //动态通知 -->
    <DynamicNotice ref="dynamicNoticeRef" v-bind="dynamicNoticeProps" />
   <DetailModal @register="registerDetail" /> <!--//打开通知详情对话窗口 -->
    <!-- //所有消息通知窗口列表 -->
<sys-message-modal @register="registerMessageModal" @refresh="reloadCount">
</sys-message-modal>
  </div>
</template>

四,点击消息图标,打开消息通知窗口列表

 @click="clickBadge"

      //注册消息详细窗口列表

      const [registerMessageModal, { openModal: openMessageModal }] = useModal();

      //打开消息详细窗口列表


      function clickBadge(){
        //消息列表弹窗前去除角标
        for (let i = 0; i < listData.value.length; i++) {
          listData.value[i].count = 0;
        }
        openMessageModal(true, {})
      }

五,消息列表窗口文件

src\views\system\message\components\SysMessageModal.vue

其中:导入消息列表组件sys-message-listDetailModal

        <a-tab-pane tab="全部消息" key="all" forceRender>

   

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值