当前位置: 首页 > news >正文

网站建设公司-跨界鱼科技做网站接广告赚钱么

网站建设公司-跨界鱼科技,做网站接广告赚钱么,茂名公司网站建设,上海阿里巴巴做网站悬浮出现在页面角落#xff0c;显示全局的通知提醒消息。 1.如何使用#xff1f; 适用性广泛的通知栏 //Notification 组件提供通知功能#xff0c;Element 注册了$notify方法#xff0c;接收一个options字面量参数#xff0c;在最简单的情况下#xff0c;你可以设置tit… 悬浮出现在页面角落显示全局的通知提醒消息。 1.如何使用 适用性广泛的通知栏 //Notification 组件提供通知功能Element 注册了$notify方法接收一个options字面量参数在最简单的情况下你可以设置title字段和message字段用于设置通知的标题和正文。默认情况下经过一段时间后 Notification 组件会自动关闭但是通过设置duration可以控制关闭的时间间隔特别的是如果设置为0则不会自动关闭。注意duration接收一个Number单位为毫秒默认为4500。templateel-buttonplainclickopen1可自动关闭/el-buttonel-buttonplainclickopen2不会自动关闭/el-button /templatescriptexport default {methods: {open1() {const h this.$createElement;this.$notify({title: 标题名称,message: h(i, { style: color: teal}, 这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案)});},open2() {this.$notify({title: 提示,message: 这是一条不会自动关闭的消息,duration: 0});}}} /script 2.带有倾向性 带有 icon常用来显示「成功、警告、消息、错误」类的系统消息 //Element 为 Notification 组件准备了四种通知类型success, warning, info, error。通过type字段来设置除此以外的值将被忽略。同时我们也为 Notification 的各种 type 注册了方法可以在不传入type字段的情况下像open3和open4那样直接调用。templateel-buttonplainclickopen1成功/el-buttonel-buttonplainclickopen2警告/el-buttonel-buttonplainclickopen3消息/el-buttonel-buttonplainclickopen4错误/el-button /templatescriptexport default {methods: {open1() {this.$notify({title: 成功,message: 这是一条成功的提示消息,type: success});},open2() {this.$notify({title: 警告,message: 这是一条警告的提示消息,type: warning});},open3() {this.$notify.info({title: 消息,message: 这是一条消息的提示消息});},open4() {this.$notify.error({title: 错误,message: 这是一条错误的提示消息});}}} /script 3.自定义弹出位置 可以让 Notification 从屏幕四角中的任意一角弹出 使用position属性定义 Notification 的弹出位置支持四个选项top-right、top-left、bottom-right、bottom-left默认为top-right。 templateel-buttonplainclickopen1右上角/el-buttonel-buttonplainclickopen2右下角/el-buttonel-buttonplainclickopen3左下角/el-buttonel-buttonplainclickopen4左上角/el-button /templatescriptexport default {methods: {open1() {this.$notify({title: 自定义位置,message: 右上角弹出的消息});},open2() {this.$notify({title: 自定义位置,message: 右下角弹出的消息,position: bottom-right});},open3() {this.$notify({title: 自定义位置,message: 左下角弹出的消息,position: bottom-left});},open4() {this.$notify({title: 自定义位置,message: 左上角弹出的消息,position: top-left});}}} /script4.带有偏移 让 Notification 偏移一些位置 Notification 提供设置偏移量的功能通过设置 offset 字段可以使弹出的消息距屏幕边缘偏移一段距离。注意在同一时刻所有的 Notification 实例应当具有一个相同的偏移量。 templateel-buttonplainclickopen偏移的消息/el-button /templatescriptexport default {methods: {open() {this.$notify({title: 偏移,message: 这是一条带有偏移的提示消息,offset: 100});}}} /script5.使用 HTML 片段 message 属性支持传入 HTML 片段 将dangerouslyUseHTMLString属性设置为 truemessage 就会被当作 HTML 片段处理。 templateel-buttonplainclickopen使用 HTML 片段/el-button /templatescriptexport default {methods: {open() {this.$notify({title: HTML 片段,dangerouslyUseHTMLString: true,message: strong这是 iHTML/i 片段/strong});}}} /scriptmessage 属性虽然支持传入 HTML 片段但是在网站上动态渲染任意 HTML 是非常危险的因为容易导致 XSS 攻击。因此在 dangerouslyUseHTMLString 打开的情况下请确保 message 的内容是可信的永远不要将用户提交的内容赋值给 message 属性。 6.隐藏关闭按钮 可以不显示关闭按钮 将showClose属性设置为false即可隐藏关闭按钮。 templateel-buttonplainclickopen隐藏关闭按钮/el-button /templatescriptexport default {methods: {open() {this.$notify.success({title: Info,message: 这是一条没有关闭按钮的消息,showClose: false});}}} /script7.全局方法 Element 为 Vue.prototype 添加了全局方法 $notify。因此在 vue instance 中可以采用本页面中的方式调用 Notification。 8.单独引用 单独引入 Notification import { Notification } from element-ui; 此时调用方法为 Notification(options)。我们也为每个 type 定义了各自的方法如 Notification.success(options)。并且可以调用 Notification.closeAll() 手动关闭所有实例。
http://www.yutouwan.com/news/371482/

相关文章:

  • 千秋网站建设公司宏升温岭网站建设
  • 鄂州门户网站知识网站有哪些
  • go语言网站开发建设网站需要收费吗
  • 网站模板破解下载可视化网站开发平台
  • 固原地网站seo织梦网站修改教程视频教程
  • 网站建设营业执照如何写网站建设方案范文8篇
  • 企业网站建设专业公司头条网站怎么做的
  • 彭州建设局网站wordpress扁平模板下载
  • wordpress建站镜像海淘网站是谁做的
  • 明年做那个网站致富做网站贵不
  • 优化大师官网登录入口seo入口
  • dedecms手机网站制作wordpress开发公司
  • 做网站素材在哪里找哪个app可以免费下载ppt模板
  • 擼擼擼做最好的导航网站一个月做网站
  • 绵阳 网站开发建设明细在哪里看
  • 泉州市建设局网站网站备案怎么那么慢
  • 做网站编辑怎么样wordpress文章商品模板下载
  • 南通海洲建设集团网站c2c网站建设公司
  • 教育网站建设市场分析计划书做加工都在哪个网站推广
  • 如东做网站的公司二类医疗器械
  • 烟台网站建设哪家好精准营销手段
  • 长沙网站建设平台wordpress 数据库设计
  • 合作网站开发公司网站建设模板html
  • 公司网站建设公司好哪个公司网站设计好
  • 那些网站平台可以做3d建模如何学好网站建设
  • 网站栏目的分类三亚网站建设介绍
  • 论坛类网站搭建智能网站建设推荐
  • 安庆城乡建设局网站专业的西安免费做网站
  • 免费建站系统怎么用网站建设与维护费
  • wordpress 新浪微博插件石家庄白帽seo网络公司