手机端样式细节调整,补充测试用例 (#3)

* unit test

* picker and dialog unit tes

* fix:quantity and loading
This commit is contained in:
张敏
2017-04-21 21:25:40 +08:00
committed by GitHub
parent 54f0cf7195
commit c71cb3f2fd
16 changed files with 268 additions and 18 deletions
+7 -2
View File
@@ -56,12 +56,14 @@ export default {
if (this.isGroup && this.parentGroup) {
const parentValue = this.parentGroup.value.slice();
if (val) {
/* istanbul ignore else */
if (parentValue.indexOf(this.name) === -1) {
parentValue.push(this.name);
this.parentGroup.$emit('input', parentValue);
}
} else {
const index = parentValue.indexOf(this.name);
/* istanbul ignore else */
if (index !== -1) {
parentValue.splice(index, 1);
this.parentGroup.$emit('input', parentValue);
@@ -77,8 +79,11 @@ export default {
* `checkbox`是否被选中
*/
isChecked() {
if ({}.toString.call(this.currentValue) === '[object Boolean]') {
return this.currentValue;
const currentValue = this.currentValue;
if ({}.toString.call(currentValue) === '[object Boolean]') {
return currentValue;
} else if (currentValue !== null && currentValue !== undefined) {
return currentValue === this.name;
}
},
+1 -1
View File
@@ -13,7 +13,7 @@
:values="item.values"
:class-name="item.className"
:itemHeight="itemHeight"
:visible-item-count="visibleItemCount"
:visible-item-count="visibileColumnCount"
:value-key="valueKey"
@columnChange="columnValueChange(index)">
</picker-column>
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="van-quantity">
<div class="van-quantity" :class="{ 'van-quantity--disabled': disabled }">
<button
@click="handleChange('minus')"
class="van-quantity__stepper van-quantity__minus"
File diff suppressed because one or more lines are too long
+8
View File
@@ -4,6 +4,14 @@
@b quantity {
font-size: 0;
@m disabled {
.van-quantity__input,
.van-quantity__minus,
.van-quantity__plus {
border-color: #e8e8e8;
}
}
@e stepper {
width: 40px;
height: 30px;