• 效果

  • 标签内容
showNotify(msg) {const h = this.$createElementconst _this = thisreturn this.$notify({onClose: function () {_this.msgNotify = ''_this._getSignMailSingleRead(msg.id)},duration: 0,dangerouslyUseHTMLString: true,customClass: 'notify-msg',message: h('div',{class: 'notify-msg-box',},[h('div', { class: 'notify-msg-top' }, [h('div', { class: 'notify-msg-icon' }, [h('div', { class: 'image' }),]),h('div', { class: 'notify-msg-top-right' }, [h('div', { class: 'notify-msg-title' }, msg.title),h('div', { class: 'notify-msg-context' }, msg.content),]),]),h('div', { class: 'notify-msg-bottom' }, [h('div',{ class: 'notify-msg-send' },'发送者:' + msg.sender_name),h('div',{ class: 'notify-msg-time' },'发送时间:' + formatStrTime(msg.send_time)),]),]),offset: 50, // 向下偏移100})},
  • CSS样式

<style lang="scss">
/**
修改notify样式*/
.notify-msg {margin: 0;padding: 0;width: 440px;.el-notification__group {margin: 0;padding: 0;}
}
</style><style lang="scss" scoped>
.notify-msg-box {margin: 0;padding: 0;.notify-msg-top {display: flex;padding: 30px 30px 30px 20px;.notify-msg-icon {.image {width: 60px;height: 60px;background-image: url('assets/icon_notify.png');background-repeat: no-repeat;background-size: 100% 100%;-moz-background-size: 100% 100%;}}.notify-msg-top-right {padding-left: 30px;.notify-msg-title {font-weight: 700;font-size: 20px;color: #333333;}.notify-msg-context {padding-top: 15px;color: #666666;font-size: 14px;}}}.notify-msg-bottom {display: flex;height: 50px;width: 440px;justify-content: space-between;align-items: center;display: flex;background-color: #f1f1f1;.notify-msg-send {padding-left: 15px;width: 220px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.notify-msg-time {text-align: right;width: 220px;padding-right: 15px;}}.notify-bottom {width: 440px;display: flex;flex-direction: row-reverse;.el-button {margin-bottom: 20px;margin-right: 30px;color: white;font-weight: 700;width: 100px;padding-top: 12px;padding-bottom: 12px;font-size: 14px;background-color: #409eff;}}
}
</style>

Element-UI 自定义Notification 通知内容相关推荐

  1. Element UI 自定义日历

    Element UI 自定义日历 代码示例 HTML部分 <template><el-calendar ref="calendar"><templat ...

  2. Element UI 自定义穿梭框的数据项

    文章目录 需求 官网说明 实现效果 具体步骤 附加需求:调节穿梭框高宽度 需求 穿梭框中显示的内容是包含多个字段的数据(把表格的几个字段在穿梭框中展示)以及修改相应的样式,查看 Element UI ...

  3. Element UI 自定义动态换肤(主题)

    需求背景:项目需要支持动态换主题,主题色可以随意选择(即用户想用什么颜色的主题就用什么颜色的主题):而element官网给的 自定义主题 只能是项目里写死,无法实现用户动态切换: 方式一:调接口加载C ...

  4. element ui表格标题及内容居中

    场景: 在开发的时候,经常会用到element-ui表格功能,开发后,发现表格内容及标题没有对齐,看起来不太美观,就这个问题浅浅记录一下 表头使用[一行内码搞定] <el-table:data= ...

  5. element ui 输入框不能输入内容

    原先代码 addUserForm只是一个空对象 <!-- 内容主体区域 --><el-form:model="addUserForm":rules="a ...

  6. Element UI自定义表单验证 公共提取

    2019独角兽企业重金招聘Python工程师标准>>> 主要代码: util文件夹下validate.js 文件 export const VDT = {messages:{requ ...

  7. vue使用element ui自定义手机验证规则

    1.表单的一项 <el-form-item label="电话" prop="senderPhone"><el-input v-model=& ...

  8. 浅谈Element Ui自定义日历

    官方写法 <el-calendar><!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法--><templateslot=" ...

  9. 使用element UI 验证时vaild总是false

    记录一下 前面是一个element ui自定义表单验证规则,就是向后端发ajax请求,验证旧密码正不正确 后面: // axios请求,修改密码 const { status, message } = ...

最新文章

  1. MFC中“资源在另一个编译器中打开”报错解决方法
  2. flex和box、flexbox高度自适应常见坑
  3. shiro启动之后页面访问不了_java:shiro入门——4
  4. 2021年360奢侈品用户观察报告
  5. 5分钟就能完成的Python小项目,赶紧拿去玩玩吧
  6. Windows设置程序 .bat 开机自启动
  7. 傻瓜神经网络入门指南
  8. 记事本如何运行python代码_记事本写代码怎么运行
  9. Android手机怎么打开exe,安卓手机如何打开.exe文件 安卓手机exe文件怎么打开
  10. 【嵌入式C语言系列】关键字详解【const】
  11. 大数据-数据仓库的概念
  12. Unity shader入门精要-第一章笔记
  13. mysql教学磁力链_价值1000元的磁力链搜索源码PHP+python+mysql 一键搭建
  14. VSCode 中使用GO语言
  15. 解决戴尔电脑蓝牙消失问题
  16. 一般家用路由器买多大的合适_家用路由器多少兆合适
  17. chrome浏览器添加crx插件
  18. 获取FPGA芯片序号
  19. 2.9 zio入门——递归和ZIO
  20. Android-VideoView启动页视频,8.0崩溃解决

热门文章

  1. JavaScript的变量类型
  2. DASCTF六月团队赛(2020)-部分WP
  3. 278、解密POE交换机供电秘密,8芯网线断芯不再害怕
  4. ⑧(网络篇)、《史上最全iOS八股文面试题》2022年,金三银四我为你准备了,iOS《1000条》笔试题以及面试题(包含答案)。带面试你过关斩将,(赶紧过来背iOS八股文)
  5. 阿里翻译API严重的翻译问题
  6. 智能车的转弯部分_邛崃斯维刻平衡车维修平衡车不充电怎么处理哪里有
  7. 高仿精仿安卓疯狂猜图游戏源码
  8. win8 系统 myeclipse10.x 破解
  9. python 爬取热搜网教程 (下)
  10. php项目开发中常用的助手函数