From 402dd1a9c3db54b5d2bd0c2e1ba2b732c4a69802 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Fri, 12 Jun 2020 11:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/_array-input.scss | 14 +++++++++++++- src/components/ArrayInput.tsx | 11 +++++++++-- src/components/NumberInput.tsx | 5 +++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/scss/components/_array-input.scss b/scss/components/_array-input.scss index 73dc8950..c7eae8d9 100644 --- a/scss/components/_array-input.scss +++ b/scss/components/_array-input.scss @@ -41,13 +41,25 @@ &-toolbar { margin-top: $gap-sm; + + &--dnd { + padding-left: 29px; + } + + display: flex; + flex-direction: row; + justify-content: space-between; + } + + &-sortTip { + color: $text--muted-color; } &-item { display: flex; flex-direction: row; align-items: flex-start; - margin-bottom: $gap-sm; + margin-bottom: $gap-xs; > div { flex-grow: 1; diff --git a/src/components/ArrayInput.tsx b/src/components/ArrayInput.tsx index b0ad9adb..f416a101 100644 --- a/src/components/ArrayInput.tsx +++ b/src/components/ArrayInput.tsx @@ -194,7 +194,14 @@ export class ArrayInput extends React.Component {
{__(placeholder)}
)} -
+
1 + ? 'ArrayInput-toolbar--dnd' + : '' + )} + > {!Array.isArray(value) || !maxLength || value.length < maxLength ? (