diff --git a/packages/nc-gui/components/account/Profile.vue b/packages/nc-gui/components/account/Profile.vue index 30fbc61c7d..8aeaed23a5 100644 --- a/packages/nc-gui/components/account/Profile.vue +++ b/packages/nc-gui/components/account/Profile.vue @@ -94,7 +94,7 @@ const onValidate = async (_: any, valid: boolean) => { diff --git a/packages/nc-gui/components/account/Token.vue b/packages/nc-gui/components/account/Token.vue index 9c3d612fb0..70ede150e8 100644 --- a/packages/nc-gui/components/account/Token.vue +++ b/packages/nc-gui/components/account/Token.vue @@ -312,17 +312,17 @@ const handleCancel = () => { class="flex pl-5 py-3 justify-between token items-center border-l-1 border-r-1 border-b-1" > - + {{ el.description }} - + {{ el.created_by }} - + {{ el.token }} ************************************ diff --git a/packages/nc-gui/components/account/UserList.vue b/packages/nc-gui/components/account/UserList.vue index 410e23e820..87458a8467 100644 --- a/packages/nc-gui/components/account/UserList.vue +++ b/packages/nc-gui/components/account/UserList.vue @@ -239,11 +239,11 @@ const openDeleteModal = (user: UserType) => { - + {{ el.display_name }} - + {{ el.email }} diff --git a/packages/nc-gui/components/account/UserMenu.vue b/packages/nc-gui/components/account/UserMenu.vue index f125eeae3b..7fb5e180aa 100644 --- a/packages/nc-gui/components/account/UserMenu.vue +++ b/packages/nc-gui/components/account/UserMenu.vue @@ -4,7 +4,7 @@ import type { UsersSortType } from '~/lib' const { field, direction, handleUserSort } = defineProps<{ field: UsersSortType['field'] - direction: UsersSortType['direction'] + direction?: UsersSortType['direction'] handleUserSort: Function }>() diff --git a/packages/nc-gui/components/cell/Rating.vue b/packages/nc-gui/components/cell/Rating.vue index 8d4553b081..fdba44d773 100644 --- a/packages/nc-gui/components/cell/Rating.vue +++ b/packages/nc-gui/components/cell/Rating.vue @@ -37,7 +37,7 @@ const ratingMeta = computed(() => { }) const vModel = computed({ - get: () => modelValue ?? NaN, + get: () => Number(modelValue), set: (val) => emits('update:modelValue', val), }) diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue index 1d1a6930f8..0242136ce5 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue @@ -2,10 +2,15 @@ import type { BaseType } from 'nocodb-sdk' import { ProjectInj, ProjectRoleInj } from '#imports' -const props = defineProps<{ - baseRole: string | string[] - base: BaseType -}>() +const props = withDefaults( + defineProps<{ + baseRole: string | string[] + base: BaseType + }>(), + { + baseRole: '', + }, +) const baseRole = toRef(props, 'baseRole') const base = toRef(props, 'base') diff --git a/packages/nc-gui/components/monaco/Editor.vue b/packages/nc-gui/components/monaco/Editor.vue index 706f700e9a..63203a7149 100644 --- a/packages/nc-gui/components/monaco/Editor.vue +++ b/packages/nc-gui/components/monaco/Editor.vue @@ -16,26 +16,29 @@ interface Props { } const props = withDefaults(defineProps(), { + modelValue: '', lang: 'json', validate: true, disableDeepCompare: false, autoFocus: true, }) -const emits = defineEmits(['update:modelValue']) +const { modelValue } = toRefs(props) + +const { hideMinimap, lang, validate, disableDeepCompare, readOnly, autoFocus } = props -const { hideMinimap, lang, validate, disableDeepCompare, modelValue, readOnly, autoFocus } = props +const emits = defineEmits(['update:modelValue']) const vModel = computed({ get: () => { - if (typeof modelValue === 'object') { - return JSON.stringify(modelValue, null, 2) + if (typeof modelValue.value === 'object') { + return JSON.stringify(modelValue.value, null, 2) } else { - return modelValue + return modelValue.value ?? '' } }, set: (newVal: string | Record) => { - if (typeof modelValue === 'object') { + if (typeof modelValue.value === 'object') { try { emits('update:modelValue', typeof newVal === 'object' ? newVal : JSON.parse(newVal)) } catch (e) { diff --git a/packages/nc-gui/components/nc/Switch.vue b/packages/nc-gui/components/nc/Switch.vue index 7551b87b83..f5d9af077e 100644 --- a/packages/nc-gui/components/nc/Switch.vue +++ b/packages/nc-gui/components/nc/Switch.vue @@ -1,5 +1,7 @@