Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 引导在laravel react ui中不起作用_Javascript_Php_Reactjs_Laravel_Bootstrap 4 - Fatal编程技术网

Javascript 引导在laravel react ui中不起作用

Javascript 引导在laravel react ui中不起作用,javascript,php,reactjs,laravel,bootstrap-4,Javascript,Php,Reactjs,Laravel,Bootstrap 4,我已经使用php artisan UI react使用react UI设置了我的新laravel项目。npm是否安装并运行了开发人员。将react id和脚本链接添加到welcome.blade.php。现在,示例react组件正在加载,但该页面上不存在引导样式。我的代码如下, app.js: 需要“./bootstrap”; 需要“./组件/示例” 我在使用引导ui时遇到分页错误的问题 此外,我建议将此代码添加到AppServiceProvider use Illuminate\Pagina

我已经使用php artisan UI react使用react UI设置了我的新laravel项目。npm是否安装并运行了开发人员。将react id和脚本链接添加到welcome.blade.php。现在,示例react组件正在加载,但该页面上不存在引导样式。我的代码如下, app.js:

需要“./bootstrap”;
需要“./组件/示例” 我在使用引导ui时遇到分页错误的问题

此外,我建议将此代码添加到AppServiceProvider

use Illuminate\Pagination\Paginator;

public function boot()
{
     Paginator::useBootstrap();
}

我在使用引导ui时遇到分页错误的问题

此外,我建议将此代码添加到AppServiceProvider

use Illuminate\Pagination\Paginator;

public function boot()
{
     Paginator::useBootstrap();
}

您需要包括以下样式:

<link href="{{ asset('css/app.css') }}" rel="stylesheet">

在welcome.blade.php视图文件中,您需要包括以下样式:

<link href="{{ asset('css/app.css') }}" rel="stylesheet">

对于welcome.blade.php视图文件,其位置

看起来可能缺少css组件。另外,如果您在react中,我会拉入引导react,以便您可以在何处添加组件?我在何处添加css组件?在example.js或刀片文件中。我很困惑,因为我看到的每一个教程或视频都是在初始设置之后进行引导样式设置的。import'//bootstrap.css';。不要忘记,引导需要jquery才能使许多组件正常工作,尽管我怀疑这张卡是否能正常工作。。。这将是一个例子。js@RyanH谢谢你的帮助。我通过在app.css中添加节点模块bootstrap scs的正确路径解决了这个问题,它在@import'~bootstrap/scss/bootstrap'之前;我把它改为@import.././node_modules/bootstrap/scss/bootstrap;并将其导入我的example.js。看起来您可能缺少css组件。另外,如果您在react中,我会拉入引导react,以便您可以在何处添加组件?我在何处添加css组件?在example.js或刀片文件中。我很困惑,因为我看到的每一个教程或视频都是在初始设置之后进行引导样式设置的。import'//bootstrap.css';。不要忘记,引导需要jquery才能使许多组件正常工作,尽管我怀疑这张卡是否能正常工作。。。这将是一个例子。js@RyanH谢谢你的帮助。我通过在app.css中添加节点模块bootstrap scs的正确路径解决了这个问题,它在@import'~bootstrap/scss/bootstrap'之前;我把它改为@import.././node_modules/bootstrap/scss/bootstrap;并将其导入我的example.js。