diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenComponentIndexScript.tpl b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenComponentIndexScript.tpl new file mode 100644 index 000000000..407093515 --- /dev/null +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenComponentIndexScript.tpl @@ -0,0 +1,13 @@ + + <{{ model.table_name }} /> + + + diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModalViewScript.tpl b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModalViewScript.tpl new file mode 100644 index 000000000..8e586edae --- /dev/null +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModalViewScript.tpl @@ -0,0 +1,79 @@ + + + + + + + diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModelDataScript.tpl b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModelDataScript.tpl new file mode 100644 index 000000000..b3d633c01 --- /dev/null +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenModelDataScript.tpl @@ -0,0 +1,40 @@ +import { useLocalization } from '/@/hooks/abp/useLocalization'; +import { FormProps, FormSchema } from '/@/components/Form'; + +const { L } = useLocalization(['{{model.remote_service}}', 'AbpUi']); +{{ if model.exists_search_models }} +export function getSearchFormProps(): Partial { + return { + labelWidth: 100, + schemas: [ + {{~ for searchModel in model.search_models ~}} + { + field: '{{ searchModel.name }}', + component: '{{ searchModel.component }}', + label: L('{{ searchModel.display_name }}'), + colProps: {{ searchModel.col_props }}, + }, + {{~ end ~}} + ], + }; +} +{{ end }} +export function getModalFormSchemas(): FormSchema[] { + return [ + {{~ for inputModel in model.input_models ~}} + { + field: '{{ inputModel.name }}', + component: '{{ inputModel.component }}', + label: L('{{ inputModel.display_name }}'), + {{~ if !inputModel.show ~}} + show: false, + {{~ end ~}} + {{~ if inputModel.disabled ~}} + dynamicDisabled: true, + {{~ end ~}} + colProps: {{ inputModel.col_props }}, + componentProps: {{ inputModel.component_props }}, + }, + {{~ end ~}} + ]; +} diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableDataScript.tpl b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableDataScript.tpl new file mode 100644 index 000000000..ff0918936 --- /dev/null +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableDataScript.tpl @@ -0,0 +1,28 @@ +import { useLocalization } from '/@/hooks/abp/useLocalization'; +import { BasicColumn } from '/@/components/Table'; +import { formatToDateTime } from '/@/utils/dateUtil'; + +const { L } = useLocalization(['{{model.remote_service}}', 'AbpUi']); + +export function getDataColumns(): BasicColumn[] { + return [ + {{~ for ouputModel in model.ouput_models ~}} + { + title: L('{{ ouputModel.display_name }}'), + dataIndex: '{{ ouputModel.name }}', + align: '{{ ouputModel.align }}', + width: {{ ouputModel.width }}, + sorter: {{ ouputModel.sorter }}, + resizable: {{ ouputModel.resizable }}, + {{~ if !ouputModel.show ~}} + ifShow: false, + {{~ end ~}} + {{~ if ouputModel.has_date ~}} + format: (text) => { + return text ? formatToDateTime(text) : text; + }, + {{~ end ~}} + }, + {{~ end ~}} + ]; +} diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableViewScript.tpl b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableViewScript.tpl new file mode 100644 index 000000000..f7a80297e --- /dev/null +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/UI/Vben/Templates/VbenTableViewScript.tpl @@ -0,0 +1,141 @@ + + + + + {{~ if model.has_create ~}} + + {%{ {{ L('}%}{{ model.application }}{%{:AddNew') }} }%} + + {{~ end ~}} + + + + + + + + {{~ if model.has_create || model.has_update ~}} + <{{model.modal_name}} @register="registerModal" @change="reload" /> + {{~ end ~}} + + + +