Commit a77eaa5c93778e899d8e91bc350d9656e150e36a

Authored by 梁灏
1 parent f0af86ea

update

examples/routers/message.vue
... ... @@ -22,7 +22,10 @@
22 22 })
23 23 },
24 24 success () {
25   - this.$Message.success('这是一条成功的提示');
  25 + this.$Message.success({
  26 + content: '这是一条成功的提示',
  27 + duration: 4
  28 + });
26 29 },
27 30 warning () {
28 31 this.$Message.warning('这是一条警告的提示');
... ... @@ -33,6 +36,12 @@
33 36 destroy () {
34 37 this.$Message.destroy();
35 38 }
  39 + },
  40 + mounted () {
  41 + this.$Message.config({
  42 + top: 50,
  43 + duration: 3
  44 + });
36 45 }
37 46 }
38 47 </script>
... ...
src/styles/components/message.less
... ... @@ -8,6 +8,7 @@
8 8 width: 100%;
9 9 top: 16px;
10 10 left: 0;
  11 + pointer-events: none;
11 12  
12 13 &-notice {
13 14 padding: 8px;
... ... @@ -37,6 +38,7 @@
37 38 border-radius: @border-radius-small;
38 39 box-shadow: @shadow-base;
39 40 background: #fff;
  41 + position: relative;
40 42 &-text{
41 43 display: inline-block;
42 44 }
... ...