首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Laravel AdminLTE模板错误

Laravel AdminLTE模板错误
EN

Stack Overflow用户
提问于 2017-06-11 04:13:22
回答 0查看 576关注 0票数 1

我想在我的页面上添加一个bootstrap模式,并且在文档的头部包含了jQuery脚本。下面是模型

代码语言:javascript
复制
<!-- Modal -->
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                Delete {{$title}}?
            </div>
            <div class="modal-body">
                Are you sure you want to delete {{$body}}?
            </div>
            <div class="modal-footer">
                <a class="btn btn-danger btn-ok">Yes</a>
                <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
            </div>
        </div>
    </div>
</div>
<script>
    $('#confirm-delete').on('show.bs.modal', function(e) {
        $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
    });
</script>

我在页面加载时得到一个错误,说:

代码语言:javascript
复制
[Vue warn]: Error compiling template:
...
...
- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.


(found in <Root>)

我不知道哪里出了问题,因为我在我的其他项目中也使用了相同的模式,它也正常工作。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44477636

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档