# @xbl113lbw/my_components

> ## 通过 npm 安装 ``` npm i @xbl113lbw/my_components ```

Latest version **1.0.1** (published 2020-11-10) · 0 weekly downloads

## Install

```sh
npm install @xbl113lbw/my_components
pnpm add @xbl113lbw/my_components
yarn add @xbl113lbw/my_components
bun add @xbl113lbw/my_components
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-11-10 |
| First published | 2020-11-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 326.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xbl113lbw |
| Maintainers | xbl113lbw |

## Links

- npm: https://www.npmjs.com/package/@xbl113lbw/my_components
- npm.io page: https://npm.io/package/@xbl113lbw/my_components

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^3.0.0
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Recent versions

- 1.0.1 (latest) — 2020-11-10
- 1.0.0 — 2020-11-10

## README

# vue3测试组件库

## 通过 npm 安装
```
npm i @xbl113lbw/my_components
```

## 引入组件
```
import {Toast} from "@xbl113lbw/my_components";
import "@xbl113lbw/my_components/lib/bw_ui_meta.css"

const app = createApp(App);

app.use(Toast);
```

### 基础组件
```
Toast, Loading, Swiper, Stepper, Switch, Uploader, NavBar

```

### Toast
```
let toast = inject("$toast");

const show = () => {
    toast.show("请稍后...");
}

return {
    show,
}

或者

this.$toast.show("请稍后...");

show 的第二个参数是 delay，可以设置显示时间
hide 为隐藏，用法一样
```

### Loading
```
let toast = inject("$loading");

const showLoading = () => {
    loading.show();
}

return {
    showLoading,
}

hide 为隐藏，用法一样（loading.hide()）
```

### Swiper
```
<my-swiper>
    <swiperItem>1</swiperItem>
    <swiperItem>2</swiperItem>
    <swiperItem>3</swiperItem>
    <swiperItem>4</swiperItem>
    <swiperItem>5</swiperItem>
</my-swiper>
```

### Stepper
```
<my-stepper @change="stepperChange"></my-stepper>
```

### Switch
```
<my-switch @change="switchChange" v-model="switch_model"></my-switch>
```

### Uploader
```
<my-uploader :after-read="afterRead"></my-uploader>
```

### NavBar
```
<my-navBar title="标题" leftText="返回" rightText="按钮"
                   @left-click="leftClick"
                   @right-click="rightClick">
</my-navBar>

可通过插槽自定义内容
<my-navBar title="标题">
    <template #left>
        ...    
    <template>
    <template #right>
        ...    
    <template>     
</my-navBar>

```

---
_Source: https://npm.io/package/@xbl113lbw/my_components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
