tracer-ui

1.0.1 • Public • Published

Tracer-UI

一个使用vite2构建的支持vue3的PC端组件库

安装

//npm
npm install tracer-ui
//yarn
yarn add tracer-ui
//pnpm
pnpm install tracer-ui

全量引入

//main.js
import { createApp } from 'vue'
import App from './App.vue'
import tracer from 'tracer-ui'
import 'tracer-ui/lib/style.css'
createApp(App).use(tracer).mount('#app')

按需引入

安装babel-plugin-tracer

  yarn add  babel-plugin-tracer -D 

babel.config.js 中添加配置

module.exports = {
  plugins: [
      ["babel-plugin-tracer", {
        "cssPath": "tracer-ui/lib/style/{key}.css", 
        "jsPath": "tracer-ui/lib/Tracer.es.js",
        "lib": "tracer-ui" 
    }]
  ]
}

然后在main.js中引入

//main.js
import { createApp } from 'vue'
import App from './App.vue'
import {Button} from 'tracer-ui'
createApp(App).use(Button).mount('#app')

单文件组件中直接使用

<template>
  <t-button>tracer-ui</t-button>
</template> 

Readme

Keywords

none

Package Sidebar

Install

npm i tracer-ui

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

20.2 kB

Total Files

8

Last publish

Collaborators

  • siyueqingchen