|
|
@@ -28,14 +28,19 @@ var MY_MESSAGE_DEFAULT = {
|
|
|
showClose: true
|
|
|
}
|
|
|
|
|
|
-Vue.prototype.$message = function (options) {
|
|
|
+var MessageWrapper = function (options) {
|
|
|
if (typeof (options) === 'object') {
|
|
|
options = Object.assign({}, MY_MESSAGE_DEFAULT, options)
|
|
|
}
|
|
|
|
|
|
- Message(options)
|
|
|
+ return Message(options)
|
|
|
}
|
|
|
|
|
|
+for(var key in Message){
|
|
|
+ MessageWrapper[key] = Message[key]
|
|
|
+}
|
|
|
+
|
|
|
+Vue.prototype.$message = MessageWrapper
|
|
|
new Vue({
|
|
|
router,
|
|
|
store,
|