hc-tips
A tips components based on hyperapp.js
Last updated 2 years ago by youngluo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hc-tips 
SYNC missed versions from official npm registry.

hc-tips

npm npm license

基于hyperapp.js和WeUI的Tips组件

安装

npm i -S hc-tips

使用

直接使用

  <script src="https://unpkg.com/hyperapp@1.2.5/dist/hyperapp.js"></script>
  <script src="node_modules/hc-tips/dist/index.js"></script>
  <script>
    window.HCTips.toast('消息提示')
  </script>

ES6

  import HCTips from 'hc-tips'

  HCTips.toast('消息提示')

方法

  • tosat (options: object | content: string)

  • loading (options: object | content: string)

  • alert (options: object | content: string)

  • confirm (options: object | content: string)

options (toast | loading)

content

type: string

required: true

duration

type: number

default: 2000

type

type: string

optional: 'info', 'error'

default: 'info'

options (alert | confirm)

content

type: string

required: true

title

type: string

confirmText

type: string

default: '确定'

cancelText

type: string

default: '取消'

showCancel

type: boolean

default: true

是否显示取消按钮,alert方法为false

onCancel

type: function

点击取消按钮回调

onConfirm

type: function

点击确定按钮回调

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |