Commit 7d5431d85ae37cee81156a6610fb6a37c6e79d03
1 parent
03441255
update some style
update some style
Showing
9 changed files
with
86 additions
and
13 deletions
Show diff stats
src/components/input/input.vue
1 | 1 | <template> |
2 | - <input | |
3 | - :class="classes" | |
4 | - :type="type" | |
5 | - :placeholder="placeholder" | |
6 | - :name="name" | |
7 | - v-model="value"> | |
2 | + <div :class="wrapClasses"> | |
3 | + <input | |
4 | + :class="classes" | |
5 | + :type="type" | |
6 | + :placeholder="placeholder" | |
7 | + :name="name" | |
8 | + v-model="value"> | |
9 | + </div> | |
8 | 10 | </template> |
9 | 11 | <script> |
10 | 12 | import { oneOf } from '../../utils/assist'; |
... | ... | @@ -36,6 +38,9 @@ |
36 | 38 | } |
37 | 39 | }, |
38 | 40 | computed: { |
41 | + wrapClasses () { | |
42 | + | |
43 | + }, | |
39 | 44 | classes () { |
40 | 45 | return [ |
41 | 46 | `${prefixCls}`, | ... | ... |
src/index.js
src/styles/components/tooltip.less
src/styles/mixins/checkbox.less
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | &:after { |
33 | 33 | content: ''; |
34 | 34 | display: table; |
35 | - width: 5px; | |
35 | + width: 4px; | |
36 | 36 | height: 8px; |
37 | 37 | position: absolute; |
38 | 38 | top: 1px; |
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | &:after { |
76 | 76 | content: ''; |
77 | 77 | display: table; |
78 | - width: 5px; | |
78 | + width: 4px; | |
79 | 79 | height: 8px; |
80 | 80 | position: absolute; |
81 | 81 | top: 1px; | ... | ... |
test/app.vue
test/main.js
1 | +<template> | |
2 | + <i-input></i-input> | |
3 | +</template> | |
4 | +<script> | |
5 | + import { Input } from 'iview'; | |
6 | + | |
7 | + export default { | |
8 | + components: { | |
9 | + iInput: Input | |
10 | + }, | |
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 | ... | ... |
test/routers/message.vue
test/routers/poptip.vue
... | ... | @@ -27,9 +27,47 @@ |
27 | 27 | padding: 8px 16px; |
28 | 28 | text-align: left; |
29 | 29 | } |
30 | + .tip{ | |
31 | + width: 24px; | |
32 | + position: fixed; | |
33 | + top: 10px; | |
34 | + right: 10px; | |
35 | + } | |
36 | + .tip-inner{ | |
37 | + width: 24px; | |
38 | + height: 24px; | |
39 | + line-height: 22px; | |
40 | + text-align: center; | |
41 | + background: #fff; | |
42 | + border: 1px solid #3399ff; | |
43 | + color: #3399ff; | |
44 | + border-radius: 50%; | |
45 | + cursor: pointer; | |
46 | + } | |
47 | + .tip-content{ | |
48 | + width: 200px; | |
49 | + height: 100px; | |
50 | + white-space: normal; | |
51 | + } | |
30 | 52 | </style> |
31 | 53 | <template> |
32 | 54 | <div class="tooltip_out"> |
55 | + <!--<Poptip class="tip" placement="left-start" trigger="hover">--> | |
56 | + <!--<div class="tip-inner">--> | |
57 | + <!--<Icon type="information"></Icon>--> | |
58 | + <!--</div>--> | |
59 | + <!--<div class="tip-content" slot="content">--> | |
60 | + <!--<p>iView 最新版本为 0.9.7,该版本对很多组件 UI 进行了调整</p>--> | |
61 | + <!--</div>--> | |
62 | + <!--</Poptip>--> | |
63 | + <Tooltip class="tip" placement="left-start" trigger="hover"> | |
64 | + <div class="tip-inner"> | |
65 | + <Icon type="information"></Icon> | |
66 | + </div> | |
67 | + <div class="tip-content" slot="content"> | |
68 | + <p>iView 最新版本为 0.9.7,该版本对很多组件 UI 进行了调整</p> | |
69 | + </div> | |
70 | + </Tooltip> | |
33 | 71 | <Poptip> |
34 | 72 | <a>click 激活</a> |
35 | 73 | <div slot="title"><i>自定义标题</i></div> |
... | ... | @@ -105,10 +143,10 @@ |
105 | 143 | </div> |
106 | 144 | </template> |
107 | 145 | <script> |
108 | - import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message } from 'iview'; | |
146 | + import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message, Icon } from 'iview'; | |
109 | 147 | |
110 | 148 | export default { |
111 | - components: { Tooltip, iButton: Button, Row, iCol, Poptip, iSelect, iOption, Message }, | |
149 | + components: { Tooltip, iButton: Button, Row, iCol, Poptip, iSelect, iOption, Message, Icon }, | |
112 | 150 | props: { |
113 | 151 | |
114 | 152 | }, | ... | ... |