diff --git a/assets/iview.png b/assets/iview.png index f18bbb5..549203b 100644 Binary files a/assets/iview.png and b/assets/iview.png differ diff --git a/src/components/button/button.vue b/src/components/button/button.vue index f85a965..0bd5d3f 100644 --- a/src/components/button/button.vue +++ b/src/components/button/button.vue @@ -17,7 +17,7 @@ props: { type: { validator (value) { - return oneOf(value, ['primary', 'ghost', 'dashed', 'text']); + return oneOf(value, ['primary', 'ghost', 'dashed', 'text', 'info', 'success', 'warning', 'error']); } }, shape: { diff --git a/src/styles/components/button.less b/src/styles/components/button.less index eb3335e..27cae36 100644 --- a/src/styles/components/button.less +++ b/src/styles/components/button.less @@ -46,6 +46,22 @@ .btn-text; } + &-success { + .btn-color(@success-color); + } + + &-warning { + .btn-color(@warning-color); + } + + &-error { + .btn-color(@error-color); + } + + &-info { + .btn-color(@info-color); + } + //&-dashed { // .btn-dashed; //} diff --git a/src/styles/mixins/button.less b/src/styles/mixins/button.less index 3d6c0c4..a8fd0b2 100644 --- a/src/styles/mixins/button.less +++ b/src/styles/mixins/button.less @@ -248,6 +248,18 @@ } } +// Color +.btn-color(@color) { + .button-variant(@btn-primary-color; @color; @color); + + &:hover, + //&:focus, + &:active, + &.active { + color: @btn-primary-color; + } +} + // Circle for Icon .btn-circle(@btnClassName: ivu-btn) { border-radius: @btn-circle-size; diff --git a/test/routers/button.vue b/test/routers/button.vue index c04cd15..4f4bd77 100644 --- a/test/routers/button.vue +++ b/test/routers/button.vue @@ -1,6 +1,11 @@