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

doc: fix sample code in Message

parent fcbee106
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module.exports = { module.exports = {
methods: { methods: {
open() { open() {
this.$message('This is a message'); this.$message('This is a message.');
}, },
open2() { open2() {
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
open5() { open5() {
this.$message({ this.$message({
showClose: true, 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. ...@@ -101,7 +101,7 @@ Used to show the feedback of Success, Warning, Message and Error activities.
export default { export default {
methods: { methods: {
open() { open() {
this.$message('This is a message'); this.$message('This is a message.');
}, },
open2() { open2() {
this.$message({ this.$message({
...@@ -145,23 +145,23 @@ A close button can be added. ...@@ -145,23 +145,23 @@ A close button can be added.
open5() { open5() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: 'Congrats, this is a success message.' message: 'This is a message.'
}); });
}, },
open6() { open6() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: 'Warning, this is a warning message.', message: 'Congrats, this is a success message.',
type: 'warning' type: 'success'
}); });
}, },
open7() { open7() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: 'Oops, this is a error message.', message: 'Warning, this is a warning message.',
type: 'error' type: 'warning'
}); });
}, },
...@@ -208,4 +208,4 @@ You can call `Message.closeAll()` to manually close all the instances. ...@@ -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. `Message` and `this.$message` returns the current Message instance. To manually close the instance, you can call `close` on it.
| Method | Description | | Method | Description |
| ---- | ---- | | ---- | ---- |
| close | close the Message | | close | close the Message |
\ No newline at end of file
...@@ -145,23 +145,23 @@ ...@@ -145,23 +145,23 @@
open5() { open5() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: '恭喜你,这是一条成功消息' message: '这是一条消息提示'
}); });
}, },
open6() { open6() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: '警告哦,这是一条警告消息', message: '恭喜你,这是一条成功消息',
type: 'warning' type: 'success'
}); });
}, },
open7() { open7() {
this.$message({ this.$message({
showClose: true, showClose: true,
message: '错了哦,这是一条错误消息', message: '警告哦,这是一条警告消息',
type: 'error' 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