bug: eCX-7310

This commit is contained in:
zhangjing1
2025-09-16 17:15:51 +08:00
parent b1f7a00183
commit a5aab8c405
3 changed files with 18 additions and 6 deletions

View File

@@ -451,7 +451,7 @@ function SpDeliver(props, ref) {
{zitiAddress && (
<View className='ziti-info'>
<SpForm ref={formRef} className='applychief-form' formData={form} rules={rules}>
<SpFormItem label='提货时间' prop='pickerTime'>
<SpFormItem label='提货时间' prop='pickerTime' type='line' labelWidth='70px'>
<SpCell
className='picker-time'
isLink
@@ -470,7 +470,7 @@ function SpDeliver(props, ref) {
</Text>
</SpCell>
</SpFormItem>
<SpFormItem label='提货人' prop='pickerName'>
<SpFormItem label='提货人' prop='pickerName' type='line' labelWidth='70px'>
<AtInput
name='pickerName'
value={form.pickerName}
@@ -478,7 +478,7 @@ function SpDeliver(props, ref) {
onChange={onInputChange.bind(this, 'pickerName')}
/>
</SpFormItem>
<SpFormItem label='手机号码' prop='pickerPhone'>
<SpFormItem label='手机号码' prop='pickerPhone' type='line' labelWidth='70px'>
<AtInput
name='pickerPhone'
value={form.pickerPhone}

View File

@@ -13,7 +13,7 @@ const initialState = {
message: ''
}
function SpFormItem(props) {
const { label, prop, children, info, copy = false, onChange = () => {} } = props
const { label, prop, children, info, copy = false, onChange = () => {} ,type, labelWidth = ''} = props
const [state, setState] = useImmer(initialState)
const { message } = state
const value = useRef()
@@ -128,9 +128,9 @@ function SpFormItem(props) {
}
return (
<View className={classNames('sp-form-item', { 'split-line': info.type == 'split' })}>
<View className={classNames('sp-form-item', { 'split-line': info.type == 'split', 'sp-form-item-line': type == 'line' })}>
{label && (
<View className='form-item-label'>
<View className='form-item-label' style={{ width: labelWidth }}>
{rule.length > 0 && <Text className='required'>*</Text>}
<Text className='label'>{label}</Text>
</View>

View File

@@ -4,6 +4,18 @@
padding: 0 30px;
position: relative;
&.sp-form-item-line {
display: flex;
align-items: center;
justify-content: space-between;
.form-item-control {
flex: 1;
}
.at-input {
margin: 0!important;
}
}
.form-item-label {
margin-bottom: 4px;
position: relative;