plugin-vue-components
安装 * npm install --save plugin-vue-components
613
| Install | |
|---|---|
npm install plugin-vue-components |
|
| Latest Version: | 0.1.15 |
| Vue: | 3 |
| License: | ISC |
| Last Updated: | Dec 2, 2023 |
| Links: | Gitee · npm |
Maintainer: jiangzhuqingfeng
plugin-vue-components
vue3+ts组件,支持unplugin-vue-components按需引入
安装
npm i -S plugin-vue-components
引入
方式一 按需手动引入
main.ts引入样式
import "plugin-vue-components/dist/style.css"//引入样式
vue组件中使用
<template>
<IoUpload>IoUpload</IoUpload>
<IoList></IoList>
</template>
import { Upload as IoUpload, List as IoList } from 'plugin-vue-components'
方式二 基于unplugin-vue-components按需引入
npm install --save unplugin-vue-components
vite.config.ts文件中添加配置
import Components from 'unplugin-vue-components/vite'
plugins:[
Components({
resolvers: [
(componentName) => {
if (componentName.startsWith('Io'))
return { name: componentName, from: 'plugin-vue-components' }
},
],
]
方式三(推荐使用)基于unplugin-vue-components按需自动引入
npm install -D unplugin-vue-components
vite.config.ts文件中添加配置
import Components from 'unplugin-vue-components/vite'
import IoUIResolver from 'plugin-vue-components/resolver'
plugins:[
Components({
resolvers: [
IoUIResolver(),
],
]
废弃,在main.ts全局注册
import IoComponents from 'plugin-vue-components'
import "plugin-vue-components/dist/style.css"//引入样式
const app = createApp(App)
app.use(IoComponents)
app.mount('#app')
发布
- 修改package.json中的version版本号
"version": "0.1.8",
- npm run build
- npm publish
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.15 | ^3.3.9 | ISC | |
| 0.1.14 | ^3.3.4 | ISC | |
| 0.1.13 | ^3.3.4 | ISC | |
| 0.1.12 | ^3.3.4 | ISC | |
| 0.1.11 | ^3.3.4 | ISC | |
| 0.1.10 | ^3.3.4 | ISC | |
| 0.1.9 | ^3.3.4 | ISC | |
| 0.1.8 | ^3.3.4 | ISC | |
| 0.1.7 | ^3.3.4 | ISC | |
| 0.1.6 | ^3.3.4 | ISC | |
| 0.1.5 | ^3.3.4 | ISC | |
| 0.1.3 | ^3.2.47 | ISC | |
| 0.1.2 | ^3.2.47 | ISC | |
| 0.1.1 | ^3.2.47 | ISC | |
| 0.1.0 | ^3.2.47 | ISC | |
| 0.0.9 | ^3.2.47 | ISC | |
| 0.0.8 | ^3.2.47 | ISC | |
| 0.0.7 | ^3.2.47 | ISC | |
| 0.0.6 | ^3.2.47 | ISC | |
| 0.0.5 | ^3.2.47 | ISC | |
| 0.0.4 | ^3.2.47 | ||
| 0.0.3 | ^3.2.47 | ||
| 0.0.2 | ^3.2.47 | ||
| 0.0.1 | ^3.2.47 | ||
| 0.0.0 | ^3.2.47 |