提交 f7f76d0a 编写于 作者: LUCIFER-ZHU's avatar LUCIFER-ZHU

update: 封装iframe

上级 7c9b761b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div style="flex-grow: {{#if item.psLayoutPos.grow}}{{item.psLayoutPos.grow}}{{else}}0{{/if}};"> <div style="flex-grow: {{#if item.psLayoutPos.grow}}{{item.psLayoutPos.grow}}{{else}}0{{/if}};">
<AppFormButton <AppFormButton
:visible="state.detailsModel.{{item.codeName}}.visible" :visible="state.detailsModel.{{item.codeName}}.visible"
className="app-form-button{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}" class="app-form-button{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
style="{{#if item.width}}width: {{item.width}}px;{{/if}}{{#if item.height}}height: {{item.height}}px;{{/if}}" style="{{#if item.width}}width: {{item.width}}px;{{/if}}{{#if item.height}}height: {{item.height}}px;{{/if}}"
cssClass="{{#if item.psSysImage.cssClass}}{{item.psSysImage.cssClass}}{{/if}}" cssClass="{{#if item.psSysImage.cssClass}}{{item.psSysImage.cssClass}}{{/if}}"
imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{/if}}" imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{/if}}"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
{{> @macro/front-end/widgets/common/layout-pos.hbs item=item.psLayoutPos}} > {{> @macro/front-end/widgets/common/layout-pos.hbs item=item.psLayoutPos}} >
<AppFormButton <AppFormButton
:visible="state.detailsModel.{{item.codeName}}.visible" :visible="state.detailsModel.{{item.codeName}}.visible"
className="app-form-button{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}" class="app-form-button{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
style="{{#if item.width}}width: {{item.width}}px;{{/if}}{{#if item.height}}height: {{item.height}}px;{{/if}}" style="{{#if item.width}}width: {{item.width}}px;{{/if}}{{#if item.height}}height: {{item.height}}px;{{/if}}"
cssClass="{{#if item.psSysImage.cssClass}}{{item.psSysImage.cssClass}}{{else}}''{{/if}}" cssClass="{{#if item.psSysImage.cssClass}}{{item.psSysImage.cssClass}}{{else}}''{{/if}}"
imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{else}}''{{/if}}" imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{else}}''{{/if}}"
......
{{#eq item.psLayoutPos 'FLEX'}} {{#eq item.psLayoutPos 'FLEX'}}
<div style="flex-grow: {{#if item.psLayoutPos.grow}}{{item.psLayoutPos.grow}}{{else}}0{{/if}};"> <div style="flex-grow: {{#if item.psLayoutPos.grow}}{{item.psLayoutPos.grow}}{{else}}0{{/if}};">
<div v-show="state.detailsModel.{{item.codeName}}.visible" class="app-form-iframe" style="{{#if item.contentHeight}}height: {{item.contentHeight}}px;{{/if}}{{#if item.contentWidth}}width: {{item.contentWidth}}px{{/if}}"> <AppFormIframe
<iframe src="{{item.iFrameUrl}}" style="height: 100%;width: 100%;border: 0"></iframe> :visible="state.detailsModel.{{item.codeName}}.visible"
</div> class="app-form-iframe{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
style="{{#if item.contentHeight}}height: {{item.contentHeight}}px;{{/if}}{{#if item.contentWidth}}width: {{item.contentWidth}}px{{/if}}"
iFrameUrl="{{item.iFrameUrl}}"
/>
</div> </div>
{{else}} {{else}}
<a-col <a-col
{{> @macro/front-end/widgets/common/layout-pos.hbs item=item.psLayoutPos}} > {{> @macro/front-end/widgets/common/layout-pos.hbs item=item.psLayoutPos}} >
<div v-show="state.detailsModel.{{item.codeName}}.visible" class="app-form-iframe {{#if item.psSysCss}}{{item.psSysCss.cssName}}{{/if}}" style="{{#if item.contentHeight}}height: {{item.contentHeight}}px;{{/if}}{{#if item.contentWidth}}width: {{item.contentWidth}}px{{/if}}"> <AppFormIframe
<iframe src="{{item.iFrameUrl}}" style="height: 100%;width: 100%;border: 0"></iframe> :visible="state.detailsModel.{{item.codeName}}.visible"
</div> class="app-form-iframe{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
style="{{#if item.contentHeight}}height: {{item.contentHeight}}px;{{/if}}{{#if item.contentWidth}}width: {{item.contentWidth}}px{{/if}}"
iFrameUrl="{{item.iFrameUrl}}"
/>
</a-col> </a-col>
{{/eq}} {{/eq}}
\ No newline at end of file
...@@ -3,8 +3,6 @@ import { IActionParam, IParam } from "@core"; ...@@ -3,8 +3,6 @@ import { IActionParam, IParam } from "@core";
interface FormGroupProps{ interface FormGroupProps{
visible: boolean; visible: boolean;
className: string;
style?: string;
cssClass?: string; cssClass?: string;
imagePath?: string; imagePath?: string;
showCaption?: boolean; showCaption?: boolean;
...@@ -20,9 +18,7 @@ const props = withDefaults(defineProps<FormGroupProps>(), { ...@@ -20,9 +18,7 @@ const props = withDefaults(defineProps<FormGroupProps>(), {
<template> <template>
<a-button <a-button
type="primary" type="primary"
v-show="visible" v-show="visible">
:class="className"
:style="style">
<template #icon v-if="cssClass || imagePath"> <template #icon v-if="cssClass || imagePath">
<AppIconText :iconClass="cssClass" :imgPath="imagePath"/> <AppIconText :iconClass="cssClass" :imgPath="imagePath"/>
</template> </template>
......
<script setup lang="ts">
import { IActionParam, IParam } from "@core";
interface FormGroupProps{
visible: boolean;
iFrameUrl: string
}
const props = withDefaults(defineProps<FormGroupProps>(), {
visible: true,
});
</script>
<template>
<div v-show="visible">
<iframe :src="iFrameUrl" style="height: 100%;width: 100%;border: 0"></iframe>
</div>
</template>
<style lang="scss">
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册