在我的项目Laravel,Vuejs,VueRouter ...
当我刷新主页时,脚本滑块可以工作,但是当我转到另一个页面并返回首页时,此脚本不起作用,但此脚本未加载
使用vue-router时需要在所有页面中加载脚本
layout.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="">
<meta name="author" content="_nK">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="icon" href="{{ asset('img/favicon.png') }}">
<title>Deer - Homepage</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap.extension.css') }}">
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
<link rel="stylesheet" href="{{ asset('css/swiper.css') }}">
<link rel="stylesheet" href="{{ asset('css/sumoselect.css') }}">
<link rel="stylesheet" href="{{ asset('css/font-awesome.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/algolia.css') }}">
@yield('extra-css')
</head>
<body class="@yield('body-class', '')">
@yield('content')
</body>
<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('js/jquery-2.2.4.min.js') }}"></script>
{{-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> --}}
<script src="{{ asset('js/swiper.jquery.min.js') }}"></script>
<script src="{{ asset('js/global.js') }}"></script>
<!-- styled select -->
<script src="{{ asset('js/jquery.sumoselect.min.js') }}"></script>
<!-- counter -->
<script src="{{ asset('js/jquery.classycountdown.js') }}"></script>
<script src="{{ asset('js/jquery.knob.js') }}"></script>
<script src="{{ asset('js/jquery.throttle.js') }}"></script>
<script src={{asset( "js/extention.js")}}></script>
<!-- Include AlgoliaSearch JS Client and autocomplete.js library -->
{{-- <script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js"></script> --}}
{{-- <script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.min.js"></script> --}}
{{-- <script src="{{ asset('js/algolia.js') }}"></script> --}}
@yield('extra-js')
</body>
<!-- Mirrored from html.nkdev.info/_con/ecommerce-dashboard.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 16 Jun 2018 15:19:35 GMT -->
</html>
谢谢