div v-for=operator operateIndex in eleoperators key=operateIndex style=margin-top 10px; t-form-item t-select v-model=operatorcharacteristic
可以在每个“删除操作”按钮的样式中添加一个margin-left属性,并设置为一个固定的值,以使所有按钮的横坐标相同并右对齐。修改后的代码如下:
<div v-for="(operator, operateIndex) in ele.operators" :key="operateIndex" style="margin-top: 10px;" >
<t-form-item>
...
<t-button shape="round" theme="danger" size="extra-small" style="margin-left: 20px; margin-left: 100px;" @click="deleteoperateoperate(index,num,operateIndex)">
删除操作
</t-button>
</t-form-item>
</div>
在上述代码中,我添加了margin-left: 100px;,你可以根据需要调整这个值来实现对齐效果。
原文地址: http://www.cveoy.top/t/topic/iXF5 著作权归作者所有。请勿转载和采集!