1.1.3 • Published 4 years ago

@ouduidui/notice v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

NoticeKit

npmGitHub starsGitHub forksGitHub release (latest by date)GitHub license

A lightweight small notice widget with no dependencies, create notifications easily with this javascript plugin. See demo.

Main

dist/
├── notice.min.js

Get Started

install

download releases to your project.

<script src="./notice.min.js"></script>

or npm install

npm i @ouduidui/notice
import Notice from "@ouduidui/notice";

Usage

Syntax

const notice = new Notice();

Methods

showLoading()

Show loading animation.

notice.showLoading(options);

options

  • Type: Object
  • Optional

The options for loading. Check out the available options.

optiontyperequireddefaultDescriptionoptions
typestringfalse'line'the style type of loading animation'line'、'dots'、'dots_zoom'、'cube_flip'、'dots_spin'、'cube_zoom'
colorstringfalse'#ffffff'color of loading animation and title-
backgroundColorstringfalse'rgba(0,0,0,.6)'color of mask-
titlestringfalse-loading text-
fontSizenumberfalse16font size of loading text-

Preview other style types of loading animation by demo.

Examples:

notice.showLoading({
  	type: 'dots',
    title: 'Loading',
    color: '#333',
    backgroundColor: 'rgba(255,255,255,.6)',
  	fontSize: 14
});

hideLoading()

Close loading animation.

notice.hideLoading()

showToast()

show a pop-up to remind something.

notice.showToast(options);

options

  • Type: Object
  • Optional

The options for showing toast. Check out the available options.

optiontyperequireddefaultDescriptionoptions
Textstringtrue-tips text-
typestringfalse'default'the style type of toast ('default' -- no icon)'default'、'success'、'error'、'info'、'warning'
autoClosestringfalsetrueauto close after 4 seconds-
showClosestringfalsefalseShow close button-

Preview other style types of loading animation by demo.

License

MIT © OUDUIDUI

1.1.1

4 years ago

1.1.0

4 years ago

1.1.3

4 years ago

1.0.4

4 years ago

1.1.2

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago