feat: add tests && fix bugs

This commit is contained in:
jiangruowei
2017-04-06 15:11:29 +08:00
parent a85c3c2695
commit a32142c723
9 changed files with 216 additions and 46 deletions

View File

@@ -11,12 +11,18 @@
* <zan-button size="large" type="primary">按钮</zan-button>
*/
import ZanLoading from 'packages/loading';
const ALLOWED_SIZE = ['mini', 'small', 'normal', 'large'];
const ALLOWED_TYPE = ['default', 'danger', 'primary'];
export default {
name: 'zan-button',
components: {
'zan-loading': ZanLoading
},
props: {
disabled: Boolean,
loading: Boolean,
@@ -45,6 +51,7 @@ export default {
methods: {
handleClick(e) {
if (this.loading || this.disabled) return;
this.$emit('click', e);
}
},