From 38a19bf6efa403ee8b38b6f4bff1f06012ada231 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Sun, 6 Oct 2024 18:20:13 +0800 Subject: [PATCH] Add support for AutoViewForm --- src/components/AutoQueryGrid.vue | 4 + src/components/AutoViewForm.vue | 127 +++++++++++++++++++++++++++++++ src/components/MarkupFormat.vue | 34 +++++++++ src/components/MarkupModel.vue | 41 ++++++++++ src/components/index.ts | 6 ++ src/use/metadata.ts | 1 + 6 files changed, 213 insertions(+) create mode 100644 src/components/AutoViewForm.vue create mode 100644 src/components/MarkupFormat.vue create mode 100644 src/components/MarkupModel.vue diff --git a/src/components/AutoQueryGrid.vue b/src/components/AutoQueryGrid.vue index 54d4912..90cce56 100644 --- a/src/components/AutoQueryGrid.vue +++ b/src/components/AutoQueryGrid.vue @@ -32,6 +32,10 @@ +
+ + +
diff --git a/src/components/AutoViewForm.vue b/src/components/AutoViewForm.vue new file mode 100644 index 0000000..27e17e1 --- /dev/null +++ b/src/components/AutoViewForm.vue @@ -0,0 +1,127 @@ + + + \ No newline at end of file diff --git a/src/components/MarkupFormat.vue b/src/components/MarkupFormat.vue new file mode 100644 index 0000000..d020efe --- /dev/null +++ b/src/components/MarkupFormat.vue @@ -0,0 +1,34 @@ + + diff --git a/src/components/MarkupModel.vue b/src/components/MarkupModel.vue new file mode 100644 index 0000000..1666527 --- /dev/null +++ b/src/components/MarkupModel.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/components/index.ts b/src/components/index.ts index 312c355..3b29e1c 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -38,6 +38,7 @@ import AutoFormFields from './AutoFormFields.vue' import AutoForm from './AutoForm.vue' import AutoCreateForm from './AutoCreateForm.vue' import AutoEditForm from './AutoEditForm.vue' +import AutoViewForm from './AutoViewForm.vue' import ConfirmDelete from './ConfirmDelete.vue' import FormLoading from './FormLoading.vue' @@ -45,6 +46,8 @@ import DataGrid from './DataGrid.vue' import CellFormat from './CellFormat.vue' import PreviewFormat from './PreviewFormat.vue' import HtmlFormat from './HtmlFormat.vue' +import MarkupFormat from './MarkupFormat.vue' +import MarkupModel from './MarkupModel.vue' import CloseButton from './CloseButton.vue' import SlideOver from './SlideOver.vue' @@ -98,6 +101,7 @@ export default { AutoForm, AutoCreateForm, AutoEditForm, + AutoViewForm, ConfirmDelete, FormLoading, @@ -105,6 +109,8 @@ export default { CellFormat, PreviewFormat, HtmlFormat, + MarkupFormat, + MarkupModel, CloseButton, SlideOver, diff --git a/src/use/metadata.ts b/src/use/metadata.ts index a384ded..03134e4 100644 --- a/src/use/metadata.ts +++ b/src/use/metadata.ts @@ -92,6 +92,7 @@ export class Apis implements AutoQueryApis get AnyQuery() { return this.Query || this.QueryInto } get AnyUpdate() { return this.Patch || this.Update } + get dataModel() { return this.AnyQuery?.dataModel } toArray() { let to = [this.Query, this.QueryInto, this.Create, this.Update, this.Patch, this.Delete]