antDesign 文本域弹窗样式

本文介绍了如何使用Ant Design组件创建一个带有自定义样式的文本域弹窗,包括调整``和``的布局,以及应用特定CSS样式来优化``的显示效果。
摘要由CSDN通过智能技术生成

antDesign 文本域弹窗样式


在这里插入图片描述

<a-modal
   v-model:visible="reportVisible"
   title="操作确认"
   :footer="null"
   :destroyOnClose="true"
   :maskClosable="false"
   width="40%"
   :afterClose="afterClose"
   class="rejectModal"
 >
   <a-form
     ref="ruleForms"
     :model="submitForm"
     :rules="rules"
     :label="{ span: 24, offset: 24 }"
     layout="horizontal"
     class="textareaDialog"
   >
     <a-row :gutter="24">
       <a-col :span="24">
         <a-form-item ref="content" label="意见:" name="content">
           <a-textarea
             v-model:value="submitForm.content"
             placeholder="请输入意见"
             allowClear
             :maxlength="255"
             :rows="4"
             showCount
             :autosize="{ minRows: 4, maxRows: 6 }"
           />
         </a-form-item>
       </a-col>
     </a-row>
     <div class="footButton">
       <a-button type="primary" @click="onSubmit">确定</a-button>
       <a-button
         type="primary"
         @click="afterClose"
         style="margin-left: 20px"
         >取消</a-button
       >
     </div>
   </a-form>
 </a-modal>

CSS:

<style>
/* 文本域的样式 */
.textareaDialog .ant-form-item-label {
  width: 20%!important;
}
.textareaDialog .ant-form-item-control-wrapper {
  width: 60%!important;
}
/* 右下角的字调整位置 */
.textareaDialog .ant-input-textarea-show-count {
  position: relative;
}
.textareaDialog .ant-input-textarea-show-count::after {
  position: absolute;
  right: 30px;
  bottom: -10px;
}
.textareaDialog .ant-input-affix-wrapper{
  padding:16px
}
</style>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值