Commit 7d5431d85ae37cee81156a6610fb6a37c6e79d03

Authored by 梁灏
1 parent 03441255

update some style

update some style
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
... ... @@ -45,7 +45,6 @@ const iview = {
45 45 Col,
46 46 Collapse,
47 47 Icon,
48   - Input,
49 48 InputNumber,
50 49 LoadingBar,
51 50 Message,
... ...
src/styles/components/tooltip.less
... ... @@ -26,7 +26,7 @@
26 26 background-color: @tooltip-bg;
27 27 border-radius: @border-radius-small;
28 28 box-shadow: @shadow-base;
29   - white-space:nowrap;
  29 + white-space: nowrap;
30 30 }
31 31  
32 32 &-arrow{
... ...
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
... ... @@ -38,6 +38,7 @@ li + li {
38 38 <li><a v-link="'/switch'">Switch</a></li>
39 39 <li><a v-link="'/alert'">Alert</a></li>
40 40 <li><a v-link="'/tag'">Tag</a></li>
  41 + <li><a v-link="'/input'">Input</a></li>
41 42 </ul>
42 43 </nav>
43 44 <router-view></router-view>
... ...
test/main.js
... ... @@ -80,6 +80,11 @@ router.map({
80 80 component: function (resolve) {
81 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 27 \ No newline at end of file
... ...
test/routers/message.vue
... ... @@ -106,7 +106,6 @@
106 106 }
107 107 },
108 108 ready () {
109   - this.info2();
110 109 // Message.config({
111 110 // top: 50,
112 111 // duration: 8
... ...
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 },
... ...