默认调用延时加载
This commit is contained in:
parent
f7e6dbf2be
commit
6cb0e6a1d8
|
@ -340,6 +340,11 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
&.is-active {
|
||||||
|
color: $Form-select-menu-onActive-color;
|
||||||
|
background-color: $Form-select-menu-onActive-bg;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $Tree-item-onHover-bg;
|
background-color: $Tree-item-onHover-bg;
|
||||||
}
|
}
|
||||||
|
@ -363,15 +368,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$ns}ListRadios {
|
|
||||||
&-item {
|
|
||||||
&.is-active {
|
|
||||||
color: $Form-select-menu-onActive-color;
|
|
||||||
background-color: $Form-select-menu-onActive-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.#{$ns}TableCheckboxes {
|
.#{$ns}TableCheckboxes {
|
||||||
.#{$ns}Table-content {
|
.#{$ns}Table-content {
|
||||||
border-top: $Table-borderWidth solid $Table-borderColor;
|
border-top: $Table-borderWidth solid $Table-borderColor;
|
||||||
|
@ -469,15 +465,15 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: $Tree-item-onHover-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
color: $Form-select-menu-onActive-color;
|
color: $Form-select-menu-onActive-color;
|
||||||
background-color: $Form-select-menu-onActive-bg;
|
background-color: $Form-select-menu-onActive-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $Tree-item-onHover-bg;
|
||||||
|
}
|
||||||
|
|
||||||
&.is-disabled {
|
&.is-disabled {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
color: $text--muted-color;
|
color: $text--muted-color;
|
||||||
|
@ -528,15 +524,15 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: $Tree-item-onHover-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
color: $Form-select-menu-onActive-color;
|
color: $Form-select-menu-onActive-color;
|
||||||
background-color: $Form-select-menu-onActive-bg;
|
background-color: $Form-select-menu-onActive-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $Tree-item-onHover-bg;
|
||||||
|
}
|
||||||
|
|
||||||
&.is-disabled {
|
&.is-disabled {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
color: $text--muted-color;
|
color: $text--muted-color;
|
||||||
|
|
|
@ -49,6 +49,23 @@ export class AssociatedCheckboxes extends Checkboxes<
|
||||||
leftValue: this.props.leftDefaultValue
|
leftValue: this.props.leftDefaultValue
|
||||||
};
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const leftValue = this.state.leftValue;
|
||||||
|
const {options, onDeferLoad} = this.props;
|
||||||
|
|
||||||
|
if (leftValue) {
|
||||||
|
const selectdOption = ListRadios.resolveSelected(
|
||||||
|
leftValue,
|
||||||
|
options,
|
||||||
|
option => option.ref
|
||||||
|
);
|
||||||
|
|
||||||
|
if (selectdOption && onDeferLoad && selectdOption.defer) {
|
||||||
|
onDeferLoad(selectdOption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
leftOption2Value(option: Option) {
|
leftOption2Value(option: Option) {
|
||||||
return option.value;
|
return option.value;
|
||||||
|
|
Loading…
Reference in New Issue