diff --git a/src/common/rawitem/rawitem.tsx b/src/common/rawitem/rawitem.tsx index 469ac23ba8cfa1e6c442377ce9bc49dac91fc1fe..170af5d9d8449e768e2064dcccc87a5187f5d429 100644 --- a/src/common/rawitem/rawitem.tsx +++ b/src/common/rawitem/rawitem.tsx @@ -118,6 +118,7 @@ export const IBizRawItem = defineComponent({ 'HEADING6', 'PARAGRAPH', 'HTML', + 'RAW', ].includes(rawItemType.value) ) { rawItemText.value = rawItemContent.value; @@ -216,7 +217,7 @@ export const IBizRawItem = defineComponent({ > ); } - if (this.rawItemType === 'TEXT') { + if (this.rawItemType === 'TEXT' || this.rawItemType === 'RAW') { return {this.rawItemText}; } if (this.rawItemType === 'HEADING1') { diff --git a/src/control/tab-exp-panel/tab-exp-panel.scss b/src/control/tab-exp-panel/tab-exp-panel.scss new file mode 100644 index 0000000000000000000000000000000000000000..6869a0b3561a58b7bd4428b8e7df6a900d95b90d --- /dev/null +++ b/src/control/tab-exp-panel/tab-exp-panel.scss @@ -0,0 +1,10 @@ +@include b(control-tabexppanel-tab-item-header) { + padding: rem(8px) rem(16px); + overflow: hidden; + font-size: getCssVar(font-size, regular); + line-height: var(--van-cell-line-height); + color: getCssVar(color, text, 2); + text-overflow: ellipsis; + white-space: nowrap; + background: getCssVar(color, bg, 0); +} \ No newline at end of file diff --git a/src/control/tab-exp-panel/tab-exp-panel.tsx b/src/control/tab-exp-panel/tab-exp-panel.tsx index 0be4a4a6600a39080792258c18ac634ab9d5bcfb..133cf008681f4b47a6a86564dedc7adc98d45f54 100644 --- a/src/control/tab-exp-panel/tab-exp-panel.tsx +++ b/src/control/tab-exp-panel/tab-exp-panel.tsx @@ -1,10 +1,15 @@ import { useControlController, useNamespace } from '@ibiz-template/vue3-util'; -import { defineComponent, PropType } from 'vue'; -import { ITabExpPanel } from '@ibiz/model-core'; +import { defineComponent, h, PropType, resolveComponent } from 'vue'; +import { + IAppDETabExplorerView, + IDETabViewPanel, + ITabExpPanel, +} from '@ibiz/model-core'; import { IControlProvider, TabExpPanelController, } from '@ibiz-template/runtime'; +import './tab-exp-panel.scss'; export const TabExpPanelControl = defineComponent({ name: 'IBizTabExpPanelControl', @@ -36,6 +41,12 @@ export const TabExpPanelControl = defineComponent({ (...args) => new TabExpPanelController(...args), ); const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`); + + // 视图模型 + const model = c.view?.model as IAppDETabExplorerView; + // 布局模式 + const tabPosition = model?.tabLayout?.toLowerCase() || 'top'; + const onTabChange = (value: string) => { c.state.activeName = value; c.handleTabChange(); @@ -44,11 +55,38 @@ export const TabExpPanelControl = defineComponent({ return { c, ns, + tabPosition, onTabChange, }; }, render() { const { isCreated, tabPages } = this.c.state; + if (this.tabPosition === 'flow' || this.tabPosition === 'flow_noheader') { + if (!isCreated) { + return; + } + return ( +
+ {tabPages.map(page => { + const target = this.c.model.controls?.find( + tab => tab.id === page.tabTag, + ) as IDETabViewPanel; + return ( +
+
{page.caption}
+
+ {h(resolveComponent('IBizViewShell'), { + context: this.context, + params: this.params, + viewId: target?.embeddedAppDEViewId, + })} +
+
+ ); + })} +
+ ); + } return ( isCreated && ( props.value, @@ -163,11 +168,17 @@ export const IBizSpan = defineComponent({ );