1.0.8 • Published 4 years ago

@uni/alert v1.0.8

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
4 years ago

alert

npm

Alert component for feedback.

Support

Install

$ npm install @uni/alert --save

Usage

import alert from '@uni/alert';

alert({
  title: 'alert title',
  content: 'alert content',
  buttonText: 'button text,default value is confirm'
}).then(() => {
  console.log('confirm');
});

You can also import from the big package:

import { alert } from '@uni/apis';

Arguments

PropertyTypeDescriptionDefault
optionsobjectalert arguments-
options.contentstringalert content-
options.titlestringalert 标题-
options.buttonTextstringalert 确认按钮文字-

不通用参数(由于破坏了一码多端的能力,请谨慎使用)

成员类型描述默认值支持
options.confirmColorstringalert 确认按钮颜色-

Attention

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