首页 > 解决方案 > 从 bootstrap-vue 导入 Pagination、FormSelect 的警告

问题描述

我有这个项目,早在 2018 年就在 Darwin OS 中开发,我试图在 Windows 机器上运行这个项目,在赢得了依赖关系之后,我收到了这个警告,它不能让我的项目正常运行。

终端输出:

 WARNING  Compiled with 3 warnings                                                                                                                                                                                     9:57:48 AM
 warning  in ./src/main.js

25:8-18 "export 'FormSelect' was not found in 'bootstrap-vue/esm/components/form-select'

 warning  in ./src/main.js

26:8-18 "export 'Pagination' was not found in 'bootstrap-vue/esm/components/pagination'

 warning  in ./src/main.js

30:25-31 "export 'default' (imported as 'bModal') was not found in 'bootstrap-vue/esm/components/modal/modal'

这就是我在 main.js 中声明导入的方式:

import {Pagination, FormSelect} from 'bootstrap-vue/esm/components'
import bModal from 'bootstrap-vue/esm/components/modal/modal'

我不确定它是否尝试导入 pagination.js,如路径“bootstrap-vue/esm/components/pagination”上的图像所示

在此处输入图像描述

我尝试为每个组件导入正确的路径,如下所示:

import {Pagination} from 'bootstrap-vue/esm/components/pagination'
import {FormSelect} from 'bootstrap-vue/esm/components/form-select'

但它显示了相同的警告信息。

顺便说一句,我认为很重要的一点是,开发人员操作系统是 darwing,因为我在 bootstrap-vue/esm/components 文件夹中看不到这条路径,/modal/modal

import bModal from 'bootstrap-vue/esm/components/modal/modal'

标签: javascriptvue.jsbootstrap-vue

解决方案


推荐阅读