Browse Source

chore(nc-gui): suspend form

pull/4141/head
braks 2 years ago
parent
commit
c3ce940676
  1. 30
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

30
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -12,7 +12,6 @@ import {
createEventHook,
inject,
message,
onBeforeMount,
provide,
ref,
toRef,
@ -60,23 +59,21 @@ provide(MetaInj, meta)
const { commentsDrawer, changedColumns, state: rowState, isNew, loadRow } = useProvideExpandedFormStore(meta, row)
onBeforeMount(async () => {
if (props.loadRow) {
await loadRow()
}
if (props.loadRow) {
await loadRow()
}
if (props.rowId) {
try {
await loadRow(props.rowId)
} catch (e: any) {
if (e.response?.status === 404) {
// todo: i18n
message.error('Record not found')
router.replace({ query: {} })
} else throw e
}
if (props.rowId) {
try {
await loadRow(props.rowId)
} catch (e: any) {
if (e.response?.status === 404) {
// todo: i18n
message.error('Record not found')
router.replace({ query: {} })
} else throw e
}
})
}
useProvideSmartsheetStore(ref({}) as Ref<ViewType>, meta)
@ -139,7 +136,6 @@ export default {
width="min(90vw,1000px)"
:body-style="{ 'padding': 0, 'display': 'flex', 'flex-direction': 'column' }"
:closable="false"
destroy-on-close
class="nc-drawer-expanded-form"
>
<SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" />

Loading…
Cancel
Save