diff --git a/packages/amis-ui/scss/_components.scss b/packages/amis-ui/scss/_components.scss index 5438730ec..d23c2a8d3 100644 --- a/packages/amis-ui/scss/_components.scss +++ b/packages/amis-ui/scss/_components.scss @@ -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; diff --git a/packages/amis-ui/scss/components/_formula.scss b/packages/amis-ui/scss/components/_formula.scss index f41c9e7a5..99e87d376 100644 --- a/packages/amis-ui/scss/components/_formula.scss +++ b/packages/amis-ui/scss/components/_formula.scss @@ -396,7 +396,7 @@ align-items: center; &-popup { - height: 80vh; + height: px2rem(580px); &-inner { width: 100%; diff --git a/packages/amis-ui/scss/components/_popup.scss b/packages/amis-ui/scss/components/_popup.scss index fa8263547..21b9203d3 100644 --- a/packages/amis-ui/scss/components/_popup.scss +++ b/packages/amis-ui/scss/components/_popup.scss @@ -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); } } diff --git a/packages/amis-ui/scss/components/form/_form.scss b/packages/amis-ui/scss/components/form/_form.scss index 391bc702b..7309e7db9 100644 --- a/packages/amis-ui/scss/components/form/_form.scss +++ b/packages/amis-ui/scss/components/form/_form.scss @@ -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 { diff --git a/packages/amis-ui/scss/components/form/_range.scss b/packages/amis-ui/scss/components/form/_range.scss index 5b0014a49..e7a3253b0 100644 --- a/packages/amis-ui/scss/components/form/_range.scss +++ b/packages/amis-ui/scss/components/form/_range.scss @@ -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); } } } diff --git a/packages/amis-ui/src/components/DateRangePicker.tsx b/packages/amis-ui/src/components/DateRangePicker.tsx index 5b43ef531..52dc8a1e3 100644 --- a/packages/amis-ui/src/components/DateRangePicker.tsx +++ b/packages/amis-ui/src/components/DateRangePicker.tsx @@ -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 ? (
{ @@ -1438,6 +1437,7 @@ export class DateRangePicker extends React.Component< }
) : null} + {this.renderShortcuts(shortcuts ?? ranges)}
{useCalendarMobile ? calendarMobile : this.renderCalendar()} diff --git a/packages/amis-ui/src/components/Pagination.tsx b/packages/amis-ui/src/components/Pagination.tsx index 4fcdf2fda..cc78edf82 100644 --- a/packages/amis-ui/src/components/Pagination.tsx +++ b/packages/amis-ui/src/components/Pagination.tsx @@ -451,8 +451,6 @@ export class Pagination extends React.Component< ]; } - console.log('pageButtons-----', pageButtons, activePage); - const go = (
{!mobileUI ? ( diff --git a/packages/amis-ui/src/components/SelectMobile.tsx b/packages/amis-ui/src/components/SelectMobile.tsx index 6a26f8471..e1c4d5f0f 100644 --- a/packages/amis-ui/src/components/SelectMobile.tsx +++ b/packages/amis-ui/src/components/SelectMobile.tsx @@ -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 { 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 { 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 { 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]);