Commit 8a83e7c42b961eced21421bb95c1351b9a03e6fe
1 parent
f706ef31
update Form
update Form
Showing
4 changed files
with
44 additions
and
22 deletions
Show diff stats
src/components/form/form-item.vue
src/styles/components/input.less
src/styles/mixins/input.less
@@ -102,6 +102,7 @@ | @@ -102,6 +102,7 @@ | ||
102 | border-collapse: separate; | 102 | border-collapse: separate; |
103 | position: relative; | 103 | position: relative; |
104 | font-size: @font-size-small; | 104 | font-size: @font-size-small; |
105 | + top: 1px; // fixed when using in form inline, | ||
105 | 106 | ||
106 | &-large{ | 107 | &-large{ |
107 | font-size: @font-size-base; | 108 | font-size: @font-size-base; |
test/routers/button.vue
1 | <template> | 1 | <template> |
2 | <h4>基本</h4> | 2 | <h4>基本</h4> |
3 | <br><br> | 3 | <br><br> |
4 | + <div style="background: #f60"> | ||
5 | + <input-number></input-number> | ||
6 | + <Date-picker type="date" placeholder="选择日期" style="width: 100px;display: inline-block"></Date-picker> | ||
7 | + <i-input style="width: 100px"></i-input> | ||
8 | + <i-input type="text" placeholder="Username" style="width: 100px"> | ||
9 | + <Icon type="ios-person-outline" slot="prepend"></Icon> | ||
10 | + </i-input> | ||
11 | + <i-button type="primary">按钮</i-button> | ||
12 | + <i-select :model.sync="model1" style="width:200px"> | ||
13 | + <i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option> | ||
14 | + </i-select> | ||
15 | + </div> | ||
16 | + <br><br> | ||
4 | <i-button type="success">按钮</i-button> | 17 | <i-button type="success">按钮</i-button> |
5 | <i-button type="warning">按钮</i-button> | 18 | <i-button type="warning">按钮</i-button> |
6 | <i-button type="error">按钮</i-button> | 19 | <i-button type="error">按钮</i-button> |
@@ -244,27 +257,7 @@ | @@ -244,27 +257,7 @@ | ||
244 | </Button-group> | 257 | </Button-group> |
245 | </template> | 258 | </template> |
246 | <script> | 259 | <script> |
247 | - import { iButton, Icon, Input, Switch, Radio, Checkbox, InputNumber, Row, Col, Page } from 'iview'; | ||
248 | - const ButtonGroup = iButton.Group; | ||
249 | - const RadioGroup = Radio.Group; | ||
250 | - const CheckboxGroup = Checkbox.Group; | ||
251 | - | ||
252 | export default { | 260 | export default { |
253 | - components: { | ||
254 | - iButton, | ||
255 | - ButtonGroup, | ||
256 | - Icon, | ||
257 | - iInput: Input, | ||
258 | - Switch, | ||
259 | - Radio, | ||
260 | - RadioGroup, | ||
261 | - Checkbox, | ||
262 | - CheckboxGroup, | ||
263 | - InputNumber, | ||
264 | - Row, | ||
265 | - iCol: Col, | ||
266 | - Page | ||
267 | - }, | ||
268 | props: { | 261 | props: { |
269 | 262 | ||
270 | }, | 263 | }, |
@@ -272,7 +265,34 @@ | @@ -272,7 +265,34 @@ | ||
272 | return { | 265 | return { |
273 | loading: false, | 266 | loading: false, |
274 | loading2: false, | 267 | loading2: false, |
275 | - model6: '' | 268 | + model6: '', |
269 | + cityList: [ | ||
270 | + { | ||
271 | + value: 'beijing', | ||
272 | + label: '北京市' | ||
273 | + }, | ||
274 | + { | ||
275 | + value: 'shanghai', | ||
276 | + label: '上海市' | ||
277 | + }, | ||
278 | + { | ||
279 | + value: 'shenzhen', | ||
280 | + label: '深圳市' | ||
281 | + }, | ||
282 | + { | ||
283 | + value: 'hangzhou', | ||
284 | + label: '杭州市' | ||
285 | + }, | ||
286 | + { | ||
287 | + value: 'nanjing', | ||
288 | + label: '南京市' | ||
289 | + }, | ||
290 | + { | ||
291 | + value: 'chongqing', | ||
292 | + label: '重庆市' | ||
293 | + } | ||
294 | + ], | ||
295 | + model1: '' | ||
276 | } | 296 | } |
277 | }, | 297 | }, |
278 | methods: { | 298 | methods: { |