1.2.1 • Published 3 years ago
universal-alert v1.2.1
title: alert
alert
Alert component for feedback.
Support
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');
});
You can also import from the big package:
import { alert } from 'universal-api';
Methods
Alert(options)
Arguments
Property | Type | Description | Default | Supported |
---|---|---|---|---|
options | object | alert arguments | - | |
options.title | string | alert title,support only in mini app | - | |
options.content | string | alert content | - | |
options.buttonText | string | alert button text,web environments are not supported | - |
Attention
Options that only supported by WeChat MiniProgram like confirmColor
can also be passed but will not effect in other miniapp platforms.
/**
* iframe: true
*/
import React from 'react';
export default () => (
<iframe style={{
boxShadow: '0 2px 15px rgba(0,0,0,0.1)',
width: '375px',
height: '700px'
}} src='https://herbox.online/p/109000004/app_1aKtEd7SK?previewZoom=100&view=preview&defaultPage=pages/universal-alert/index&topSlider=false'></iframe>
);
2.0.0-beta
3 years ago
1.2.1
4 years ago
1.2.1-0
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.0.2
4 years ago
1.0.1-beta.2
5 years ago
1.0.1-beta.1
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
1.0.0-beta.2
5 years ago
1.0.0-beta.1
5 years ago
0.0.0
8 years ago