Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

universal-alert

1.2.1 • Public • Published

universal-alert npm

Alert component for feedback.

Support

browser weex miniApp wechatMiniprogram quickApp bytedanceMicroApp

Install

$ npm install universal-alert --save

Usage

import Alert from 'universal-alert';
 
// How to use it in quickapp
// import Alert from 'universal-alert/lib/quickapp;
 
Alert({
  title: 'alert title',
  content: 'alert content',
  buttonText: 'button text,default value is confirm'
}).then(() => {
  console.log('confirm');
});

Methods

Alert(options)

Arguments

Property Type Description Default Supported
options object alert arguments -
options.title string alert title,support only in mini app - miniApp wechatMiniprogram quickApp bytedanceMicroApp
options.content string alert content -
options.buttonText string alert button text,web environments are not supported - weex miniApp wechatMiniprogram quickApp bytedanceMicroApp

Attention

Options that only supported by WeChat MiniProgram like confirmColor can also be passed but will not effect in other miniapp platforms.

Keywords

Install

npm i universal-alert

DownloadsWeekly Downloads

2

Version

1.2.1

License

BSD-3-Clause

Unpacked Size

37.4 kB

Total Files

56

Last publish

Collaborators

  • avatar
  • avatar
  • avatar