<> stay uniapp Used in element-ui assembly

one , Installation dependency
npm i element-ui -S // Installation dependency
two , Create a new one under the root directory element file , Write one index.js file , Implement on-demand import , It will be more convenient to manage

// Import the components you need import "element-ui/packages/theme-chalk/lib/base.css"; import
Icon from'element-ui/lib/icon'; const elements = { install: function (Vue) { Vue
.use(Icon) } } export default elements
three , Then in main.js introduce
import Vue from 'vue' import App from './App' import ElementUI from
'element-ui' import element from './element/index' Vue.use(ElementUI) Vue.config
.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$
mount()

Technology
Daily Recommendation