diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index fd8de40185..5510e0d149 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -48,6 +48,8 @@ const formState = reactive({}) const secondsRemain = ref(0) +const isLocked = inject(IsLockedInj, ref(false)) + const isEditable = isUIAllowed('viewFieldEdit' as Permission) const meta = inject(MetaInj, ref()) @@ -347,6 +349,8 @@ watch(submitted, (v) => { }) function handleMouseUp(col: Record, hiddenColIndex: number) { + if (isLocked.value) return + if (!moved.value) { const index = localColumns.value.length col.order = (index ? localColumns.value[index - 1].order : 0) + 1 @@ -378,6 +382,12 @@ watch(view, (nextView) => { reloadEventHook.trigger() } }) + +const onFormItemClick = (element: any) => { + if (isLocked.value) return + + activeRow.value = element.title +} -