| | |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-form-item label="预留天数" prop="days" class="form_class"> |
| | | <el-input-number v-model="ruleForm.days" @change="handleChange" /> |
| | | <div class="custom-input-number"> |
| | | <el-input-number v-model="ruleForm.days" controls-position="right" @change="handleChange" /> |
| | | <span class="unit">天</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item class="form_class"> |
| | | <el-button type="primary" @click="submitForm">保存</el-button> |
| | |
| | | margin-top: 20px; |
| | | } |
| | | } |
| | | .custom-input-number { |
| | | position: relative; |
| | | display: inline-block; |
| | | } |
| | | .unit { |
| | | position: absolute; |
| | | top: 50%; |
| | | right: 40px; /* 根据需要调整位置 */ |
| | | transform: translateY(-50%); |
| | | pointer-events: none; /* 防止单位标签影响输入框的点击事件 */ |
| | | color: #999; |
| | | } |
| | | </style> |