Commit 2c5faf30f417bc0fafb83714835312fa5d68a2c3
1 parent
98233573
init Avatar component
Showing
9 changed files
with
66 additions
and
14 deletions
Show diff stats
examples/app.vue
| ... | ... | @@ -54,6 +54,7 @@ li + li { border-left: solid 1px #bbb; padding-left: 10px; margin-left: 10px; } |
| 54 | 54 | <li><router-link to="/modal">Modal</router-link></li> |
| 55 | 55 | <li><router-link to="/message">Message</router-link></li> |
| 56 | 56 | <li><router-link to="/notice">Notice</router-link></li> |
| 57 | + <li><router-link to="/avatar">Avatar</router-link></li> | |
| 57 | 58 | </ul> |
| 58 | 59 | </nav> |
| 59 | 60 | <router-view></router-view> | ... | ... |
examples/main.js
examples/routers/poptip.vue
| 1 | 1 | <template> |
| 2 | - <div> | |
| 3 | - <Poptip trigger="hover" title="提示标题" content="提示内容"> | |
| 4 | - <Button>hover 激活</Button> | |
| 5 | - </Poptip> | |
| 6 | - <Poptip transfer title="提示标题" content="提示内容"> | |
| 7 | - <Button>click 激活</Button> | |
| 8 | - </Poptip> | |
| 9 | - <Poptip trigger="focus" title="提示标题" content="提示内容"> | |
| 10 | - <Button>focus 激活</Button> | |
| 11 | - </Poptip> | |
| 12 | - <Poptip trigger="focus" title="提示标题" content="提示内容"> | |
| 13 | - <i-input placeholder="输入框的 focus"></i-input> | |
| 2 | + <div style="margin: 100px;"> | |
| 3 | + <Poptip | |
| 4 | + confirm | |
| 5 | + transfer | |
| 6 | + title="您确认删除这条内容吗?" | |
| 7 | + @on-ok="ok" | |
| 8 | + @on-cancel="cancel"> | |
| 9 | + <Button>删除</Button> | |
| 14 | 10 | </Poptip> |
| 15 | 11 | </div> |
| 16 | 12 | </template> |
| 17 | 13 | <script> |
| 18 | 14 | export default { |
| 19 | - | |
| 15 | + methods: { | |
| 16 | + ok () { | |
| 17 | + this.$Message.info('点击了确定'); | |
| 18 | + }, | |
| 19 | + cancel () { | |
| 20 | + this.$Message.info('点击了取消'); | |
| 21 | + } | |
| 22 | + } | |
| 20 | 23 | } |
| 21 | 24 | </script> | ... | ... |
| 1 | +<template> | |
| 2 | + <span> | |
| 3 | + | |
| 4 | + </span> | |
| 5 | +</template> | |
| 6 | +<script> | |
| 7 | + const prefixCls = 'ivu-avatar'; | |
| 8 | + | |
| 9 | + export default { | |
| 10 | + name: 'Avatar', | |
| 11 | + props: { | |
| 12 | + | |
| 13 | + }, | |
| 14 | + data () { | |
| 15 | + return { | |
| 16 | + | |
| 17 | + }; | |
| 18 | + }, | |
| 19 | + computed: { | |
| 20 | + | |
| 21 | + }, | |
| 22 | + methods: { | |
| 23 | + | |
| 24 | + } | |
| 25 | + }; | |
| 26 | +</script> | |
| 0 | 27 | \ No newline at end of file | ... | ... |
src/index.js
| ... | ... | @@ -3,6 +3,7 @@ import 'core-js/fn/array/find-index'; |
| 3 | 3 | |
| 4 | 4 | import Affix from './components/affix'; |
| 5 | 5 | import Alert from './components/alert'; |
| 6 | +import Avatar from './components/avatar'; | |
| 6 | 7 | import BackTop from './components/back-top'; |
| 7 | 8 | import Badge from './components/badge'; |
| 8 | 9 | import Breadcrumb from './components/breadcrumb'; |
| ... | ... | @@ -49,6 +50,7 @@ import locale from './locale'; |
| 49 | 50 | const iview = { |
| 50 | 51 | Affix, |
| 51 | 52 | Alert, |
| 53 | + Avatar, | |
| 52 | 54 | BackTop, |
| 53 | 55 | Badge, |
| 54 | 56 | Breadcrumb, | ... | ... |
src/styles/components/index.less