mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
add border
This commit is contained in:
parent
2fed755d7c
commit
72a60dc3e1
@ -1,3 +1,4 @@
|
||||
lib/
|
||||
dist/
|
||||
node_modules/
|
||||
build/
|
||||
|
@ -28,16 +28,19 @@
|
||||
@modifier default {
|
||||
color: $button-default-color;
|
||||
background-color: $button-default-background-color;
|
||||
border: 1px solid $button-default-border-color;
|
||||
}
|
||||
|
||||
@modifier primary {
|
||||
color: $button-primary-color;
|
||||
background-color: $button-primary-background-color;
|
||||
border: 1px solid $button-primary-border-color;
|
||||
}
|
||||
|
||||
@modifier danger {
|
||||
color: $button-danger-color;
|
||||
background-color: $button-danger-background-color;
|
||||
border: 1px solid $button-danger-border-color;
|
||||
}
|
||||
|
||||
@modifier large {
|
||||
|
@ -32,15 +32,13 @@
|
||||
* @example
|
||||
* <o2-button size="large" type="primary">按钮</o2-button>
|
||||
*/
|
||||
|
||||
const allowedSize = ['mini', 'small', 'normal', 'large'];
|
||||
const allowedType = ['default', 'danger', 'primary'];
|
||||
|
||||
export default {
|
||||
name: 'o2-button',
|
||||
|
||||
methods: {
|
||||
handleClick(e) {
|
||||
this.$emit('click', e);
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
disabled: Boolean,
|
||||
loading: Boolean,
|
||||
@ -49,23 +47,14 @@ export default {
|
||||
type: String,
|
||||
default: 'default',
|
||||
validator(value) {
|
||||
return [
|
||||
'default',
|
||||
'danger',
|
||||
'primary'
|
||||
].indexOf(value) > -1;
|
||||
return allowedSize.indexOf(value) > -1;
|
||||
}
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'normal',
|
||||
validator(value) {
|
||||
return [
|
||||
'mini',
|
||||
'small',
|
||||
'normal',
|
||||
'large'
|
||||
].indexOf(value) > -1;
|
||||
return allowedType.indexOf(value) > -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,15 @@ $c-blue: #38f;
|
||||
$c-background: #f8f8f8;
|
||||
|
||||
/* 按钮颜色 */
|
||||
$button-default-color: $c-white;
|
||||
$button-default-background-color: $c-green-wx;
|
||||
$button-primary-color: $c-black;
|
||||
$button-primary-background-color: $c-white;
|
||||
$button-primary-color: $c-white;
|
||||
$button-primary-background-color: $c-green-wx;
|
||||
$button-primary-border-color: #0a0;
|
||||
$button-default-color: $c-black;
|
||||
$button-default-background-color: $c-white;
|
||||
$button-default-border-color: #bbb;
|
||||
$button-danger-color: $c-white;
|
||||
$button-danger-background-color: #f44;
|
||||
$button-danger-border-color: #e33;
|
||||
|
||||
:root{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user