提交 dc15f466 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 a051b91e
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
{{#if item.psEditor.placeHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if item.psEditor.psNavigateContexts}} {{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}" localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}} {{/if}}
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
{{#if item.psEditor.psNavigateParams}} {{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}" localParam="{{item.psEditor.psNavigateParams}}"
{{/if}} {{/if}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="handleEditorEvent"
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
{{#if item.psEditor.psNavigateParams}} {{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}" localParam="{{item.psEditor.psNavigateParams}}"
{{/if}} {{/if}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if item.psEditor.psAppDEACMode.minorSortDir}} {{#if item.psEditor.psAppDEACMode.minorSortDir}}
sort="{{item.psEditor.psAppDEACMode.minorSortDir}}" sort="{{item.psEditor.psAppDEACMode.minorSortDir}}"
{{/if}} {{/if}}
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
{{#if item.psEditor.psNavigateParams}} {{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}" localParam="{{item.psEditor.psNavigateParams}}"
{{/if}} {{/if}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if item.psEditor.psAppDataEntity}} {{#if item.psEditor.psAppDataEntity}}
{{!-- {{#each item.psEditor.psAppDataEntity as | filed |}} --}} {{!-- {{#each item.psEditor.psAppDataEntity as | filed |}} --}}
{{!-- {{#if filed.majorField}} --}} {{!-- {{#if filed.majorField}} --}}
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
{{#eq item.psEditor.editorType "MDROPDOWNLIST"}} {{#eq item.psEditor.editorType "MDROPDOWNLIST"}}
:multiple="true" :multiple="true"
{{/eq}} {{/eq}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="handleEditorEvent"
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
{{#if item.psEditor.psNavigateParams}} {{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}" localParam="{{item.psEditor.psNavigateParams}}"
{{/if}} {{/if}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="handleEditorEvent"
......
...@@ -5,13 +5,11 @@ ...@@ -5,13 +5,11 @@
:contentType="{{item.psEditor.editorParams.contentType}}" :contentType="{{item.psEditor.editorParams.contentType}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.icon}} {{#if item.psEditor.editorParams.icon}}
icon="{{item.psEditor.editorParams.icon}}" iconClass="{{item.psEditor.editorParams.icon}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.caption}} {{#if item.psEditor.editorParams.caption}}
caption="{{item.psEditor.editorParams.caption}}" caption="{{item.psEditor.editorParams.caption}}"
{{/if}} {{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="handleEditorEvent"
......
...@@ -28,5 +28,5 @@ ...@@ -28,5 +28,5 @@
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
{{/eq}} {{/eq}}
:contextProp="state.context" :context="state.context"
:viewParamsProp="state.viewParams"/> :viewParams="state.viewParams"/>
<div class="ibiz-form-iframe" style="{{#if item.contentHeight}}height: {{item.contentHeight}}px;{{/if}}{{#if item.contentWidth}}width: {{item.contentWidth}}px{{/if}}">
<iframe src="{{item.iFrameUrl}}" style="height: 100%;width: 100%;border: 0"></iframe>
</div>
\ No newline at end of file
<a-tab-pane key="{{item.codeName}}" tab="{{item.caption}}"> <a-tab-pane key="{{item.codeName}}" tab="{{item.caption}}">
{{#eq item.psLayout.layout "FLEX"}} {{#eq item.psLayout.layout "FLEX"}}
<div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}"> <div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}">
...@@ -13,4 +12,4 @@ ...@@ -13,4 +12,4 @@
{{/each}} {{/each}}
</a-row> </a-row>
{{/eq}} {{/eq}}
</a-tab-pane> </a-tab-pane>
\ No newline at end of file
<IbizRaw
{{#if item.psSysCss}}class="{{item.psSysCss.cssName}}"{{/if}}
{{#if item.psSysImage}}{{#if item.psSysImage.cssClass}}iconClass="{{item.psSysImage.cssClass}}"{{/if}}{{#if item.psSysImage.imagePath}}imgPath="{{item.psSysImage.imagePath}}"{{/if}}{{/if}}
contentType="{{item.contentType}}"
style="{{#if item.rawItemHeight}}height: {{item.rawItemHeight}}px;{{/if}}{{#if item.rawItemWidth}}width: {{item.rawItemWidth}}px{{/if}}"
{{#if (eq item.contentType 'RAW')}}value="{{item.rawContent}}"{{else if (eq item.contentType 'HTML')}}:value="`{{item.htmlContent}}`"{{/if}}/>
<a-tab-pane key="{{item.codeName}}" tab="{{item.caption}}">
{{#eq item.psLayout.layout "FLEX"}}
<div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}">
{{#each item.psDEFormDetails as | formDetail |}}
{{>(lookup . 'formDetail.detailType') item=formDetail}}
{{/each}}
</div>
{{else}}
<a-row>
{{#each item.psDEFormDetails as | formDetail |}}
{{>(lookup . 'formDetail.detailType') item=formDetail}}
{{/each}}
</a-row>
{{/eq}}
</a-tab-pane>
{{#*inline "FORMPAGE"}}{{>@macro/form-detail/form-page.hbs}}{{/inline}} {{#*inline "FORMPAGE"}}{{>@macro/form-detail/form-page.hbs}}{{/inline}}
{{#*inline "GROUPPANEL"}}{{>@macro/form-detail/form-group.hbs}}{{/inline}} {{#*inline "GROUPPANEL"}}{{>@macro/form-detail/form-group-panel.hbs}}{{/inline}}
{{#*inline "FORMITEM"}}{{>@macro/form-detail/form-item.hbs}}{{/inline}} {{#*inline "FORMITEM"}}{{>@macro/form-detail/form-item.hbs}}{{/inline}}
{{#*inline "TABPANEL"}}{{>@macro/form-detail/form-tabpanel.hbs}}{{/inline}} {{#*inline "TABPANEL"}}{{>@macro/form-detail/form-tabpanel.hbs}}{{/inline}}
{{#*inline "BUTTON"}}{{>@macro/form-detail/form-button.hbs}}{{/inline}} {{#*inline "BUTTON"}}{{>@macro/form-detail/form-button.hbs}}{{/inline}}
{{#*inline "RAWITEM"}}{{>@macro/form-detail/form-rawitem.hbs}}{{/inline}}
{{#*inline "IFRAME"}}{{>@macro/form-detail/form-iframe.hbs}}{{/inline}}
{{#*inline "FORMPART"}}{{>@macro/form-detail/form-formpart.hbs}}{{/inline}}
{{#*inline "TABPAGE"}}{{>@macro/form-detail/form-tabpage.hbs}}{{/inline}}
{{#*inline "DRUIPART"}}{{>@macro/form-detail/form-druipart.hbs}}{{/inline}}
{{#*inline "FORMDETAILSMODEL"}}{{>@macro/form-detail/form-details-model.hbs}}{{/inline}} {{#*inline "FORMDETAILSMODEL"}}{{>@macro/form-detail/form-details-model.hbs}}{{/inline}}
\ No newline at end of file
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount, Ref, ref } from "vue"; import { onBeforeMount, Ref, ref } from "vue";
import { SearchOutlined } from '@ant-design/icons-vue'; import { SearchOutlined } from '@ant-design/icons-vue';
import { deepCopy, IParam, IActionParam, EditorBase } from "@ibiz-core"; import { deepCopy, IParam, IActionParam, EditorBase, IContext } from "@ibiz-core";
interface AutoCompleteProps { interface AutoCompleteProps {
/** /**
* @description 表单数据或表格行数据 * @description 表单数据或表格行数据
...@@ -25,12 +25,12 @@ interface AutoCompleteProps { ...@@ -25,12 +25,12 @@ interface AutoCompleteProps {
/** /**
* @description 上下文 * @description 上下文
*/ */
contextProp?: IParam; context?: IContext;
/** /**
* @description 视图参数 * @description 视图参数
*/ */
viewParamsProp?: IParam; viewParams?: IParam;
/** /**
* @description 局部上下文 * @description 局部上下文
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
import { import {
EditorBase, EditorBase,
IActionParam, IActionParam,
IParam IParam,
IContext
} from "@ibiz-core"; } from "@ibiz-core";
import { computed, onBeforeMount, ref, Ref } from "vue"; import { computed, onBeforeMount, ref, Ref } from "vue";
interface CheckboxListProps { interface CheckboxListProps {
...@@ -76,7 +77,7 @@ interface CheckboxListProps { ...@@ -76,7 +77,7 @@ interface CheckboxListProps {
* @type {*} * @type {*}
* @memberof AppCheckBox * @memberof AppCheckBox
*/ */
contextProp: IParam; context: IContext;
/** /**
* 视图参数 * 视图参数
...@@ -84,7 +85,7 @@ interface CheckboxListProps { ...@@ -84,7 +85,7 @@ interface CheckboxListProps {
* @type {*} * @type {*}
* @memberof AppCheckBox * @memberof AppCheckBox
*/ */
viewParamsProp: IParam; viewParams: IParam;
/** /**
* 局部上下文导航参数 * 局部上下文导航参数
......
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount, Ref, ref } from 'vue'; import { onBeforeMount, Ref, ref } from 'vue';
import { SearchOutlined, ExportOutlined } from '@ant-design/icons-vue'; import { SearchOutlined, ExportOutlined } from '@ant-design/icons-vue';
import { deepCopy, IParam, IActionParam, EditorBase } from '@ibiz-core'; import { deepCopy, IParam, IActionParam, EditorBase, IContext } from '@ibiz-core';
interface DataPickerProps { interface DataPickerProps {
/** /**
* @description 编辑器名称 * @description 编辑器名称
...@@ -31,27 +31,27 @@ interface DataPickerProps { ...@@ -31,27 +31,27 @@ interface DataPickerProps {
/** /**
* @description 表单数据或表格行数据 * @description 表单数据或表格行数据
*/ */
data?: any; data?: IParam;
/** /**
* @description 上下文 * @description 上下文
*/ */
contextProp?: any; context?: IContext;
/** /**
* @description 视图参数 * @description 视图参数
*/ */
viewParamsProp?: any; viewParams?: IParam;
/** /**
* @description 局部上下文 * @description 局部上下文
*/ */
localContext?: any; localContext?: IParam;
/** /**
* @description 局部视图参数 * @description 局部视图参数
*/ */
localParam?: any; localParam?: IParam;
/** /**
* @description 主信息属性 * @description 主信息属性
...@@ -66,17 +66,17 @@ interface DataPickerProps { ...@@ -66,17 +66,17 @@ interface DataPickerProps {
/** /**
* @description 选择视图 * @description 选择视图
*/ */
pickUpView?: any; pickUpView?: IParam;
/** /**
* @description 链接视图 * @description 链接视图
*/ */
linkView?: any; linkView?: IParam;
/** /**
* @description ac参数 * @description ac参数
*/ */
acParams?: any; acParams?: IParam;
/** /**
* @description 排序 * @description 排序
......
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount, Ref, ref } from 'vue'; import { onBeforeMount, Ref, ref } from 'vue';
import { SearchOutlined, ExportOutlined } from '@ant-design/icons-vue'; import { SearchOutlined, ExportOutlined } from '@ant-design/icons-vue';
import { deepCopy, IParam, IActionParam, EditorBase } from '@ibiz-core'; import { deepCopy, IParam, IActionParam, EditorBase, IContext } from '@ibiz-core';
interface DataPickerViewProps { interface DataPickerViewProps {
/** /**
* @description 编辑器名称 * @description 编辑器名称
...@@ -31,27 +31,27 @@ interface DataPickerViewProps { ...@@ -31,27 +31,27 @@ interface DataPickerViewProps {
/** /**
* @description 表单数据或表格行数据 * @description 表单数据或表格行数据
*/ */
data?: any; data?: IParam;
/** /**
* @description 上下文 * @description 上下文
*/ */
contextProp?: any; context?: IContext;
/** /**
* @description 视图参数 * @description 视图参数
*/ */
viewParamsProp?: any; viewParams?: IParam;
/** /**
* @description 局部上下文 * @description 局部上下文
*/ */
localContext?: any; localContext?: IParam;
/** /**
* @description 局部视图参数 * @description 局部视图参数
*/ */
localParam?: any; localParam?: IParam;
/** /**
* @description 主信息属性 * @description 主信息属性
...@@ -66,17 +66,17 @@ interface DataPickerViewProps { ...@@ -66,17 +66,17 @@ interface DataPickerViewProps {
/** /**
* @description 选择视图 * @description 选择视图
*/ */
pickUpView?: any; pickUpView?: IParam;
/** /**
* @description 链接视图 * @description 链接视图
*/ */
linkView?: any; linkView?: IParam;
/** /**
* @description ac参数 * @description ac参数
*/ */
acParams?: any; acParams?: IParam;
/** /**
* @description 排序 * @description 排序
......
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount, Ref, ref } from "vue"; import { onBeforeMount, Ref, ref } from "vue";
import { IActionParam, IParam, typeOf, EditorBase } from "@ibiz-core"; import { IActionParam, IParam, typeOf, EditorBase, IContext } from "@ibiz-core";
interface DropdownListProps { interface DropdownListProps {
/** /**
...@@ -31,12 +31,12 @@ interface DropdownListProps { ...@@ -31,12 +31,12 @@ interface DropdownListProps {
/** /**
* @description 上下文 * @description 上下文
*/ */
contextProp?: IParam; context?: IContext;
/** /**
* @description 视图参数 * @description 视图参数
*/ */
viewParamsProp?: IParam; viewParams?: IParam;
/** /**
* @description 局部上下文 * @description 局部上下文
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
import { import {
IActionParam, IActionParam,
IParam, IParam,
EditorBase EditorBase,
IContext
} from "@ibiz-core"; } from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue"; import { onBeforeMount, ref, Ref } from "vue";
interface RadioGroupProps { interface RadioGroupProps {
...@@ -52,7 +53,7 @@ interface RadioGroupProps { ...@@ -52,7 +53,7 @@ interface RadioGroupProps {
* @type {*} * @type {*}
* @memberof AppCheckBox * @memberof AppCheckBox
*/ */
contextProp: IParam; context: IContext;
/** /**
* 视图参数 * 视图参数
...@@ -60,7 +61,7 @@ interface RadioGroupProps { ...@@ -60,7 +61,7 @@ interface RadioGroupProps {
* @type {*} * @type {*}
* @memberof AppCheckBox * @memberof AppCheckBox
*/ */
viewParamsProp: IParam; viewParams: IParam;
/** /**
* 局部上下文导航参数 * 局部上下文导航参数
......
<script setup lang="ts"> <script setup lang="ts">
import { EditorBase, IActionParam } from "@ibiz-core"; import { IActionParam } from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue";
interface RawProps { interface RawProps {
/** /**
* @description 编辑器名称 * @description 编辑器名称
...@@ -18,28 +17,17 @@ interface RawProps { ...@@ -18,28 +17,17 @@ interface RawProps {
contentType: "RAW" | "HTML" | "IMAGE" | "MARKDOWN"; contentType: "RAW" | "HTML" | "IMAGE" | "MARKDOWN";
/** /**
* @description 上下文 * @description 输入框类型
*/
contextProp?: any;
/**
* @description 视图参数
*/ */
viewParamsProp?: any; iconClass?: string;
/** /**
* 图标 * @description 输入框类型
*
* @type {string}
* @memberof AppRawItem
*/ */
icon?: string; imgPath?: string;
/** /**
* 标题 * @description 标题
*
* @type {string}
* @memberof AppRawItem
*/ */
caption?: string; caption?: string;
} }
...@@ -52,51 +40,22 @@ const props = withDefaults(defineProps<RawProps>(), { ...@@ -52,51 +40,22 @@ const props = withDefaults(defineProps<RawProps>(), {
contentType: "RAW", contentType: "RAW",
}); });
const emit = defineEmits<EditorEmit>(); const emit = defineEmits<EditorEmit>();
const { handleEditorNavParams } = new EditorBase();
const content: Ref<string> = ref("");
const { navContext, navViewParam } = handleEditorNavParams(props);
const initContent = () => {
const data = navContext;
if (props.value) {
const items = props.value.match(/\{{(.+?)\}}/g);
if (items) {
items.forEach((item: string) => {
content.value = props.value.replace(
/\{{(.+?)\}}/,
eval(item.substring(2, item.length - 2))
);
});
}
content.value = props.value.replaceAll("&lt;", "<");
content.value = props.value.replaceAll("&gt;", ">");
content.value = props.value.replaceAll("&amp;nbsp;", " ");
content.value = props.value.replaceAll("&nbsp;", " ");
}
return content;
};
onBeforeMount(() => {
initContent();
});
</script> </script>
<template> <template>
<div :class="['app-editor-container', `app-raw-${name}`]"> <div :class="['ibiz-raw-item', `ibiz-raw-item--${contentType.toLowerCase()}`]">
<div class="raw-caption" v-if="caption">\{{ caption }}</div> <div class="raw-caption" v-if="caption">\{{ caption }}</div>
<div v-if="Object.is(contentType, 'RAW')"> <div v-if="Object.is(contentType, 'RAW')">
\{{ content }} \{{ value }}
</div> </div>
<div v-else-if="Object.is(contentType, 'HTML')" v-html="content" /> <div v-else-if="Object.is(contentType, 'HTML')" v-html="value" />
<div v-else-if="Object.is(contentType, 'IMAGE')"> <div v-else-if="Object.is(contentType, 'IMAGE')">
<img v-if="value" :src="value" /> <IbizIconText :iconClass="iconClass" :imgPath="imgPath"/>
<a-icon v-else :type="icon || ''" />
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.app-editor-container {
text-align: left;
}
</style> </style>
<script setup lang="ts"> <script setup lang="ts">
import { IParam, EditorBase } from "@ibiz-core"; import { IParam, EditorBase, IContext } from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue"; import { onBeforeMount, ref, Ref } from "vue";
interface SpanProps { interface SpanProps {
/** /**
...@@ -71,12 +71,12 @@ interface SpanProps { ...@@ -71,12 +71,12 @@ interface SpanProps {
/** /**
* @description 上下文 * @description 上下文
*/ */
contextProp?: IParam; context?: IContext;
/** /**
* @description 视图参数 * @description 视图参数
*/ */
viewParamsProp?: IParam; viewParams?: IParam;
/** /**
* @description 局部上下文 * @description 局部上下文
......
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs' import { Subject } from 'rxjs'
import { Ref } from 'vue'; import { Ref } from 'vue';
import { IndexView, IActionParam, IParam } from '@ibiz-core'; import { IndexView, IActionParam, IParam, IContext } from '@ibiz-core';
import { ViewConfig } from './{{spinalCase page.codeName}}-config'; import { ViewConfig } from './{{spinalCase page.codeName}}-config';
{{#page.ctrls}} {{#page.ctrls}}
{{#eq controlType "APPMENU"}} {{#eq controlType "APPMENU"}}
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
MenuFoldOutlined MenuFoldOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
interface Props { interface Props {
context: IParam; context: IContext;
viewParams?: IParam; viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED"; openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>; viewSubject?: Subject<IActionParam>;
......
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { EditView, IActionParam, IParam } from '@ibiz-core'; import { EditView, IActionParam, IParam, IContext } from '@ibiz-core';
import { ViewConfig } from './{{spinalCase page.codeName}}-config'; import { ViewConfig } from './{{spinalCase page.codeName}}-config';
{{#page.ctrls}} {{#page.ctrls}}
{{#eq controlType "FORM"}} {{#eq controlType "FORM"}}
...@@ -10,7 +10,7 @@ import { {{codeName}}Form } from '@widgets/{{spinalCase appEntity.codeName}}/{{s ...@@ -10,7 +10,7 @@ import { {{codeName}}Form } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理 // props声明和默认值处理
interface Props { interface Props {
context: IParam; context: IContext;
viewParams?: IParam; viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED"; openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>; viewSubject?: Subject<IActionParam>;
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(props); const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(props, emit);
</script> </script>
......
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { GridView, IActionParam, IParam } from '@ibiz-core'; import { GridView, IActionParam, IParam, IContext } from '@ibiz-core';
import { ViewConfig } from './{{spinalCase page.codeName}}-config'; import { ViewConfig } from './{{spinalCase page.codeName}}-config';
{{#page.ctrls}} {{#page.ctrls}}
{{#eq controlType "GRID"}} {{#eq controlType "GRID"}}
...@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s ...@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理 // props声明和默认值处理
interface Props { interface Props {
context: IParam; context: IContext;
viewParams?: IParam; viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED"; openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>; viewSubject?: Subject<IActionParam>;
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props); const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props, emit);
</script> </script>
......
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { PickupGridView, IActionParam, IParam } from '@ibiz-core'; import { PickupGridView, IActionParam, IParam, IContext } from '@ibiz-core';
import { ViewConfig } from './{{spinalCase page.codeName}}-config'; import { ViewConfig } from './{{spinalCase page.codeName}}-config';
{{#page.ctrls}} {{#page.ctrls}}
{{#eq controlType "GRID"}} {{#eq controlType "GRID"}}
...@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s ...@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理 // props声明和默认值处理
interface Props { interface Props {
context: IParam; context: IContext;
viewParams?: IParam; viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED"; openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>; viewSubject?: Subject<IActionParam>;
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state } = new PickupGridView(ViewConfig).moduleInstall(props); const { state } = new PickupGridView(ViewConfig).moduleInstall(props, emit);
</script> </script>
<template> <template>
......
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { PickupView, IActionParam, IParam } from '@ibiz-core'; import { PickupView, IActionParam, IParam, IContext } from '@ibiz-core';
import { ViewConfig } from './{{spinalCase page.codeName}}-config'; import { ViewConfig } from './{{spinalCase page.codeName}}-config';
// props声明和默认值处理 // props声明和默认值处理
interface Props { interface Props {
context: IParam; context: IContext;
viewParams?: IParam; viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED"; openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>; viewSubject?: Subject<IActionParam>;
...@@ -24,7 +24,7 @@ interface ViewEmit { ...@@ -24,7 +24,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state } = new PickupView(ViewConfig).moduleInstall(props); const { state } = new PickupView(ViewConfig).moduleInstall(props, emit);
</script> </script>
<template> <template>
......
...@@ -25,7 +25,7 @@ interface CtrlEmit { ...@@ -25,7 +25,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(props); const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(props, emit);
</script> </script>
<template> <template>
......
...@@ -31,7 +31,7 @@ interface CtrlEmit { ...@@ -31,7 +31,7 @@ interface CtrlEmit {
const emit = defineEmits < CtrlEmit > (); const emit = defineEmits < CtrlEmit > ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, inited, viewdata, viewparam } = new PickupViewPanelControl(CtrlConfig).moduleInstall(props); const { state, inited, viewdata, viewparam } = new PickupViewPanelControl(CtrlConfig).moduleInstall(props, emit);
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册