From 07f525b9003c5e5dd433cfdf88cc870c449d50f1 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 29 Sep 2022 18:29:21 +0800 Subject: [PATCH] fix(nc-gui): cell styles --- packages/nc-gui/components/cell/Checkbox.vue | 4 ++-- packages/nc-gui/components/cell/Currency.vue | 2 +- packages/nc-gui/components/cell/DatePicker.vue | 2 +- packages/nc-gui/components/cell/DateTimePicker.vue | 2 +- packages/nc-gui/components/cell/Decimal.vue | 2 +- packages/nc-gui/components/cell/Duration.vue | 10 +++------- packages/nc-gui/components/cell/Email.vue | 2 +- packages/nc-gui/components/cell/MultiSelect.vue | 1 + packages/nc-gui/components/cell/Percent.vue | 9 +++++++-- packages/nc-gui/components/cell/Rating.vue | 8 +++++++- packages/nc-gui/components/cell/SingleSelect.vue | 3 ++- packages/nc-gui/components/cell/Text.vue | 1 + packages/nc-gui/components/cell/TextArea.vue | 3 ++- packages/nc-gui/components/cell/TimePicker.vue | 2 +- packages/nc-gui/components/cell/Url.vue | 8 +++++++- packages/nc-gui/components/cell/YearPicker.vue | 2 +- packages/nc-gui/components/smartsheet/Kanban.vue | 5 ++--- 17 files changed, 41 insertions(+), 25 deletions(-) diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index d0240a1a7a..2496368a70 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -48,14 +48,14 @@ function onClick() {
-
+
diff --git a/packages/nc-gui/components/cell/DatePicker.vue b/packages/nc-gui/components/cell/DatePicker.vue index 16ac154736..644dab08c0 100644 --- a/packages/nc-gui/components/cell/DatePicker.vue +++ b/packages/nc-gui/components/cell/DatePicker.vue @@ -62,7 +62,7 @@ const placeholder = computed(() => (isDateInvalid ? 'Invalid date' : '')) (el as HTMLInputElement)?.focus() v-if="editEnabled" :ref="focus" v-model="vModel" - class="outline-none p-0 border-none w-full h-full text-sm" + class="outline-none px-2 border-none w-full h-full text-sm" type="number" step="0.1" @blur="editEnabled = false" diff --git a/packages/nc-gui/components/cell/Duration.vue b/packages/nc-gui/components/cell/Duration.vue index 4d5846cc9d..50f8665a0d 100644 --- a/packages/nc-gui/components/cell/Duration.vue +++ b/packages/nc-gui/components/cell/Duration.vue @@ -75,6 +75,8 @@ const submitDuration = () => { v-if="editEnabled" ref="durationInput" v-model="localState" + class="w-full !border-none p-0" + :class="{ '!p-2': editEnabled }" :placeholder="durationPlaceholder" @blur="submitDuration" @keypress="checkDurationFormat($event)" @@ -91,14 +93,8 @@ const submitDuration = () => { diff --git a/packages/nc-gui/components/cell/Email.vue b/packages/nc-gui/components/cell/Email.vue index cd4a2ad50a..2ab60c42f6 100644 --- a/packages/nc-gui/components/cell/Email.vue +++ b/packages/nc-gui/components/cell/Email.vue @@ -24,7 +24,7 @@ const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus()