Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 1.9 KB

README.zh-CN.md

File metadata and controls

67 lines (47 loc) · 1.9 KB

Segmentfault

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

English | 简体中文

What is nanometer-message?

*每一条消息都需要珍惜。 *更友善的消息提示。

Claims the melon

  • 简单易用
  • 更好的消息提示,内置四种场景,支持使用自定义
  • 添加到您的UI库用于完善

Install

Install with pnpm: ``` pnpm add nanometer-message -S ```

Documentation

  • Similar to script:
<script src="https://github.com/webvs2/Nanometer/blob/master/dist/index.js"></script>
 
  • COMMON ant ES6:
import message from "nanometer-message"
import "nanometer-message/dist/index.css"
 Message({option}) 为每个 type 定义了各自的方法,如 Message.success(options)success(options)
  • Similar to VUE2.X:
import "nanometer-message/dist/index.css"
import message from "nanometer-message"
Vue.prototype.$meessage = Message 

API

  • 添加了对象自定义模式。以前的使用方式不变,这就需要更灵活地使用期权
Name Description
[type] The current state of the message. [success
[durationTime] Buffer animation duration(The default for 3 seconds)
[calss] CSS state customization
[content] Message content.Please note: this is a must
[postEvent] A callback after the message has disappeared

Contact the author

Grateful to members