Button add 4 new type
Button add 4 new type
This commit is contained in:
parent
9084eb1872
commit
b88f42eb62
5 changed files with 34 additions and 1 deletions
BIN
assets/iview.png
BIN
assets/iview.png
Binary file not shown.
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 158 KiB |
|
@ -17,7 +17,7 @@
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
validator (value) {
|
validator (value) {
|
||||||
return oneOf(value, ['primary', 'ghost', 'dashed', 'text']);
|
return oneOf(value, ['primary', 'ghost', 'dashed', 'text', 'info', 'success', 'warning', 'error']);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shape: {
|
shape: {
|
||||||
|
|
|
@ -46,6 +46,22 @@
|
||||||
.btn-text;
|
.btn-text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-success {
|
||||||
|
.btn-color(@success-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-warning {
|
||||||
|
.btn-color(@warning-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-error {
|
||||||
|
.btn-color(@error-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-info {
|
||||||
|
.btn-color(@info-color);
|
||||||
|
}
|
||||||
|
|
||||||
//&-dashed {
|
//&-dashed {
|
||||||
// .btn-dashed;
|
// .btn-dashed;
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -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
|
// Circle for Icon
|
||||||
.btn-circle(@btnClassName: ivu-btn) {
|
.btn-circle(@btnClassName: ivu-btn) {
|
||||||
border-radius: @btn-circle-size;
|
border-radius: @btn-circle-size;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<h4>基本</h4>
|
<h4>基本</h4>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
<i-button type="success">按钮</i-button>
|
||||||
|
<i-button type="warning">按钮</i-button>
|
||||||
|
<i-button type="error">按钮</i-button>
|
||||||
|
<i-button type="info">按钮</i-button>
|
||||||
|
<br><br>
|
||||||
<Button-group>
|
<Button-group>
|
||||||
<i-button>取消</i-button>
|
<i-button>取消</i-button>
|
||||||
<i-button type="primary">确定</i-button>
|
<i-button type="primary">确定</i-button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue