提交 a9bbed19 作者: 无木

fix(form): fix `suffix` slot style

修复suffix插槽的样式问题
上级 0595a72d
<template> <template>
<a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup"> <a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup">
<div style="width: 100%; text-align: right">
<FormItem> <FormItem>
<slot name="resetBefore"></slot> <slot name="resetBefore"></slot>
<Button <Button
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
</Button> </Button>
<slot name="advanceAfter"></slot> <slot name="advanceAfter"></slot>
</FormItem> </FormItem>
</div>
</a-col> </a-col>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -43,7 +45,7 @@ ...@@ -43,7 +45,7 @@
import { defineComponent, computed, PropType } from 'vue'; import { defineComponent, computed, PropType } from 'vue';
import { Form, Col } from 'ant-design-vue'; import { Form, Col } from 'ant-design-vue';
import { Button, ButtonProps } from '/@/components/Button'; import { Button, ButtonProps } from '/@/components/Button';
import { BasicArrow } from '/@/components/Basic/index'; import { BasicArrow } from '/@/components/Basic';
import { useFormContext } from '../hooks/useFormContext'; import { useFormContext } from '../hooks/useFormContext';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
......
...@@ -326,10 +326,10 @@ ...@@ -326,10 +326,10 @@
labelCol={labelCol} labelCol={labelCol}
wrapperCol={wrapperCol} wrapperCol={wrapperCol}
> >
<> <div style="display:flex">
{getContent()} <div style="flex:1">{getContent()}</div>
{showSuffix && <span class="suffix">{getSuffix}</span>} {showSuffix && <span class="suffix">{getSuffix}</span>}
</> </div>
</Form.Item> </Form.Item>
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论