7c15ac9e
梁灏
add Message compo...
|
1
|
<template>
|
0069c7b1
梁灏
update Message style
|
2
3
4
5
6
7
8
9
|
<div>
<Button type="primary" @click="info">Display info prompt</Button>
<Button @click="success">Display success prompt</Button>
<Button @click="warning">Display warning prompt</Button>
<Button @click="error">Display error prompt</Button>
<Button @click="loading">Display loading...</Button>
<Button @click="closable">Display a closable message</Button>
</div>
|
7c15ac9e
梁灏
add Message compo...
|
10
11
|
</template>
<script>
|
7c15ac9e
梁灏
add Message compo...
|
12
|
export default {
|
7c15ac9e
梁灏
add Message compo...
|
13
|
methods: {
|
0069c7b1
梁灏
update Message style
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
info () {
this.$Message.info({
content: '这是一条普通的提示',
duration: 1000
});
},
success () {
this.$Message.success('This is a success tip');
},
warning () {
this.$Message.warning('This is a warning tip');
},
error () {
this.$Message.error('This is an error tip');
},
|
9f45c24f
梁灏
change sync to lo...
|
29
30
31
32
|
loading () {
const msg = this.$Message.loading({
content: 'Loading...',
duration: 0
|
a77eaa5c
梁灏
update
|
33
|
});
|
0069c7b1
梁灏
update Message style
|
34
|
setTimeout(msg, 3000);
|
21dad188
梁灏
prevent dispatch ...
|
35
|
},
|
0069c7b1
梁灏
update Message style
|
36
37
38
39
40
41
42
|
closable () {
this.$Message.info({
content: 'Tips for manual closing',
duration: 1000,
closable: true
});
}
|
7c15ac9e
梁灏
add Message compo...
|
43
44
|
}
}
|
e1134de2
jingsam
not bundle vue in...
|
45
|
</script>
|