- 安装elementUi组件库
-
npm i element-ui -S
-
- 安装 babel-plugin-component
-
npm install babel-plugin-component -D
- 修改babel.config.js文件
module.exports = { presets: ["@vue/cli-plugin-babel/preset", ["@babel/preset-env", { modules: false }]], plugins: [ [ "component", { libraryName: "element-ui", styleLibraryName: "theme-chalk", }, ], ], };
4.在mian.js中引入
import "element-ui/lib/theme-chalk/index.css"; import { Pagination } from "element-ui"; Vue.use(Pagination);
标签:Pagination,plugin,babel,component,element,ui,引入 From: https://www.cnblogs.com/czwhandsome/p/16855878.html