Commit 1be50df7 authored by gaara's avatar gaara Committed by 杨奕

doc: fix sample code in Message

parent fcbee106
......@@ -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 |
\ No newline at end of file
| close | close the Message |
......@@ -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'
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment