diff --git a/packages/amis-ui/scss/components/_image-gallery.scss b/packages/amis-ui/scss/components/_image-gallery.scss index 0f2e79b1e720..ae3711ea123f 100644 --- a/packages/amis-ui/scss/components/_image-gallery.scss +++ b/packages/amis-ui/scss/components/_image-gallery.scss @@ -20,20 +20,46 @@ // max-width: calc(100% - #{px2rem(128px)}); padding: px2rem(44px) 0 px2rem(24px); + &-reverse { + flex-direction: row-reverse; + + .#{$ns}ImageGallery-main { + margin-left: px2rem(14px); + margin-right: 0; + } + } + &-overlay { background: rgba(7, 12, 20, .5); } &-embed { + display: inline-flex; + position: relative; min-height: px2rem(370px); - width: px2rem(768px); + max-width: px2rem(768px); + width: auto; padding: 0; + &-title { + min-height: px2rem(410px); + padding-top: px2rem(40px); + } + + .#{$ns}ImageGallery-toptitle { + color: var(--dark); + } + .#{$ns}ImageGallery-main { width: px2rem(546px); + height: unset; flex: 0 0 px2rem(436px); } + .#{$ns}ImageGallery-image { + height: calc(100% - #{px2rem(56px)}); + } + .#{$ns}ImageGallery-info { width: px2rem(208px); background: var(--white); @@ -70,6 +96,21 @@ } } } + + &-pagination { + + + > ul { + + li { + color: var(--dark); + + svg { + color: var(--dark); + } + } + } + } } } @@ -169,6 +210,23 @@ user-select: none; position: relative; overflow: hidden; + + &-reverse { + flex-direction: column-reverse; + + .#{$ns}ImageGallery-image { + height: calc(100% - #{px2rem(56px)}); + margin: 0 0 px2rem(16px) 0; + } + + .#{$ns}ImageGallery-image-bottom { + margin: 0; + } + + .#{$ns}ImageGallery-toolbar { + margin: 0 0 px2rem(16px) 0; + } + } } &-image { diff --git a/packages/amis-ui/scss/components/_images.scss b/packages/amis-ui/scss/components/_images.scss index 8e470f4fa379..ca0628aa0295 100644 --- a/packages/amis-ui/scss/components/_images.scss +++ b/packages/amis-ui/scss/components/_images.scss @@ -1,15 +1,14 @@ @use 'sass:math'; .#{$ns}Images { - display: flex; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(auto-fill, 120px); + grid-row-gap: 8px; + grid-column-gap: 8px; margin: calc(var(--gap-xs) * -1); &-item { display: flex; - margin: var(--image-images-item-marginTop) - var(--image-images-item-marginRight) var(--image-images-item-marginBottom) - var(--image-images-item-marginLeft); } } diff --git a/packages/amis-ui/src/components/ImageGallery.tsx b/packages/amis-ui/src/components/ImageGallery.tsx index 2320a6610d8d..41d8c7bacc19 100644 --- a/packages/amis-ui/src/components/ImageGallery.tsx +++ b/packages/amis-ui/src/components/ImageGallery.tsx @@ -49,7 +49,7 @@ interface ImageGalleryItem { interface ImageGalleryPosition { toolbar: 'top' | 'bottom'; - list: 'top' | 'bottom'; + description: 'left' | 'right'; } export interface ImageGalleryProps @@ -536,7 +536,8 @@ export class ImageGallery extends React.Component< actions, imageLoadInfo, isNaturalSize, - imageLoading + imageLoading, + position } = this.state; const {translate: __, loadingConfig} = this.props; @@ -559,8 +560,22 @@ export class ImageGallery extends React.Component< ~index && items[index] ? ( <>