diff --git a/packages/nc-gui-v2/components/monaco/Editor.vue b/packages/nc-gui-v2/components/monaco/Editor.vue index ac8c0c0641..3554066068 100644 --- a/packages/nc-gui-v2/components/monaco/Editor.vue +++ b/packages/nc-gui-v2/components/monaco/Editor.vue @@ -12,9 +12,10 @@ interface Props { lang?: string validate?: boolean disableDeepCompare?: boolean + readOnly?: boolean } -const { hideMinimap, lang = 'json', validate = true, disableDeepCompare = false, modelValue } = defineProps() +const { hideMinimap, lang = 'json', validate = true, disableDeepCompare = false, modelValue, readOnly } = defineProps() const emits = defineEmits(['update:modelValue']) @@ -92,6 +93,7 @@ onMounted(() => { }, tabSize: 2, automaticLayout: true, + readOnly, minimap: { enabled: !hideMinimap, }, diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/MenuBottom.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/MenuBottom.vue index 477ee96354..d7e1058a09 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/MenuBottom.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/MenuBottom.vue @@ -12,9 +12,11 @@ const emits = defineEmits() const { $e } = useNuxtApp() const isView = ref(false) +let showApiSnippet = $ref(false) function onApiSnippet() { // get API snippet + showApiSnippet = true $e('a:view:api-snippet') } @@ -89,6 +91,7 @@ function onOpenModal(type: ViewTypes, title = '') { +