Jusify-end无法在VUE组件按钮上正常工作
在我的vuejs组件中,我有一个带有提交按钮和取消按钮的表单。
我希望我的按钮正确对齐
代码
<template slot="modal_actions">
<div class="flex items-center justify-end">
<close-overlay class="h-full" identifier="addNewScheduleModal">
<cs-button variant="blank">Cancel</cs-button>
</close-overlay>
<disables-submit-on-errors
:identifier="identifier"
@proceed="addNewSchedule"
>
<loading-button ref="submitBtnSave" size="normal">
Save & Close
</loading-button>
</disables-submit-on-errors>
</div>
</template>
是我当前
的 错误并对准它们。...
我正在使用tailwind-css
In my vuejs component, I have a form with submit button and a cancel button.
I want my buttons to align right
Following is my current code
<template slot="modal_actions">
<div class="flex items-center justify-end">
<close-overlay class="h-full" identifier="addNewScheduleModal">
<cs-button variant="blank">Cancel</cs-button>
</close-overlay>
<disables-submit-on-errors
:identifier="identifier"
@proceed="addNewSchedule"
>
<loading-button ref="submitBtnSave" size="normal">
Save & Close
</loading-button>
</disables-submit-on-errors>
</div>
</template>
Even though I'm using justify-end
class, still the button are aligned left...
I'm struggling to find what I'm doing wrong and align them right....
I'm using tailwind-css
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的
取消
按钮在左侧,并且加载
按钮在取消按钮的右侧。然后有两种方法,
div
之类的按钮的顺序:flex将flex方向更改为
到Div。我在下面创建了一个类似的示例以理解目的。ROW-RED-REVERSE
- 逆转Assuming that your
cancel
button is at left andloading
button is at right of cancel button.Then there are two ways,
div
like this:row-reverse
by adding classflex-row-reverse
to the div. I have created a similar example below for understanding purpose.