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

update:更新

上级 a051b91e
......@@ -7,8 +7,8 @@
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
......
......@@ -18,8 +18,8 @@
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent"
......
......@@ -16,8 +16,8 @@
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if item.psEditor.psAppDEACMode.minorSortDir}}
sort="{{item.psEditor.psAppDEACMode.minorSortDir}}"
{{/if}}
......
......@@ -16,8 +16,8 @@
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if item.psEditor.psAppDataEntity}}
{{!-- {{#each item.psEditor.psAppDataEntity as | filed |}} --}}
{{!-- {{#if filed.majorField}} --}}
......
......@@ -24,8 +24,8 @@
{{#eq item.psEditor.editorType "MDROPDOWNLIST"}}
:multiple="true"
{{/eq}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent"
......
......@@ -18,8 +18,8 @@
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
:context="state.context"
:viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent"
......
......@@ -5,13 +5,11 @@
:contentType="{{item.psEditor.editorParams.contentType}}"
{{/if}}
{{#if item.psEditor.editorParams.icon}}
icon="{{item.psEditor.editorParams.icon}}"
iconClass="{{item.psEditor.editorParams.icon}}"
{{/if}}
{{#if item.psEditor.editorParams.caption}}
caption="{{item.psEditor.editorParams.caption}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent"
......
......@@ -28,5 +28,5 @@
{{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}"
{{/eq}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"/>
:context="state.context"
: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}}">
{{#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}}">
......@@ -13,4 +12,4 @@
{{/each}}
</a-row>
{{/eq}}
</a-tab-pane>
\ No newline at end of file
</a-tab-pane>
<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 "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 "TABPANEL"}}{{>@macro/form-detail/form-tabpanel.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}}
\ No newline at end of file
<script setup lang="ts">
import { onBeforeMount, Ref, ref } from "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 {
/**
* @description 表单数据或表格行数据
......@@ -25,12 +25,12 @@ interface AutoCompleteProps {
/**
* @description 上下文
*/
contextProp?: IParam;
context?: IContext;
/**
* @description 视图参数
*/
viewParamsProp?: IParam;
viewParams?: IParam;
/**
* @description 局部上下文
......
......@@ -2,7 +2,8 @@
import {
EditorBase,
IActionParam,
IParam
IParam,
IContext
} from "@ibiz-core";
import { computed, onBeforeMount, ref, Ref } from "vue";
interface CheckboxListProps {
......@@ -76,7 +77,7 @@ interface CheckboxListProps {
* @type {*}
* @memberof AppCheckBox
*/
contextProp: IParam;
context: IContext;
/**
* 视图参数
......@@ -84,7 +85,7 @@ interface CheckboxListProps {
* @type {*}
* @memberof AppCheckBox
*/
viewParamsProp: IParam;
viewParams: IParam;
/**
* 局部上下文导航参数
......
<script setup lang="ts">
import { onBeforeMount, Ref, ref } from '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 {
/**
* @description 编辑器名称
......@@ -31,27 +31,27 @@ interface DataPickerProps {
/**
* @description 表单数据或表格行数据
*/
data?: any;
data?: IParam;
/**
* @description 上下文
*/
contextProp?: any;
context?: IContext;
/**
* @description 视图参数
*/
viewParamsProp?: any;
viewParams?: IParam;
/**
* @description 局部上下文
*/
localContext?: any;
localContext?: IParam;
/**
* @description 局部视图参数
*/
localParam?: any;
localParam?: IParam;
/**
* @description 主信息属性
......@@ -66,17 +66,17 @@ interface DataPickerProps {
/**
* @description 选择视图
*/
pickUpView?: any;
pickUpView?: IParam;
/**
* @description 链接视图
*/
linkView?: any;
linkView?: IParam;
/**
* @description ac参数
*/
acParams?: any;
acParams?: IParam;
/**
* @description 排序
......
<script setup lang="ts">
import { onBeforeMount, Ref, ref } from '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 {
/**
* @description 编辑器名称
......@@ -31,27 +31,27 @@ interface DataPickerViewProps {
/**
* @description 表单数据或表格行数据
*/
data?: any;
data?: IParam;
/**
* @description 上下文
*/
contextProp?: any;
context?: IContext;
/**
* @description 视图参数
*/
viewParamsProp?: any;
viewParams?: IParam;
/**
* @description 局部上下文
*/
localContext?: any;
localContext?: IParam;
/**
* @description 局部视图参数
*/
localParam?: any;
localParam?: IParam;
/**
* @description 主信息属性
......@@ -66,17 +66,17 @@ interface DataPickerViewProps {
/**
* @description 选择视图
*/
pickUpView?: any;
pickUpView?: IParam;
/**
* @description 链接视图
*/
linkView?: any;
linkView?: IParam;
/**
* @description ac参数
*/
acParams?: any;
acParams?: IParam;
/**
* @description 排序
......
<script setup lang="ts">
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 {
/**
......@@ -31,12 +31,12 @@ interface DropdownListProps {
/**
* @description 上下文
*/
contextProp?: IParam;
context?: IContext;
/**
* @description 视图参数
*/
viewParamsProp?: IParam;
viewParams?: IParam;
/**
* @description 局部上下文
......
......@@ -2,7 +2,8 @@
import {
IActionParam,
IParam,
EditorBase
EditorBase,
IContext
} from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue";
interface RadioGroupProps {
......@@ -52,7 +53,7 @@ interface RadioGroupProps {
* @type {*}
* @memberof AppCheckBox
*/
contextProp: IParam;
context: IContext;
/**
* 视图参数
......@@ -60,7 +61,7 @@ interface RadioGroupProps {
* @type {*}
* @memberof AppCheckBox
*/
viewParamsProp: IParam;
viewParams: IParam;
/**
* 局部上下文导航参数
......
<script setup lang="ts">
import { EditorBase, IActionParam } from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue";
import { IActionParam } from "@ibiz-core";
interface RawProps {
/**
* @description 编辑器名称
......@@ -18,28 +17,17 @@ interface RawProps {
contentType: "RAW" | "HTML" | "IMAGE" | "MARKDOWN";
/**
* @description 上下文
*/
contextProp?: any;
/**
* @description 视图参数
* @description 输入框类型
*/
viewParamsProp?: any;
iconClass?: string;
/**
* 图标
*
* @type {string}
* @memberof AppRawItem
* @description 输入框类型
*/
icon?: string;
imgPath?: string;
/**
* 标题
*
* @type {string}
* @memberof AppRawItem
* @description 标题
*/
caption?: string;
}
......@@ -52,51 +40,22 @@ const props = withDefaults(defineProps<RawProps>(), {
contentType: "RAW",
});
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>
<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 v-if="Object.is(contentType, 'RAW')">
\{{ content }}
\{{ value }}
</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')">
<img v-if="value" :src="value" />
<a-icon v-else :type="icon || ''" />
<IbizIconText :iconClass="iconClass" :imgPath="imgPath"/>
</div>
</div>
</template>
<style scoped>
.app-editor-container {
text-align: left;
}
</style>
<script setup lang="ts">
import { IParam, EditorBase } from "@ibiz-core";
import { IParam, EditorBase, IContext } from "@ibiz-core";
import { onBeforeMount, ref, Ref } from "vue";
interface SpanProps {
/**
......@@ -71,12 +71,12 @@ interface SpanProps {
/**
* @description 上下文
*/
contextProp?: IParam;
context?: IContext;
/**
* @description 视图参数
*/
viewParamsProp?: IParam;
viewParams?: IParam;
/**
* @description 局部上下文
......
<script setup lang="ts">
import { Subject } from 'rxjs'
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';
{{#page.ctrls}}
{{#eq controlType "APPMENU"}}
......@@ -13,7 +13,7 @@ import {
MenuFoldOutlined
} from '@ant-design/icons-vue';
interface Props {
context: IParam;
context: IContext;
viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>;
......
<script setup lang="ts">
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';
{{#page.ctrls}}
{{#eq controlType "FORM"}}
......@@ -10,7 +10,7 @@ import { {{codeName}}Form } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理
interface Props {
context: IParam;
context: IContext;
viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>;
......@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(props);
const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(props, emit);
</script>
......
<script setup lang="ts">
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';
{{#page.ctrls}}
{{#eq controlType "GRID"}}
......@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理
interface Props {
context: IParam;
context: IContext;
viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>;
......@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props);
const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props, emit);
</script>
......
<script setup lang="ts">
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';
{{#page.ctrls}}
{{#eq controlType "GRID"}}
......@@ -10,7 +10,7 @@ import { {{codeName}}Grid } from '@widgets/{{spinalCase appEntity.codeName}}/{{s
// props声明和默认值处理
interface Props {
context: IParam;
context: IContext;
viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>;
......@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const { state } = new PickupGridView(ViewConfig).moduleInstall(props);
const { state } = new PickupGridView(ViewConfig).moduleInstall(props, emit);
</script>
<template>
......
<script setup lang="ts">
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';
// props声明和默认值处理
interface Props {
context: IParam;
context: IContext;
viewParams?: IParam;
openType?: "ROUTE" | "MODAL" | "EMBED";
viewSubject?: Subject<IActionParam>;
......@@ -24,7 +24,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const { state } = new PickupView(ViewConfig).moduleInstall(props);
const { state } = new PickupView(ViewConfig).moduleInstall(props, emit);
</script>
<template>
......
......@@ -25,7 +25,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(props);
const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(props, emit);
</script>
<template>
......
......@@ -31,7 +31,7 @@ interface 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>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册