From 73763f870328a7d9d6d85e72fbc75db94e749cf5 Mon Sep 17 00:00:00 2001 From: yupeng12 Date: Thu, 14 Mar 2024 16:30:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/Signature.tsx | 16 ++++++++++++---- packages/amis-ui/src/components/icons.tsx | 6 ++++++ packages/amis-ui/src/icons/fullscreen.svg | 4 ++++ packages/amis-ui/src/icons/undo-normal.svg | 4 ++++ packages/amis-ui/src/icons/unfullscreen.svg | 3 +++ 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 packages/amis-ui/src/icons/fullscreen.svg create mode 100644 packages/amis-ui/src/icons/undo-normal.svg create mode 100644 packages/amis-ui/src/icons/unfullscreen.svg diff --git a/packages/amis-ui/src/components/Signature.tsx b/packages/amis-ui/src/components/Signature.tsx index cf4214c1b..0b41e33be 100644 --- a/packages/amis-ui/src/components/Signature.tsx +++ b/packages/amis-ui/src/components/Signature.tsx @@ -136,22 +136,30 @@ const Signature: React.FC = props => { onClick={clear} tooltip={clearBtnLabel || __('Signature.clear')} > - {clearBtnLabel ? clearBtnLabel : } + {clearBtnLabel ? ( + clearBtnLabel + ) : ( + + )} {fullScreen ? ( ) : ( )} diff --git a/packages/amis-ui/src/components/icons.tsx b/packages/amis-ui/src/components/icons.tsx index 3c042396c..2c40c0569 100644 --- a/packages/amis-ui/src/components/icons.tsx +++ b/packages/amis-ui/src/components/icons.tsx @@ -9,6 +9,7 @@ import CloseIcon from '../icons/close.svg'; import CloseSmallIcon from '../icons/close-small.svg'; import StatusCloseIcon from '../icons/status-close.svg'; import UnDoIcon from '../icons/undo.svg'; +import UnDoNormalIcon from '../icons/undo-normal.svg'; import ReDoIcon from '../icons/redo.svg'; import EnterIcon from '../icons/enter.svg'; import VolumeIcon from '../icons/volume.svg'; @@ -49,6 +50,8 @@ import RefreshIcon from '../icons/refresh.svg'; import DragIcon from '../icons/drag.svg'; import EditIcon from '../icons/edit.svg'; import DeskEmptyIcon from '../icons/desk-empty.svg'; +import FullScreen from '../icons/fullscreen.svg'; +import UnFullscreen from '../icons/unfullscreen.svg'; import CopyIcon from '../icons/copy.svg'; import FilterIcon from '../icons/filter.svg'; @@ -143,6 +146,9 @@ registerIcon('close', CloseIcon); registerIcon('close-small', CloseSmallIcon); registerIcon('status-close', StatusCloseIcon); registerIcon('undo', UnDoIcon); +registerIcon('undo-normal', UnDoNormalIcon); +registerIcon('full-screen', FullScreen); +registerIcon('un-fullscreen', UnFullscreen); registerIcon('redo', ReDoIcon); registerIcon('enter', EnterIcon); registerIcon('volume', VolumeIcon); diff --git a/packages/amis-ui/src/icons/fullscreen.svg b/packages/amis-ui/src/icons/fullscreen.svg new file mode 100644 index 000000000..0b0de2c9a --- /dev/null +++ b/packages/amis-ui/src/icons/fullscreen.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/amis-ui/src/icons/undo-normal.svg b/packages/amis-ui/src/icons/undo-normal.svg new file mode 100644 index 000000000..374accf12 --- /dev/null +++ b/packages/amis-ui/src/icons/undo-normal.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/amis-ui/src/icons/unfullscreen.svg b/packages/amis-ui/src/icons/unfullscreen.svg new file mode 100644 index 000000000..202cdf8eb --- /dev/null +++ b/packages/amis-ui/src/icons/unfullscreen.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file