🎨 add eslint

This commit is contained in:
jingsam 2016-12-25 22:49:42 +08:00
parent 829a2e4cfc
commit b0893113b3
88 changed files with 376 additions and 370 deletions

View file

@ -18,7 +18,7 @@
data () {
return {
prefixCls: prefixCls
}
};
}
}
</script>
};
</script>

View file

@ -19,7 +19,7 @@
data () {
return {
active: false
}
};
},
computed: {
classes () {
@ -30,7 +30,7 @@
[`${prefixCls}-item-selected`]: this.active,
[`${prefixCls}-item-disabled`]: this.disabled
}
]
];
}
},
methods: {
@ -39,5 +39,5 @@
this.$dispatch('on-menu-item-select', this.key);
}
}
}
</script>
};
</script>

View file

@ -26,7 +26,7 @@
openKeys: {
type: Array,
default () {
return []
return [];
}
},
accordion: {
@ -49,7 +49,7 @@
{
[`${prefixCls}-${this.mode}`]: this.mode
}
]
];
},
styles () {
let style = {};
@ -77,7 +77,7 @@
} else {
groupItem.active = false;
}
})
});
} else if (subitem.$options.name === 'MenuItem') {
if (subitem.key === this.activeKey) {
subitem.active = true;
@ -86,15 +86,15 @@
subitem.active = false;
}
}
})
});
} else if (item.$options.name === 'MenuGroup') {
item.$children.forEach(groupItem => {
groupItem.active = groupItem.key === this.activeKey;
})
});
} else if (item.$options.name === 'MenuItem') {
item.active = item.key === this.activeKey;
}
})
});
},
updateOpenKeys (key) {
const index = this.openKeys.indexOf(key);
@ -109,7 +109,7 @@
if (item.$options.name === 'Submenu') {
if (this.openKeys.indexOf(item.key) > -1) item.opened = true;
}
})
});
}
},
compiled () {
@ -128,5 +128,5 @@
this.$emit('on-open-change', this.openKeys);
}
}
}
</script>
};
</script>

View file

@ -31,7 +31,7 @@
prefixCls: prefixCls,
active: false,
opened: false
}
};
},
computed: {
classes () {
@ -42,7 +42,7 @@
[`${prefixCls}-opened`]: this.opened,
[`${prefixCls}-submenu-disabled`]: this.disabled
}
]
];
},
mode () {
return this.$parent.mode;
@ -106,5 +106,5 @@
return true;
}
}
}
</script>
};
</script>