forked from p96170835/amis
配置正则优化、按钮组优化
This commit is contained in:
parent
cb6b4e4399
commit
c4508798b1
|
@ -171,13 +171,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
@mixin hover-focus {
|
||||
&:hover,
|
||||
@mixin focus {
|
||||
&:focus {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin hover-focus {
|
||||
&:hover:focus {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin hover-active {
|
||||
&:hover:active {
|
||||
@content;
|
||||
|
@ -226,10 +231,24 @@
|
|||
border-color: $border;
|
||||
box-shadow: $Button-boxShadow;
|
||||
|
||||
@include hover {
|
||||
color: $hover-color;
|
||||
background-color: $hover-background;
|
||||
border-color: $hover-border;
|
||||
}
|
||||
|
||||
@include focus {
|
||||
color: $color;
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
box-shadow: $Button-boxShadow;
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
color: $hover-color;
|
||||
background-color: $hover-background;
|
||||
border-color: $hover-border;
|
||||
box-shadow: $Button-boxShadow;
|
||||
}
|
||||
|
||||
&.is-disabled,
|
||||
|
|
|
@ -4,7 +4,7 @@ const isEmpty = (value: any) => value === '';
|
|||
const makeRegexp = (reg: string | RegExp) => {
|
||||
if (reg instanceof RegExp) {
|
||||
return reg;
|
||||
} else if (/\/(.+)\/([gimuy]*)/.test(reg)) {
|
||||
} else if (/^\/(.+)\/([gimuy]*)$/.test(reg)) {
|
||||
return new RegExp(RegExp.$1, RegExp.$2 || '');
|
||||
} else if (typeof reg === 'string') {
|
||||
return new RegExp(reg);
|
||||
|
|
Loading…
Reference in New Issue