doc: fix sample code in Message

pull/4085/head
gaara 2017-04-09 20:38:08 +08:00 committed by 杨奕
parent fcbee106cf
commit 1be50df7e5
2 changed files with 14 additions and 14 deletions

View File

@ -2,7 +2,7 @@
module.exports = {
methods: {
open() {
this.$message('This is a message');
this.$message('This is a message.');
},
open2() {
@ -26,7 +26,7 @@
open5() {
this.$message({
showClose: true,
message: 'This is a message'
message: 'This is a message.'
});
},
@ -101,7 +101,7 @@ Used to show the feedback of Success, Warning, Message and Error activities.
export default {
methods: {
open() {
this.$message('This is a message');
this.$message('This is a message.');
},
open2() {
this.$message({
@ -145,23 +145,23 @@ A close button can be added.
open5() {
this.$message({
showClose: true,
message: 'Congrats, this is a success message.'
message: 'This is a message.'
});
},
open6() {
this.$message({
showClose: true,
message: 'Warning, this is a warning message.',
type: 'warning'
message: 'Congrats, this is a success message.',
type: 'success'
});
},
open7() {
this.$message({
showClose: true,
message: 'Oops, this is a error message.',
type: 'error'
message: 'Warning, this is a warning message.',
type: 'warning'
});
},
@ -208,4 +208,4 @@ You can call `Message.closeAll()` to manually close all the instances.
`Message` and `this.$message` returns the current Message instance. To manually close the instance, you can call `close` on it.
| Method | Description |
| ---- | ---- |
| close | close the Message |
| close | close the Message |

View File

@ -145,23 +145,23 @@
open5() {
this.$message({
showClose: true,
message: '恭喜你,这是一条成功消息'
message: '这是一条消息提示'
});
},
open6() {
this.$message({
showClose: true,
message: '警告哦,这是一条警告消息',
type: 'warning'
message: '恭喜你,这是一条成功消息',
type: 'success'
});
},
open7() {
this.$message({
showClose: true,
message: '错了哦,这是一条错误消息',
type: 'error'
message: '警告哦,这是一条警告消息',
type: 'warning'
});
},