# element-plus-region-select

> A region selector for element-plus

Latest version **0.1.1** (published 2021-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install element-plus-region-select
pnpm add element-plus-region-select
yarn add element-plus-region-select
bun add element-plus-region-select
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2021-12-24 |
| First published | 2021-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 99.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sky Chen |
| Maintainers | icksky |

## Links

- npm: https://www.npmjs.com/package/element-plus-region-select
- Repository: https://github.com/icksky/element-plus-region-select
- Homepage: https://github.com/icksky/element-plus-region-select#readme
- Issues: https://github.com/icksky/element-plus-region-select/issues
- npm.io page: https://npm.io/package/element-plus-region-select

## Recent versions

- 0.1.1 (latest) — 2021-12-24
- 0.1.0 — 2021-12-24

## README

# element-plus-region-select

[![npm](https://img.shields.io/npm/v/element-plus-region-select)](https://www.npmjs.com/package/element-plus-region-select)

[element-plus](https://github.com/element-plus/element-plus) 的地区选择器.

地区数据来自 [china-area-data](https://github.com/airyland/china-area-data).

## 安装

```bash
yarn add element-plus-region-select
# or npm
# npm install element-plus-region-select
```

## 属性

除了 `ElCascader` 和 `ElCascaderPanel` 的全部属性/方法/事件外, 还支持以下属性:

| 属性 | 类型 | 默认值 | 说明 |
| -- | -- | -- | -- |
| modelValue / v-model | string \| number \| array | - | 绑定值 |
| panel | boolean | - | 是否使用 `ElCascaderPanel` |
| useArrayValue | boolean | - | 默认 `modelValue` 返回最后一级的字符串结果, 为 `true` 时返回数组结果 |
| depth | 1 \| 2 \| 3 | 3 | 选择到哪一级, 分别为省/市/区 |

## 使用

```html
<!-- 省市区 -->
<region-select v-model="region" />
<!-- '130105' -->

<!-- 省市区, 返回数组结果 -->
<region-select v-model="region" use-array-value />
<!-- ['13000', '130100', '130105'] -->

<!-- 省市, 返回数组结果 -->
<region-select v-model="region" use-array-value :depth="2" />
<!-- ['13000', '130100'] -->
```

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