add Message component
add Message component
This commit is contained in:
parent
c1cfacb2d4
commit
7c15ac9e31
27 changed files with 653 additions and 38 deletions
55
local/routers/msg.vue
Normal file
55
local/routers/msg.vue
Normal file
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<Button @click="info">info</Button>
|
||||
<Button @click="success">success</Button>
|
||||
<Button @click="error">error</Button>
|
||||
<Button @click="warning">warning</Button>
|
||||
<Button @click="loading">loading</Button>
|
||||
</template>
|
||||
<script>
|
||||
import { Message, Button } from 'iview';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Message,
|
||||
Button
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
info () {
|
||||
Message.info('欢迎来到iView', 3, () => {
|
||||
console.log('close info');
|
||||
});
|
||||
},
|
||||
success () {
|
||||
Message.success('成功啦', 5, () => {
|
||||
console.log('close successs');
|
||||
});
|
||||
},
|
||||
error () {
|
||||
Message.error('错误啦');
|
||||
},
|
||||
warning () {
|
||||
Message.warning('来个警告');
|
||||
},
|
||||
loading () {
|
||||
Message.loading('我是loading');
|
||||
}
|
||||
},
|
||||
ready () {
|
||||
Message.config({
|
||||
top: 50,
|
||||
duration: 8
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue