plugin-taro-components
v0.0.3
Published
plugin-taro-components taro-vue3组件
Downloads
1
Readme
plugin-taro-components
taro+ts组件,支持unplugin-vue-components按需引入
安装
npm i -S plugin-taro-components
引入
方式一 按需手动引入
app.ts引入样式
import 'plugin-taro-components/dist/style.css'//引入样式
vue组件中使用
<template>
<io-input v-model="formData.name" type="text" placeholder="请输入" />
<IoPageList :arr="[1, 2, 3, 4]"></IoPageList>
</template>
import { IoInput, IoPageList } from 'plugin-taro-components'
方式二(推荐使用)基于unplugin-vue-components按需自动引入
npm install -D unplugin-vue-components
config/index.js文件中添加配置
import Components from 'unplugin-vue-components/vite'
import IoTaroResolver from 'plugin-taro-components/resolver'
mini:{
webpackChain(chain) {
chain.plugin('unplugin-vue-components').use(ComponentsPlugin({
resolvers: [IoTaroResolver()]
}));
},
}
发布
- 修改package.json中的version版本号
"version": "0.0.1",
- npm run build
- npm publish