# vue3-multiple-choice

> choose list items with `ctrl` and `shift`

Latest version **0.0.6** (published 2022-07-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue3-multiple-choice
pnpm add vue3-multiple-choice
yarn add vue3-multiple-choice
bun add vue3-multiple-choice
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2022-07-14 |
| First published | 2022-07-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | adios133 |
| Maintainers | adios133 |
| Keywords | ctrl, shift |

## Links

- npm: https://www.npmjs.com/package/vue3-multiple-choice
- npm.io page: https://npm.io/package/vue3-multiple-choice

## Recent versions

- 0.0.6 (latest) — 2022-07-14
- 0.0.5 — 2022-07-09
- 0.0.4 — 2022-07-09
- 0.0.3 — 2022-07-08
- 0.0.2 — 2022-07-08
- 0.0.1 — 2022-07-08

## README

#### description

choose list items with `ctrl` and `shift`

#### Usage

```js
// main.js
import { createApp } from "vue"
import {MultipleChoice} from "vue3-multiple-choice"
import 'vue3-multiple-choice/style.css'

const app = createApp(App)
app.use(MultipleChoice)
```



```vue

// component
<script setup >
import { reactive } from "vue"
const testList = reactive([])
const containerStyle = {
  display:"flex"
}
const defaultKeys = ["fff1"]
const selectKeys = reactive([])
</script>


<template>
  <MultipleChoice 
    v-model:selectedKeys="selectKeys"
    :dataSource="testList"
    :defaultKeys="defaultKeys"
    :containerStyle="containerStyle"
  >
    <template #item="{ itemData,isActived }">
      <div :class="{actived:isActived}">
        <!-- slot  -->
      </div>
    </template>
  </MultipleChoice>
</template>

.actived {
  /* your custom actived style   */
}
```

#### api

`dataSource`: your data list, every item required a unique string `key`, eg:

```js
//item 
{
    key:'123',
    // ...
}
```

`containerStyle`: container style object.

`defaultKeys`: default selected keys.

`selectedKeys`: selected keys.

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