fix(form): fix `suffix` slot style

修复suffix插槽的样式问题
This commit is contained in:
无木 2021-07-09 16:39:50 +08:00
parent 0595a72da9
commit a9bbed1973
2 changed files with 39 additions and 37 deletions

View File

@ -1,5 +1,6 @@
<template>
<a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup">
<div style="width: 100%; text-align: right">
<FormItem>
<slot name="resetBefore"></slot>
<Button
@ -35,6 +36,7 @@
</Button>
<slot name="advanceAfter"></slot>
</FormItem>
</div>
</a-col>
</template>
<script lang="ts">
@ -43,7 +45,7 @@
import { defineComponent, computed, PropType } from 'vue';
import { Form, Col } from 'ant-design-vue';
import { Button, ButtonProps } from '/@/components/Button';
import { BasicArrow } from '/@/components/Basic/index';
import { BasicArrow } from '/@/components/Basic';
import { useFormContext } from '../hooks/useFormContext';
import { useI18n } from '/@/hooks/web/useI18n';
import { propTypes } from '/@/utils/propTypes';

View File

@ -326,10 +326,10 @@
labelCol={labelCol}
wrapperCol={wrapperCol}
>
<>
{getContent()}
<div style="display:flex">
<div style="flex:1">{getContent()}</div>
{showSuffix && <span class="suffix">{getSuffix}</span>}
</>
</div>
</Form.Item>
);
}