Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 图片集优化 #8697

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

feat: 图片集优化 #8697

wants to merge 7 commits into from

Conversation

sqzhou
Copy link
Collaborator

@sqzhou sqzhou commented Nov 10, 2023

  1. 支持images、image支持内嵌模式显示
  2. 支持images、image图片放大的显示UI完善
  3. 支持images、image图片放大的底部滚动完善
  4. 支持images、image图片放大的标题和描述的显示

@github-actions github-actions bot added the feat label Nov 10, 2023
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@sqzhou sqzhou force-pushed the feat/images branch 5 times, most recently from da3bf75 to 22079d4 Compare November 16, 2023 07:00
@@ -431,6 +431,22 @@ List 的内容、Card 卡片的内容配置同上
}
```

## 内嵌模式

配置`"embed": true`,显示图片内嵌模式
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充一下引入版本3.6.0

docs/zh-CN/components/image.md Outdated Show resolved Hide resolved
docs/zh-CN/components/images.md Show resolved Hide resolved
| embed | `boolean` | `false` | 内嵌模式,当是 `true` 开启内嵌显示 | `3.5.3` |
| imageStyle | `object` | | 设置图片列表每一项的style | `3.5.3` |
| position.toolbar | `top' \| 'bottom'` | `'bottom'` | 设置图片放大时,工具栏位置 | `3.5.3` |
| position.description | `'left' \| 'right'` | `'right'` | 设置图片放大时,描述对应显示框位置 | `3.5.3` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

引入版本改一下

@@ -0,0 +1,64 @@
.#{$ns}DrapProgress {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

拼写错误: DragProgress 统一检查一下,一些关键的主题样式可以考虑提取成组件的 CSS 变量,比如下面的一些硬编码的颜色、边框、阴影等

autobind
} from 'amis-core';

interface DragProgrocessProp extends ThemeProps, LocaleProps {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以用 Range 组件替换
image

import {resizeSensor} from 'amis-core';
import {Icon} from './icons';

interface SlidingProp extends ThemeProps, LocaleProps {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把这个和Carousel 组件融合一下,在 amis-ui 里加一个Carousel吧

@@ -161,6 +163,8 @@ registerIcon('remove', RemoveIcon);
registerIcon('retry', RetryIcon);
registerIcon('upload', UploadIcon);
registerIcon('download', DownloadIcon);
registerIcon('download-new', DownloadNewIcon);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图标名称语义化:ImageDownload

@@ -595,6 +618,32 @@ export class ImageField extends React.Component<
? filter(defaultImage, data, '| raw')
: imagePlaceholder;

const filterSrc = value ? value : defaultValue;

if (embed) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉不需要吧,Images 图片集支持内嵌就行了

? filter(originalSrc, item, '| raw')
: item?.src || filter(src, item, '| raw') || item?.image || item,
title: title ? this.stringParse(title, 'title') : '',
caption: description ? this.stringParse(description, 'caption') : ''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

每个 Image 元素可以单独设置 style,local style > global style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants