Skip to content

❄️💎Upgrade native alert, MessageBox as message prompt box;

Notifications You must be signed in to change notification settings

immortalzhi/Nanometer

 
 

Repository files navigation

Segmentfault

Not everyone can be a great artist, but future artists can come from any corner

English | 简体中文

What is nanometer-message?

* ✨Every piece of information needs to be cherished. * 🎉A friendlier message prompt.

Claims the melon

  • Easy to use
  • Better message prompt, built-in four scenarios, support the use of custom
  • Add to your UI library for refinement

Install

Install with script:
<script src="index.js"></script>
<link rel="stylesheet" type="text/css" href="index.css" />

Install with npm:

cnpm i nanometer-message

Documentation

  • Common ant es6:
var Message = require('nanometer-message')
<link rel="stylesheet" type="text/css" href="dist/index.css" />
 Message({option})   A separate method is defined for each type,example: Message.success(options)
  • Similar to vue:
import Message from 'nanometer-message';

Vue.prototype.$meessage = Message 
 Message(type, context)
 Message({option})

style

@import url('nanometer-message/dist/index.css');

API

  • The pattern of object customization has been added. The previous way of use remains the same, which requires more flexible use of option
Name Description
[type] The current state of the message. [success
[durationTime] ( animationDuration abandoned ,Use this instead) Buffer animation duration(The default for 3 seconds)
[calss] ( egoClass abandoned,Use this instead) CSS state customization
[content] ( context abandoned,Use this instead ) Message content.Please note: this is a must
[postEvent] (destroy abandoned,Use this instead ) A callback after the message has disappeared

Contact the author

Get involved and get better

* Submit issues

* Visit the github address https://github.com/webvs2/Nanometer

Grateful to members

About

❄️💎Upgrade native alert, MessageBox as message prompt box;

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 52.6%
  • TypeScript 14.2%
  • JavaScript 12.8%
  • HTML 11.6%
  • SCSS 8.8%