Commit 7d5431d85ae37cee81156a6610fb6a37c6e79d03

Authored by 梁灏
1 parent 03441255

update some style

update some style
src/components/input/input.vue
1 <template> 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 </template> 10 </template>
9 <script> 11 <script>
10 import { oneOf } from '../../utils/assist'; 12 import { oneOf } from '../../utils/assist';
@@ -36,6 +38,9 @@ @@ -36,6 +38,9 @@
36 } 38 }
37 }, 39 },
38 computed: { 40 computed: {
  41 + wrapClasses () {
  42 +
  43 + },
39 classes () { 44 classes () {
40 return [ 45 return [
41 `${prefixCls}`, 46 `${prefixCls}`,
@@ -45,7 +45,6 @@ const iview = { @@ -45,7 +45,6 @@ const iview = {
45 Col, 45 Col,
46 Collapse, 46 Collapse,
47 Icon, 47 Icon,
48 - Input,  
49 InputNumber, 48 InputNumber,
50 LoadingBar, 49 LoadingBar,
51 Message, 50 Message,
src/styles/components/tooltip.less
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 background-color: @tooltip-bg; 26 background-color: @tooltip-bg;
27 border-radius: @border-radius-small; 27 border-radius: @border-radius-small;
28 box-shadow: @shadow-base; 28 box-shadow: @shadow-base;
29 - white-space:nowrap; 29 + white-space: nowrap;
30 } 30 }
31 31
32 &-arrow{ 32 &-arrow{
src/styles/mixins/checkbox.less
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 &:after { 32 &:after {
33 content: ''; 33 content: '';
34 display: table; 34 display: table;
35 - width: 5px; 35 + width: 4px;
36 height: 8px; 36 height: 8px;
37 position: absolute; 37 position: absolute;
38 top: 1px; 38 top: 1px;
@@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
75 &:after { 75 &:after {
76 content: ''; 76 content: '';
77 display: table; 77 display: table;
78 - width: 5px; 78 + width: 4px;
79 height: 8px; 79 height: 8px;
80 position: absolute; 80 position: absolute;
81 top: 1px; 81 top: 1px;
@@ -38,6 +38,7 @@ li + li { @@ -38,6 +38,7 @@ li + li {
38 <li><a v-link="'/switch'">Switch</a></li> 38 <li><a v-link="'/switch'">Switch</a></li>
39 <li><a v-link="'/alert'">Alert</a></li> 39 <li><a v-link="'/alert'">Alert</a></li>
40 <li><a v-link="'/tag'">Tag</a></li> 40 <li><a v-link="'/tag'">Tag</a></li>
  41 + <li><a v-link="'/input'">Input</a></li>
41 </ul> 42 </ul>
42 </nav> 43 </nav>
43 <router-view></router-view> 44 <router-view></router-view>
@@ -80,6 +80,11 @@ router.map({ @@ -80,6 +80,11 @@ router.map({
80 component: function (resolve) { 80 component: function (resolve) {
81 require(['./routers/tag.vue'], resolve); 81 require(['./routers/tag.vue'], resolve);
82 } 82 }
  83 + },
  84 + '/input': {
  85 + component: function (resolve) {
  86 + require(['./routers/input.vue'], resolve);
  87 + }
83 } 88 }
84 }); 89 });
85 90
test/routers/input.vue 0 → 100644
  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 \ No newline at end of file 27 \ No newline at end of file
test/routers/message.vue
@@ -106,7 +106,6 @@ @@ -106,7 +106,6 @@
106 } 106 }
107 }, 107 },
108 ready () { 108 ready () {
109 - this.info2();  
110 // Message.config({ 109 // Message.config({
111 // top: 50, 110 // top: 50,
112 // duration: 8 111 // duration: 8
test/routers/poptip.vue
@@ -27,9 +27,47 @@ @@ -27,9 +27,47 @@
27 padding: 8px 16px; 27 padding: 8px 16px;
28 text-align: left; 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 </style> 52 </style>
31 <template> 53 <template>
32 <div class="tooltip_out"> 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 <Poptip> 71 <Poptip>
34 <a>click 激活</a> 72 <a>click 激活</a>
35 <div slot="title"><i>自定义标题</i></div> 73 <div slot="title"><i>自定义标题</i></div>
@@ -105,10 +143,10 @@ @@ -105,10 +143,10 @@
105 </div> 143 </div>
106 </template> 144 </template>
107 <script> 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 export default { 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 props: { 150 props: {
113 151
114 }, 152 },