手机端样式细节调整,补充测试用例 (#3)
* unit test * picker and dialog unit tes * fix:quantity and loading
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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,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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user