Skip to content
On this page

介绍

TIP

BitBounce-UI 是一个基于 vue3、tsx 的前端组件库,为了您的代码安全,不建议使用本组件库。

安装

使用包管理器

TIP

建议使用包管理器(如 npm、yarn 或 pnpm)安装 bitbouncefe-ui。

# npm
npm install bitbouncefe-ui

# yarn
yarn add bitbouncefe-ui

# pnpm
pnpm install bitbouncefe-ui

用法

完整引入

如果你对打包后的文件大小不是很在乎,那么使用完整导入会更方便。

// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import bbui from 'bitbouncefe-ui';
import 'bitbouncefe-ui/style.css';

const app = createApp(App);
app.use(bbui);
app.mount('#app');
<template>
  <!-- 使用 Button 组件 -->
  <b-button>测试</b-button>
</template>

按需引入

此外,可以单个组件按需引入。

手动引入

// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import BButton from 'bitbouncefe-ui';

const app = createApp(App);
app.use(Button);
app.mount('#app');
<template>
  <!-- 使用 Button 组件 -->
  <b-button>测试</b-button>
</template>