【发布时间】:2020-06-30 02:40:59
【问题描述】:
我正在使用模态(来自 vue-bootstrap)并且我编写了以下代码:
<template id="child">
<b-modal v-model="showModal" size="lg">
<template v-slot:modal-header>
<h4 class="modal-title">
<b>{{ title }}: {{ detailedResults.pid }}</b>
</h4>
<div class="w-100">
<b-button variant="light border-dark" class="btn btn-primary action_btn float-right" v-on:click="closeModal">
Close
</b-button>
<b-button variant="light border-dark" class="btn btn-primary action_btn float-right" v-on:click="copyFullPath">
Copy full path
</b-button>
<b-button v-if="checkIfNotMainPID()" variant="light border-dark" class="btn btn-primary action_btn float-right" v-on:click="parentFunc(detailedResults.ppid)">
Move to parent
</b-button>
</div>
</template>
</b-modal>
</template>
地点:
.action_btn {
margin: 0 5px;
}
.float-right {
float: right;
}
.align-left {
text-align: left;
}
h4 {
float: left;
font-size: 18px;
}
我想得到以下标题:
但目前我得到:
如您所见,我已经设法一一显示按钮,但 <h4> 标题中断,即使有空间。我设法做到了,使用以下topic。但现在我似乎无法修复标题。为什么 Bootstrap 使用display: flex?这很烦人,很难以这种方式显示。显示按钮和标题的最简单方法是什么?
【问题讨论】:
标签: css bootstrap-4 vuejs2 bootstrap-modal bootstrap-vue