diff --git a/packages/nc-gui/components/cell/TextArea.vue b/packages/nc-gui/components/cell/TextArea.vue index bec6ea61e4..4d56b2c2a4 100644 --- a/packages/nc-gui/components/cell/TextArea.vue +++ b/packages/nc-gui/components/cell/TextArea.vue @@ -10,6 +10,7 @@ import { iconMap, inject, useVModel, + ReadonlyInj } from '#imports' const props = defineProps<{ @@ -47,6 +48,8 @@ const inputRef = ref(null) const active = inject(ActiveCellInj, ref(false)) +const readOnly = inject(ReadonlyInj) + watch(isVisible, () => { if (isVisible.value) { setTimeout(() => { @@ -133,11 +136,12 @@ onClickOutside(inputWrapperRef, (e) => { ref="inputRef" v-model:value="vModel" placeholder="Enter text" - class="p-1 !pt-1 !pr-3 !border-0 !border-r-0 !focus:outline-transparent nc-scrollbar-md" + class="p-1 !pt-1 !pr-3 !border-0 !border-r-0 !focus:outline-transparent nc-scrollbar-md !text-black" :bordered="false" :auto-size="{ minRows: 20, maxRows: 20 }" @keydown.stop @keydown.escape="isVisible = false" + :disabled="readOnly" /> diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vue index 7006c573f4..9a71313a8a 100644 --- a/packages/nc-gui/components/smartsheet/Cell.vue +++ b/packages/nc-gui/components/smartsheet/Cell.vue @@ -249,7 +249,7 @@ onUnmounted(() => {