Skip to content

Commit

Permalink
fix(Form): 调整组件样式
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenlingasMx committed Apr 24, 2023
1 parent d82a2b2 commit d20c614
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/Form/formList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ const FormList = ({

const _render = (index: number) => {
return items.map((v: Omit<FormItemsProps, 'validate' | 'required'>, i: number) => {
const last = items.length - 1 === i;
if (v.hide) {
return null;
}
Expand All @@ -100,7 +99,7 @@ const FormList = ({
}
return (
<View key={i} style={styles.form_items_container}>
<View style={[styles.form_items, last && styles.border_none]}>
<View style={[styles.form_items]}>
<Label v={v} />
{_renderComponent(v, index)}
<Tip v={v} />
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Form/formchildItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const formchildItem = (props: Partial<FormItemsProps> & { field: string; childre
return (
<Container mode={mode}>
<View style={styles.form_items_container}>
<View style={[styles.form_items, styles.border_none]}>
<View style={[styles.form_items]}>
<Label v={{ name: name, required: required }} />
{_renderComponent(children)}
<Tip v={{ validate: validate, field: field }} />
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/Form/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ const styles = StyleSheet.create({
textAlign: 'center',
margin: 10,
borderBottomWidth: 0.5,
borderBottomColor: '#eee',
},
border_none: {
borderBottomWidth: 0,
borderBottomColor: '#ccc',
},
});

Expand Down

0 comments on commit d20c614

Please sign in to comment.