2018-02-06 08:43:59 +00:00
|
|
|
<cn>
|
|
|
|
#### 其他提示类型
|
|
|
|
包括成功、失败、警告。
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Other types of message
|
|
|
|
Messages of success, error and warning types.
|
|
|
|
</us>
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
```tpl
|
2018-02-06 08:43:59 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<a-button @click="success">Success</a-button>
|
|
|
|
<a-button @click="error">Error</a-button>
|
|
|
|
<a-button @click="warning">Warning</a-button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
methods: {
|
2019-09-28 12:45:07 +00:00
|
|
|
success() {
|
2018-04-08 13:17:20 +00:00
|
|
|
this.$message.success('This is a message of success');
|
2018-02-06 08:43:59 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
error() {
|
2018-04-08 13:17:20 +00:00
|
|
|
this.$message.error('This is a message of error');
|
2018-02-06 08:43:59 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
warning() {
|
2018-04-08 13:17:20 +00:00
|
|
|
this.$message.warning('This is message of warning');
|
2018-02-06 08:43:59 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
},
|
|
|
|
};
|
2018-02-06 08:43:59 +00:00
|
|
|
</script>
|
|
|
|
```
|