init message

This commit is contained in:
Leopoldthecoder
2016-08-15 11:51:25 +08:00
parent 05081a7424
commit 7e05dab840
13 changed files with 451 additions and 12 deletions

View File

@@ -48,6 +48,7 @@ import Col from '../packages/col/index.js';
import Upload from '../packages/upload/index.js';
import Progress from '../packages/progress/index.js';
import Spinner from '../packages/spinner/index.js';
import Message from '../packages/message/index.js';
const install = function(Vue) {
if (install.installed) return;
@@ -99,6 +100,7 @@ const install = function(Vue) {
Vue.component(Upload.name, Upload);
Vue.component(Progress.name, Progress);
Vue.component(Spinner.name, Spinner);
Vue.component(Message.name, Message);
Vue.use(Loading);
@@ -107,15 +109,16 @@ const install = function(Vue) {
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;
};
auto install
// auto install
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
};
module.exports = {
install
install,
Group,
SelectDropdown,
Pagination,
@@ -165,5 +168,6 @@ module.exports = {
Col,
Upload,
Progress,
Spinner
Spinner,
Message
};