Php 如何在vue js中显示引导模式对话框?
我一直在尝试使用引导和vue js显示模态对话框。我想在用户成功注册后显示对话框Php 如何在vue js中显示引导模式对话框?,php,html,twitter-bootstrap,vue.js,Php,Html,Twitter Bootstrap,Vue.js,我一直在尝试使用引导和vue js显示模态对话框。我想在用户成功注册后显示对话框 <div> .... <div class="modal fade" v-if="isEnabled"> <div class="modal-dialog" role="dialog"> <div class="modal-content"> <div class="modal-header">
<div>
....
<div class="modal fade" v-if="isEnabled">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
....
</div>
....
情态标题
&时代;
模态体文本在这里
保存更改
关
....
但无法显示对话框。有人能帮我吗?模态组件由jQuery管理,您必须使用jQuery打开模态组件 我需要你的Vue代码帮助你太多,如果它是一个ajax请求注册用户,等待成功回调,使一个
$('#modal').modal('show')
如果这是一个同步进程,请在Vue实例的挂载方法中调用modal。例如:
如果要在单击按钮时显示模式框,请使用
<button type="button" data-toggle="modal" data-target="#myModal">Open Modal</button>
“#myModal”是要显示的模式框的ID
您最好使用专为vue设计的更多信息。
$('#modal').modal('show');