@tuoyuan/web
v1.0.14
Published
拓源前端组件库
Downloads
1,365
Readme
Vue 版本
vue >= 3.2.0
注意:由于 Vue3
不再支持 IE 浏览器环境,TyWeb 也不再支持 IE 浏览器环境。
开发
- 使用
pnpm i
安装依赖。 - 启动预览:
pnpm run dev
。 - 打包组件库:
pnpm run build
,打包目录为packages/dist
。 - 发布:执行
pnpm run publish
发布组件库, 或执行pnpm run release
以使用release-it
发布。
使用
完整引入
// main.ts
import { createApp } from 'vue'
import App from './App.vue'
import TyWeb from '@tuoyuan/web'
import '@tuoyuan/web/es/index.css'
const app = createApp(App)
app.use(TyWeb)
app.mount('#app')
按需加载
// 导入组件
import { Button } from '@tuoyuan/web'
// 导入组件样式文件
import '@tuoyuan/web/es/src/button/styles/index.css'