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

update: 封装按钮

上级 6ab13185
{{#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}};">
<a-button <AppFormButton
type="primary" :visible="state.detailsModel.{{item.codeName}}.visible"
v-show="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}}"
{{#if item.psSysImage}} imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{/if}}"
<template #icon> :showCaption="{{item.showCaption}}"
<AppIconText {{#if item.psSysImage.cssClass}}iconClass="{{item.psSysImage.cssClass}}"{{/if}} {{#if item.psSysImage.imagePath}}imgPath="{{item.psSysImage.imagePath}}"{{/if}}/> labelCssName="{{#if item.labelPSSysCss}}{{item.labelPSSysCss.cssName}}{{/if}}"
</template> caption="{{#if item.caption}}{{item.caption}}{{/if}}"
{{/if}} />
{{#if item.showCaption}}
<span {{#if item.labelPSSysCss}}class="{{item.labelPSSysCss.cssName}}"{{/if}}>{{item.caption}}</span>
{{/if}}
</a-button>
</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}} >
<a-button <AppFormButton
type="primary" :visible="state.detailsModel.{{item.codeName}}.visible"
v-show="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}}"
{{#if item.psSysImage}} imagePath="{{#if item.psSysImage.imagePath}}{{item.psSysImage.imagePath}}{{else}}''{{/if}}"
<template #icon> :showCaption="{{item.showCaption}}"
<AppIconText {{#if item.psSysImage.cssClass}}iconClass="{{item.psSysImage.cssClass}}"{{/if}} {{#if item.psSysImage.imagePath}}imgPath="{{item.psSysImage.imagePath}}"{{/if}}/> labelCssName="{{#if item.labelPSSysCss}}{{item.labelPSSysCss.cssName}}{{/if}}"
</template> caption="{{#if item.caption}}{{item.caption}}{{/if}}"
{{/if}} />
{{#if item.showCaption}}
<span {{#if item.labelPSSysCss}}class="{{item.labelPSSysCss.cssName}}"{{/if}}>{{item.caption}}</span>
{{/if}}
</a-button>
</a-col> </a-col>
{{/eq}} {{/eq}}
\ No newline at end of file
<script setup lang="ts">
import { IActionParam, IParam } from "@core";
interface FormGroupProps{
visible: boolean;
className: string;
style?: string;
cssClass?: string;
imagePath?: string;
showCaption?: boolean;
labelCssName?: string;
caption: string
}
const props = withDefaults(defineProps<FormGroupProps>(), {
visible: true,
});
</script>
<template>
<a-button
type="primary"
v-show="visible"
:class="className"
:style="style">
<template #icon v-if="cssClass || imagePath">
<AppIconText :iconClass="cssClass" :imgPath="imagePath"/>
</template>
<template v-if="showCaption && caption">
<span :class="labelCssName">{{caption}}</span>
</template>
</a-button>
</template>
<style lang="scss">
</style>
\ No newline at end of file
...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
@use './lock.scss'; @use './lock.scss';
@use './app-form-item.scss'; @use './app-form-item.scss';
@use './app-popover.scss'; @use './app-popover.scss';
@use './app-form-button.scss';
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册