Mobile UI Component - Vue-messages
DOCS
Introduction
Lightweight Mobile UI Component build on Vue2.0 and like iview style.
Features
- Friendly interface docs
- Simple UI style
- Lightweight & Quickly
- Support mobile
- Support custom CSS style(implement in 2.0)
- Support JSX render(implement in 2.0)
Begin
Install use npm:
$ npm install vue-messages
Usage
// import other modules...// note the import order /** default configuration */Vue /** advance configuration */Vue
Launch Vue project,Enter the following expression in console,check if there is an Object.
// If there is an Object,it means the import is success
// otherwise,the import is fail.
$ window.$Message
Usage
For Vue
API
Use the component in the following methods
/** config TYPE: string */this$Messagethis$Messagethis$Messagethis$Messagethis$Message /** config TYPE: object */this$Message// other type ...
OPTIONS
attr | desc | type | default |
---|---|---|---|
duration | duration time | number | 2(unit:s) |
styles | custom style | Object | {fontSize:'16px',top:'20px'} |
Theme | (advance)theme | String | 'classic' Or 'classicBold' |
before | Hook Function | Function | - |
done | Hook Function | Function | - |
Subsequent implementation | - | ||
render | (advance)render function(support JSX) | Function | - |
Message Type
Currently supports four types:
- success
- info
- warning
- error
Demo
Welcome discussion in the following site👇
License
Copyright (c) 2017-present, Charles yang