# ztvueui

> 使用：

Latest version **0.1.5** (published 2019-03-22) · 0 weekly downloads

## Install

```sh
npm install ztvueui
pnpm add ztvueui
yarn add ztvueui
bun add ztvueui
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2019-03-22 |
| First published | 2019-03-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 692 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | zt |
| Maintainers | tian9651 |

## Links

- npm: https://www.npmjs.com/package/ztvueui
- npm.io page: https://npm.io/package/ztvueui

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.6
- [vue-router](https://npm.io/package/vue-router.md) ^3.0.1

## Recent versions

- 0.1.5 (latest) — 2019-03-22
- 0.1.4 — 2019-03-19
- 0.1.3 — 2019-03-19
- 0.1.2 — 2019-03-19

## README

#这是一个移动端的vue 的ui插件
使用：

- 2安装
>npm install --save ztvueui

- 3使用
```js
// main.js中
import plugin from 'ztvueui'
Vue.use(plugin)
```

## toast插件

```js
// 在App.vue中
mounted() {
  this.$ht_toast.txt({
    content: '复制成功',
    // 其他参数
    // mask: true|false, 遮罩
    // autoClose: true|false, toast自动关闭
    // direction: 'top'|'bottom', 不传是中间
  });
}
```

```js
// 在组件外使用，例如 request.js文件
import { Toast } from '@hetao/market-ui';

Toast.txt({
  content: '班级尚未开启预约报名活动'
});

```

## modal插件
1, 只有一个按钮alert
```js
mounted() {
  this.$ht_modal.alert({
    // 默认参数
    title: '',   // 标题,不传是空
    content: '', // 内容,不传是空
    callback() { }, // 按钮回调
    closeShow: false, // 右上角x,不传是false
    btnTxt: '我知道了' // 按钮文字,不传是'我知道了'
    mask: false, // 底层遮罩,不传是false
  });
}
```

2, 两个按钮confirm
```js
mounted() {
  this.$ht_modal.confirm({
    title: '标题', // 不传是空
    content: '内容', // 不传是空
    leftBtnTxt: '左边按钮文字', // 不传是"取消"
    rightBtnTxt: '右边按钮文字',// 不传是"确定"
    leftCallback() { // 左边按钮的回调
      console.log('left');
    },
    rightCallback() { // 右边按钮的回调
      console.log('right');
    },
    closeShow: false, // 右上角x,不传是false
    mask: false, // 底层遮罩,不传是false
  });
}
```

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