gpt4 book ai didi

bootstrap-vue - 标题对齐中心在 bootstrapVue 的 b-modal

转载 作者:行者123 更新时间:2023-12-03 23:33:33 25 4
gpt4 key购买 nike

            <div class="text-center">
<b-modal visible centered id="send-pin-modal" header="test" title="Confirm Approval" hide-footer hide-header-close no-close-on-backdrop no-close-on-esc>
<div class="col-12 text-center">
<!--<p class="col-12">After being approved, the disbursement cannot be undone.</p>-->
</div>
<div class="col-12">
<div class="ml-5 mr-5">
<b-form-input type="password" id="pin-input" v-model="pin" required></b-form-input>
</div>
</div>
<div class="col-12 text-center">
<slot name="pin-error" class="text-danger text-center" v-show="comment">{{comment}}</slot>
</div>
<div class="col-12">
</div>
<div class="col-12 text-center">
<b-button variant="primary" size="sm" class="mt-2 mr-2" @click="verifyPin">Continue</b-button>
<b-button variant="danger" size="sm" class="mt-2 ml-2" @click="hidePinModal">Cancel</b-button>
</div>
</b-modal>
</div>
这是我的 bootstrapVue 示例代码。我还附上了输出图像。
enter image description here
如何将标题“确认批准”设为中心?

最佳答案

或者使用标题插槽。
您可以使用 header-class Prop ,并添加 justify-content-center实用程序类,将标题居中。

new Vue({
el: '#my-app',
data: {
comment: 'Some comment',
pin: ''
}
});
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap-vue@2.21.2/dist/bootstrap-vue.min.css" />
<script src="https://unpkg.com/vue@2.6.2/dist/vue.min.js"></script>
<script src="https://unpkg.com/bootstrap-vue@2.21.2/dist/bootstrap-vue.min.js"></script>

<div id="my-app">
<b-modal visible centered id="send-pin-modal" header="test" header-class="justify-content-center" title="Confirm Approval" hide-footer hide-header-close no-close-on-backdrop no-close-on-esc>
<div class="col-12">
<div class="ml-5 mr-5">
<b-form-input type="password" id="pin-input" v-model="pin" required></b-form-input>
</div>
</div>
<div class="col-12 text-center">
<slot name="pin-error" class="text-danger text-center" v-show="comment">{{comment}}</slot>
</div>
<div class="col-12">
</div>
<div class="col-12 text-center">
<b-button variant="primary" size="sm" class="mt-2 mr-2">Continue</b-button>
<b-button variant="danger" size="sm" class="mt-2 ml-2">Cancel</b-button>
</div>
</b-modal>
</div>

关于bootstrap-vue - 标题对齐中心在 bootstrapVue 的 b-modal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65789729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com