1.0.7 • Published 6 years ago

@mnui/toptips v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Toptips 顶部提示

说明

基于微信小程序第三方框架wepyjs开发,使用需要先安装wepyjs

使用

安装组件

npm install @mnui/toptips --save

引入组件

// index.wpy
<template>
  <toptips {{props}}></toptips>
</template>

<script>
import wepy from 'wepy'
import toptips from '@mnui/toptips'

export default class Index extends wepy.page {
  components = {
    toptips
  }
}
</script>

调用组件

this.$invoke('toptips', 'show', { // 参数
  text: '调用成功',
})
.then((res) => {
  console.log('done')
})
.catch((err) => {
  console.log('error')
})

参数

textString

显示的文字

durationNumber

持续时间,默认1500毫秒

styleObject

样式,通过写在标签中的props生效

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago