# @chenzr/week-time-picker

> 周内时间段选择组件

Latest version **0.2.2** (published 2022-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chenzr/week-time-picker
pnpm add @chenzr/week-time-picker
yarn add @chenzr/week-time-picker
bun add @chenzr/week-time-picker
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2022-02-07 |
| First published | 2022-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 52.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | zhunrong |
| Maintainers | chenzr |

## Links

- npm: https://www.npmjs.com/package/@chenzr/week-time-picker
- Repository: https://github.com/zhunrong/week-time-picker
- Homepage: https://github.com/zhunrong/week-time-picker#readme
- Issues: https://github.com/zhunrong/week-time-picker/issues
- npm.io page: https://npm.io/package/@chenzr/week-time-picker

## Recent versions

- 0.2.2 (latest) — 2022-02-07
- 0.2.1 — 2022-02-07
- 0.2.0 — 2022-01-28
- 0.1.0 — 2022-01-28

## README

# week-time-picker

![组件展示](./demo.png)

该组件用于方便、快捷地选取周一至周日每天的时段，可以用于以一周为周期的任务调度/执行系统

## 使用方法

安装

```
npm install -S @chenzr/week-time-picker
```

全局注册

```typescript
import Vue from 'vue';
import WeekTimePicker from '@chenzr/week-time-picker';
import '@chenzr/week-time-picker/libs/week-time-picker.css';

Vue.use(WeekTimePicker);
```

局部注册

```vue
<template>
  <div :style="{width:'400px',height:'400px'}">
    <week-time-picker v-model="value" />
  </div>
</template>

<script>
import WeekTimePicker from '@chenzr/week-time-picker';
import '@chenzr/week-time-picker/libs/week-time-picker.css';

export default {
  components: {
    WeekTimePicker,
  },
  data() {
    return {
      value: null
    }
  }
}
</script>
```

## API

### 属性

属性 | 说明 | 类型 | 默认值
-----|-----|------|------
value（v-model） | 组件的值 | object | null

value的具体格式示例
```js
{
  mon: ["08:00-12:00", "14:00-15:30"],
  tue: ["08:00-12:00"],
  wed: ["08:00-12:00"],
  thu: ["08:00-12:00"],
  fri: ["08:00-12:00"],
  sat: ["08:00-12:00"],
  sun: ["08:00-12:00"]
}
```

### 事件

事件名 | 说明 | 回调参数
------|------|---------
change | 数据更新时触发 | function(value)

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