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

update: 封装iframe

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