@sirl/smart_notice

1.0.6 • Public • Published

smart_notice

介绍

微信小程序自定义消息滚动组件

使用说明

  1. 项目根目录引入 yarn add @sirl/smart_notice
  2. 构建npm
  3. 组件注册 "usingComponents": {"smart_notice": "@sirl/smart_notice/smart_notice"}
  4. 组件使用
    1. 页面使用
    <smart_notice  list="{{list}}"></smart_notice>
    
    1. js里控制组件属性
    data:{
        list:[{
            notice: '通知:疫情期间,不能按时发货,希望您敬请谅',
        },{
            notice: '这是第二天通知',
        }]
    }
    
    1. 扩展
    //如果想在左边或右边加个图标
    <view>
        <image src="url">
        </image>
        <smart_notice  list="{{list}}"></smart_notice>    
    </view>
    //其他props
    width:通知栏宽度,默认为750rpx;
    height:通知栏高度,默认为60rpx;
    backgroundColor:通知栏背景颜色;
    borderRadius:通知栏圆角;
    textStyle:通知栏里的文字样式
    

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Readme

Keywords

none

Package Sidebar

Install

npm i @sirl/smart_notice

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

7.18 kB

Total Files

7

Last publish

Collaborators

  • sirl