commit
a87597bfe7
2 changed files with 19 additions and 8 deletions
|
@ -22,7 +22,10 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
success () {
|
success () {
|
||||||
this.$Message.success('这是一条成功的提示');
|
this.$Message.success({
|
||||||
|
content: '这是一条成功的提示',
|
||||||
|
duration: 4
|
||||||
|
});
|
||||||
},
|
},
|
||||||
warning () {
|
warning () {
|
||||||
this.$Message.warning('这是一条警告的提示');
|
this.$Message.warning('这是一条警告的提示');
|
||||||
|
@ -33,6 +36,12 @@
|
||||||
destroy () {
|
destroy () {
|
||||||
this.$Message.destroy();
|
this.$Message.destroy();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.$Message.config({
|
||||||
|
top: 50,
|
||||||
|
duration: 3
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,12 +8,14 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
top: 16px;
|
top: 16px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
&-notice {
|
&-notice {
|
||||||
width: auto;
|
padding: 8px;
|
||||||
vertical-align: middle;
|
text-align: center;
|
||||||
position: absolute;
|
&:first-child {
|
||||||
left: 50%;
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
&-close {
|
&-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -29,14 +31,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&-notice-content {
|
&-notice-content {
|
||||||
position: relative;
|
display: inline-block;
|
||||||
right: 50%;
|
pointer-events: all;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
//border: 1px solid @border-color-split;
|
//border: 1px solid @border-color-split;
|
||||||
border-radius: @border-radius-small;
|
border-radius: @border-radius-small;
|
||||||
box-shadow: @shadow-base;
|
box-shadow: @shadow-base;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: block;
|
position: relative;
|
||||||
&-text{
|
&-text{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue