Skip to content

Commit

Permalink
chore: changeset Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
liyatang committed Dec 9, 2024
1 parent f46b6cc commit a52f991
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
6 changes: 6 additions & 0 deletions mobile/mini/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @fe-free/mini

## 1.4.4

### Patch Changes

- fix: mini

## 1.4.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion mobile/mini/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fe-free/mini",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "./src/index.ts",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions mobile/mini/src/list/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
}
}

&.mini-list-extra-text-default-color {
.item-extra__info {
color: inherit;
}
}

&.mini-list-size-small {
.at-list__item {
padding: 0.3rem 0.6rem;
}
}
}

.mini-list-item-extra-text-default-color {
.item-extra__info {
color: inherit;
}
}
11 changes: 7 additions & 4 deletions mobile/mini/src/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ interface ListProps extends AtListProps {
title?: string;
size?: 'small';
responseWidth?: boolean;
extraTextDefaultColor?: boolean;
}
const List = (props: ListProps) => {
return (
Expand All @@ -32,7 +31,6 @@ const List = (props: ListProps) => {
<View
className={classNames('mini-list', {
'mini-list-response-width': props.responseWidth,
'mini-list-extra-text-default-color': props.extraTextDefaultColor,
'mini-list-size-small': props.size === 'small',
})}
>
Expand All @@ -45,12 +43,16 @@ const List = (props: ListProps) => {
interface ListItemProps extends Omit<AtListItemProps, 'title'> {
title?: string | ReactNode;
required?: boolean;
extraTextDefaultColor?: boolean;
}

const ListItem = ({ required, title, ...rest }: ListItemProps) => {
const ListItem = ({ required, title, extraTextDefaultColor, ...rest }: ListItemProps) => {
return (
<AtListItem
{...rest}
className={classNames('mini-list-item', {
'mini-list-item-extra-text-default-color': extraTextDefaultColor,
})}
title={required ? <View className="mini-required">{title}</View> : (title as any)}
/>
);
Expand All @@ -73,7 +75,7 @@ interface ListDescriptionProps extends Pick<ListProps, 'size' | 'title'> {

const ListDescription = (props: ListDescriptionProps) => {
return (
<List title={props.title} size={props.size} responseWidth extraTextDefaultColor>
<List title={props.title} size={props.size} responseWidth>
{props.items.map((item, index) => {
let extraText = item.value;

Expand Down Expand Up @@ -107,6 +109,7 @@ const ListDescription = (props: ListDescriptionProps) => {
note={item.desc}
onClick={handleClick}
arrow={item.access ? 'right' : undefined}
extraTextDefaultColor
/>
);
})}
Expand Down
7 changes: 6 additions & 1 deletion mobile/mini/src/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ function Select(props: SelectProps) {

return (
<Picker options={options} value={value} onChange={onChange}>
<List.Item required={required} title={title} extraText={label || placeholder || '请选择'} />
<List.Item
required={required}
title={title}
extraText={label || placeholder || '请选择'}
extraTextDefaultColor={!!label}
/>
</Picker>
);
}
Expand Down

0 comments on commit a52f991

Please sign in to comment.