vue 加载vue文件
Vue-blockui (vue-blockui)
BlockUI for vue 2, similiar to jquery blockUI, can be used for loading screen.
vue 2的BlockUI类似于jquery blockUI,可用于加载屏幕。
![blockui2](https://i-blog.csdnimg.cn/blog_migrate/7a59e6db769d6030d74813cf39f3ceb2.png)
![blockuiv](https://i-blog.csdnimg.cn/blog_migrate/a4f9db5859d75cef28b5049ebd7ba3a3.png)
安装 (Installation)
npm install --save vue-blockui
使用组件 (Use Component)
Install all the components:
安装所有组件:
import Vue from 'vue'
import BlockUI from 'vue-blockui'
Vue.use(BlockUI)
** ⚠️ If You see some errors during webpack compilation, you might be missing the right configuration for loading css in your webpack.config.js. **
**⚠️如果在webpack编译期间看到一些错误,则可能是缺少在webpack.config.js中加载CSS的正确配置。 **
Under "rules", you should have below configuration:
在“规则”下,您应具有以下配置:
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
}
Be aware that you should have configured style-loader and css-loader in your package.json to support above rule.
请注意,您应该在package.json中配置了style-loader和css-loader以支持上述规则。
npm install style-loader css-loader --save-dev
翻译自: https://vuejsexamples.com/blockui-for-vue-2-can-be-used-for-loading-screen/
vue 加载vue文件