npm命令引入element-ui


1、vue2中使用npm引入element-ui

npm install element-ui --save

 

import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";


Vue.config.productionTip = false;
Vue.use(Element);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");

 

2、vue3中使用npm引入element-plus

npm install element-plus --save

 

import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router";

import "./assets/main.css";

import ElementUI from "element-plus";
import "element-plus/theme-chalk/index.css";

const app = createApp(App);

app.use(createPinia());
app.use(router);
app.use(ElementUI)
app.mount("#app");
发布时间 : 2023-03-01,阅读量:1148 , 分类: Npm Element-UI
本文链接:https://upwqy.com/details/12.html
thinkphp-queue 学习笔记 npm镜像