手机端样式细节调整,补充测试用例 (#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

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;
}
},