UNPKG

y-gtmi-ui

Version:

y-gtmi-ui 基于Element-plus二次封装基础组件文档

51 lines (33 loc) 903 B
## 介绍 > 基于 vue3+ ts+ Element-plus 二次封装组件 ## npm 方式安装使用 ```bash npm i y-gtmi-ui ``` ## 全局注册使用 > ### 前提条件:使用项目必须全局注册 Element-plus组件库 ```javascript import { createApp } from 'vue'; // 在main.js中按下引入 import YAdminUi from 'y-gtmi-ui'; import 'y-gtmi-ui/lib/style.css'; const app = createApp(App); app.use(YAdminUi); ``` ```bash npm install -g npm # 安装依赖 npm install --registry=https://registry.npmjs.org/ > npm config get registry 查看当前指向源 # 如果安装依赖失败,可以尝试使用淘宝镜像 --registry=https://registry.npmmirror.com/ > npm config set registry https://registry.npmmirror.com/ 切换淘宝镜像源 > npm install ``` ### 发包到npm ```bash npm login # 修改 package.json 版本号,允许打包命令 npm run lib # 执行发布命令 npm publish ```