7c15ac9e
梁灏
add Message compo...
|
1
|
<template>
|
21dad188
梁灏
prevent dispatch ...
|
2
|
<div>
|
e0bd31a6
Aresn
update Message
|
3
|
<i-button @click.native="info">显示普通提示</i-button>
|
21dad188
梁灏
prevent dispatch ...
|
4
5
6
|
<i-button @click.native="success">显示成功提示</i-button>
<i-button @click.native="warning">显示警告提示</i-button>
<i-button @click.native="error">显示错误提示</i-button>
|
55b608a6
Lawrence Lee
bugfix on .destroy
|
7
|
<i-button @click.native="destroy">销毁提示</i-button>
|
21dad188
梁灏
prevent dispatch ...
|
8
|
</div>
|
7c15ac9e
梁灏
add Message compo...
|
9
10
|
</template>
<script>
|
7c15ac9e
梁灏
add Message compo...
|
11
|
export default {
|
7c15ac9e
梁灏
add Message compo...
|
12
|
methods: {
|
e0bd31a6
Aresn
update Message
|
13
14
15
|
info () {
// this.$Message.info('这是一条普通提示');
this.$Message.success({
|
3f7a5f1a
zhigang.li
udpate notice
|
16
|
content: '这是一条普通提示2',
|
e0bd31a6
Aresn
update Message
|
17
18
|
duration: 500,
onClose () {
|
e7ad4154
梁灏
update Message st...
|
19
|
// console.log(123)
|
e0bd31a6
Aresn
update Message
|
20
|
},
|
b24be35a
zhigang.li
make Message and ...
|
21
22
23
24
25
26
27
28
|
closable: true,
render (h) {
return h('Button',{
props: {
type: 'primary'
}
}, '这是render出来的');
}
|
e0bd31a6
Aresn
update Message
|
29
30
|
})
},
|
21dad188
梁灏
prevent dispatch ...
|
31
|
success () {
|
a77eaa5c
梁灏
update
|
32
33
34
35
|
this.$Message.success({
content: '这是一条成功的提示',
duration: 4
});
|
21dad188
梁灏
prevent dispatch ...
|
36
37
38
39
40
41
|
},
warning () {
this.$Message.warning('这是一条警告的提示');
},
error () {
this.$Message.error('对方不想说话,并且向你抛出了一个异常');
|
55b608a6
Lawrence Lee
bugfix on .destroy
|
42
43
44
|
},
destroy () {
this.$Message.destroy();
|
7c15ac9e
梁灏
add Message compo...
|
45
|
}
|
a77eaa5c
梁灏
update
|
46
47
|
},
mounted () {
|
36a91579
梁灏
fixed #1881
|
48
49
50
51
|
// this.$Message.config({
// top: 50,
// duration: 3
// });
|
7c15ac9e
梁灏
add Message compo...
|
52
53
|
}
}
|
e1134de2
jingsam
not bundle vue in...
|
54
|
</script>
|