mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix: 日期范围标题重复
This commit is contained in:
parent
52d6ba2afe
commit
26b7fd827d
@ -1677,8 +1677,8 @@
|
||||
--InputRange-track-onActive-bg: var(--colors-brand-5);
|
||||
--InputRange-handle-height: var(--sizes-size-9);
|
||||
--InputRange-handle-width: var(--sizes-size-9);
|
||||
--InputRange-handle-mobile-height: var(--sizes-base-11);
|
||||
--InputRange-handle-mobile-width: var(--sizes-base-11);
|
||||
--InputRange-handle-mobile-height: var(--sizes-base-10);
|
||||
--InputRange-handle-mobile-width: var(--sizes-base-10);
|
||||
--InputRange-handle-bg: var(--colors-neutral-fill-11);
|
||||
--InputRange-handle-top-border-color: var(--colors-brand-5);
|
||||
--InputRange-handle-top-border-width: 0.0625rem;
|
||||
|
@ -396,7 +396,7 @@
|
||||
align-items: center;
|
||||
|
||||
&-popup {
|
||||
height: 80vh;
|
||||
height: px2rem(580px);
|
||||
|
||||
&-inner {
|
||||
width: 100%;
|
||||
|
@ -161,6 +161,7 @@
|
||||
margin-top: px2rem(-4px);
|
||||
}
|
||||
&-safearea {
|
||||
height: px2rem(16px);
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
|
@ -415,6 +415,8 @@
|
||||
background-color: rgb(250, 250, 250);
|
||||
border-radius: var(--borderRadius);
|
||||
position: relative;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
// .#{$ns}Form--quickEdit {
|
||||
|
@ -149,10 +149,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-drage {
|
||||
transform: var(--InputRange-handle-onActive-transform);
|
||||
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
||||
border-width: var(--InputRange-handle-onDrage-border-width);
|
||||
&:not(.is-mobile) {
|
||||
.#{$ns}InputRange-handle-drage {
|
||||
transform: var(--InputRange-handle-onActive-transform);
|
||||
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
||||
border-width: var(--InputRange-handle-onDrage-border-width);
|
||||
}
|
||||
}
|
||||
|
||||
.input-range--disabled & {
|
||||
@ -338,10 +340,10 @@
|
||||
&.is-mobile {
|
||||
.#{$ns}InputRange-marks {
|
||||
div {
|
||||
top: px2rem(4px);
|
||||
top: 0;
|
||||
|
||||
&:nth-child(2n) {
|
||||
top: px2rem(-34px);
|
||||
top: px2rem(-30px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1411,7 +1411,6 @@ export class DateRangePicker extends React.Component<
|
||||
className={cx(`${ns}DateRangePicker-wrap`, {'is-mobile': mobileUI})}
|
||||
ref={this.calendarRef}
|
||||
>
|
||||
{this.renderShortcuts(shortcuts ?? ranges)}
|
||||
{mobileUI && !embed ? (
|
||||
<div className={cx('PickerColumns-header')}>
|
||||
{
|
||||
@ -1438,6 +1437,7 @@ export class DateRangePicker extends React.Component<
|
||||
}
|
||||
</div>
|
||||
) : null}
|
||||
{this.renderShortcuts(shortcuts ?? ranges)}
|
||||
<div
|
||||
className={cx(`${ns}DateRangePicker-picker-wrap`, {
|
||||
'is-vertical': embed
|
||||
@ -1789,6 +1789,7 @@ export class DateRangePicker extends React.Component<
|
||||
)}
|
||||
onHide={this.close}
|
||||
header={CalendarMobileTitle}
|
||||
showClose={false}
|
||||
>
|
||||
{useCalendarMobile ? calendarMobile : this.renderCalendar()}
|
||||
</PopUp>
|
||||
|
@ -451,8 +451,6 @@ export class Pagination extends React.Component<
|
||||
];
|
||||
}
|
||||
|
||||
console.log('pageButtons-----', pageButtons, activePage);
|
||||
|
||||
const go = (
|
||||
<div className={cx('Pagination-inputGroup Pagination-item')} key="go">
|
||||
{!mobileUI ? (
|
||||
|
@ -6,11 +6,11 @@ import {autobind, highlight} from 'amis-core';
|
||||
import merge from 'lodash/merge';
|
||||
// @ts-ignore
|
||||
import {matchSorter} from 'match-sorter';
|
||||
import {Option, Options, value2array, SelectProps} from './Select';
|
||||
import {Option, value2array, SelectProps} from './Select';
|
||||
import VirtualList from './virtual-list';
|
||||
import Checkbox from './Checkbox';
|
||||
import Input from './Input';
|
||||
import {closeIcon, Icon} from './icons';
|
||||
import {Icon} from './icons';
|
||||
|
||||
interface SelectState {
|
||||
isFocused: boolean;
|
||||
@ -47,10 +47,6 @@ export default class SelectMobile extends React.Component<Props, SelectState> {
|
||||
const {onChange, multiple, simpleValue, valueField, options} = this.props;
|
||||
let {selection} = this.state;
|
||||
|
||||
if (!multiple && item === undefined) {
|
||||
console.log('执行了');
|
||||
}
|
||||
|
||||
// 单选是字符串
|
||||
const selectItem = options.find((option: Option) =>
|
||||
multiple
|
||||
@ -254,36 +250,24 @@ export default class SelectMobile extends React.Component<Props, SelectState> {
|
||||
const {
|
||||
popOverContainer,
|
||||
options,
|
||||
value,
|
||||
valueField,
|
||||
labelField,
|
||||
noResultsText,
|
||||
loadOptions,
|
||||
creatable,
|
||||
multiple,
|
||||
valuesNoWrap,
|
||||
classnames: cx,
|
||||
popoverClassName,
|
||||
popOverContainerSelector,
|
||||
checkAll,
|
||||
checkAllLabel,
|
||||
checkAllBySearch,
|
||||
searchable,
|
||||
createBtnLabel,
|
||||
disabled,
|
||||
searchPromptText,
|
||||
editable,
|
||||
removable,
|
||||
overlayPlacement,
|
||||
translate: __,
|
||||
hideSelected,
|
||||
renderMenu,
|
||||
mobileClassName,
|
||||
virtualThreshold = 100,
|
||||
useMobileUI = false,
|
||||
overlay,
|
||||
isOpen,
|
||||
highlightedIndex,
|
||||
onClose,
|
||||
getInputProps,
|
||||
getItemProps,
|
||||
@ -301,8 +285,12 @@ export default class SelectMobile extends React.Component<Props, SelectState> {
|
||||
keys: [labelField || 'label', valueField || 'value']
|
||||
})
|
||||
: options.concat()
|
||||
).filter((option: Option) => !option.hidden && option.visible !== false);
|
||||
|
||||
).filter(
|
||||
(option: Option) =>
|
||||
!option.hidden &&
|
||||
option.visible !== false &&
|
||||
option[labelField || 'label']
|
||||
);
|
||||
const enableVirtualRender =
|
||||
filtedOptions.length && filtedOptions.length > virtualThreshold;
|
||||
const selectionValues = selection.map(select => select[valueField]);
|
||||
|
Loading…
Reference in New Issue
Block a user