@@ -5,6 +5,7 @@ import {autobind} from 'amis-core';
55import Modal from './Modal' ;
66import { Icon } from './icons' ;
77import { LocaleProps , localeable } from 'amis-core' ;
8+ import Range from './Range' ;
89import Spinner , { SpinnerExtraProps } from './Spinner' ;
910import DragProgress from './DragProgress' ;
1011import Sliding from './Sliding' ;
@@ -135,7 +136,7 @@ export class ImageGallery extends React.Component<
135136 } ,
136137 {
137138 key : ImageActionKey . DOWNLOAD ,
138- icon : 'download-new ' ,
139+ icon : 'image-download ' ,
139140 label : 'download'
140141 } ,
141142 {
@@ -356,7 +357,6 @@ export class ImageGallery extends React.Component<
356357 setIndex ( cIndex : number ) {
357358 const { items, index} = this . state ;
358359 const bool = items [ index ] . originalSrc === items [ cIndex ] . originalSrc ;
359- console . log ( bool ) ;
360360 this . setState ( {
361361 index : cIndex ,
362362 imageLoading : ! bool ,
@@ -488,7 +488,7 @@ export class ImageGallery extends React.Component<
488488 }
489489
490490 renderToolbar ( actions : ImageAction [ ] ) {
491- const { classnames : cx , translate : __ , className, embed } = this . props ;
491+ const { classnames : cx , translate : __ , className} = this . props ;
492492 const { scale, index, items} = this . state ;
493493
494494 return (
@@ -497,12 +497,15 @@ export class ImageGallery extends React.Component<
497497 { actions . map ( action => {
498498 if ( action . key === ImageActionKey . DRAG ) {
499499 return (
500- < DragProgress
501- value = { scale }
502- onChange = { this . handleDragProgress }
503- skin = { embed ? 'light' : 'dark' }
504- max = { 2 }
505- />
500+ < div className = { cx ( 'ImageGallery-toolbar-range' ) } >
501+ < Range
502+ onChange = { this . handleDragProgress }
503+ value = { scale * 100 }
504+ step = { 1 }
505+ min = { 0 }
506+ max = { 200 }
507+ />
508+ </ div >
506509 ) ;
507510 }
508511
0 commit comments