1

当我放 时<script src="{{ asset('js/app.js') }}" defer></script>,我的 Bootstrap 模板不会加载,但如果我将其注释掉,它就可以正常工作。

我在使用的 2 个引导模板上收到此错误。我试图弄清楚为什么放入<script src="{{ asset('js/app.js') }}" defer></script>我的模板会破坏它。

这是我的app.blade.php

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>R&D LoungeApp</title>
  
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <!-- Favicon icon -->
    <link rel="icon" href="{{ asset('assets/images/logo_r&d.png') }}" type="image/x-icon">

    @yield('css')
    <!-- vendor css -->
    <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">


</head>

<body class="">
    <div class="loader"></div>
    <div id="app">
        
        @include('base.navbar')
       
        @include('base.header')
      
        <div class="pcoded-main-container">
            @yield('content')
            @yield('vuejs')
        </div>

        <!-- Required Js -->
        <script src="assets/js/vendor-all.min.js"></script>
        <script src="assets/js/plugins/bootstrap.min.js"></script>
        <script src="assets/js/pcoded.min.js"></script>
        <script src="assets/js/menu-setting.min.js"></script>


        @yield('javascript')
      
    </div>
    <!-- Footer -->
    @include('base.footer')

    <!-- Scripts VueJS-->
    <script src="{{ mix('js/app.js') }}"></script> 
</body>

</html>
4

0 回答 0