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

View File

@@ -13,7 +13,7 @@ const initialState = {
message: '' message: ''
} }
function SpFormItem(props) { 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 [state, setState] = useImmer(initialState)
const { message } = state const { message } = state
const value = useRef() const value = useRef()
@@ -128,9 +128,9 @@ function SpFormItem(props) {
} }
return ( 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 && ( {label && (
<View className='form-item-label'> <View className='form-item-label' style={{ width: labelWidth }}>
{rule.length > 0 && <Text className='required'>*</Text>} {rule.length > 0 && <Text className='required'>*</Text>}
<Text className='label'>{label}</Text> <Text className='label'>{label}</Text>
</View> </View>

View File

@@ -4,6 +4,18 @@
padding: 0 30px; padding: 0 30px;
position: relative; 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 { .form-item-label {
margin-bottom: 4px; margin-bottom: 4px;
position: relative; position: relative;