# Notice 通告 - 图1 Wuss-weapp

首页

组件库

快速上手

GitHub

首页

组件库

快速上手

GitHub

基础组件

  • 布局

  • 导航

表单

  • 其他

# Notice 通告

# 使用指南

在 page.json 中引入组件

  1. "usingComponents": {
  2. "w-notice": "wuss-weapp/w-notice/index",
  3. }

# 视频演示

# 代码演示

  1. <!--pages/w-notice/index.wxml-->
  2. <w-pane title="Notice" desc="通告" />
  3. <w-toast id="wuss-toast" wuss-class="test" />
  4. <w-pane desc="Default" />
  5. <w-notice text="{{ text }}" />
  6. <w-pane desc="mode = closeable speed = 30" />
  7. <w-notice
  8. mode="closeable"
  9. text="{{ text }}"
  10. bindclose="noticeClose"
  11. speed="30"
  12. />
  13. <w-pane desc="mode = link scrollable= false" />
  14. <w-notice
  15. scrollable="{{ false }}"
  16. mode="link"
  17. url="/pages/index/index"
  18. text="去首页看看有哪些组件"
  19. />
  20. <w-pane desc="set icon color backgroundColor" />
  21. <w-notice
  22. icon="voice"
  23. color="#fff"
  24. backgroundColor="rgba(255, 113, 110, 1)"
  25. text="{{ text }}"
  26. />

# API

# Attribute 属性

属性 说明 类型 默认值
text 文本内容 string -
mode 模式可选 link|closeable string -
color 文本颜色 string -
backgroundColor 背景颜色 string -
url mode 为 link 时跳转地址 string -
openType mode 为 link 时跳转类型 string -
speed 滚动速度 scrollable 为 true 时有效 number -
scrollable 是否可以滚动 boolean false
icon 左边的图标地址 string -

# Event 事件

事件名 说明 参数

# Slot 插槽

名称 说明

# Class 自定义类名

类名 说明
wuss-class 根节点样式类

Edit this page

Confirm 确认框 Dialog 消息框