# mint-select

> 新增使用文档

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

## Install

```sh
npm install mint-select
pnpm add mint-select
yarn add mint-select
bun add mint-select
```

## 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 | 2019-10-10 |
| First published | 2019-10-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 3 |
| Unpacked size | 53.7 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Author | aladdingod |
| Maintainers | aladdingod |

## Links

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

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.5.2
- [axios](https://npm.io/package/axios.md) ^0.19.0
- [mint-ui](https://npm.io/package/mint-ui.md) ^2.2.13

## Recent versions

- 1.0.1 (latest) — 2019-10-10
- 1.0.0 — 2019-10-10

## README

# mint-select

> 基于 mint-ui 和 axios 模仿 ios 选择框，实现二级联动。
> 模仿原声的 select 框在手机端的展示，数据由后台提供。

## Build Setup

```bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test
```

####插件的使用
安装

```
npm install mint-select
```

引入依赖

```
import Vue from 'vue'
import App from './App'
import Mint from 'mint-ui'
Vue.use(Mint)
import 'mint-ui/lib/style.css'
import pickerAndSheets from 'mint-select'
Vue.use(pickerAndSheets)
import axios from 'axios'
Vue.prototype.$axios = axios
```

插件的使用

```
<mintSelect     v-bind:parentData="parentData"
      @func="getModelOrBrand">
    </mintSelect>
```

插件之前的传值

```
export default {
  name: "App",
  components: {},
  data() {
    return {
      parentData: {
        postUrl: "/wx/condition", //第一个select获取数据请求的地址
        subPostUrl: "/wx/getBrandByModel?modelid=", //第二个select获取数据请求的地址
        subShow: true, //是否显示第二个select
        param: {
          test: "123" //第一个 请求所携带的参数，也可以不传默认为{}
        }
      }
    };
  },
  methods: {
    //emit子父组件传值
    //子组件传递给父组件的值，就是选择的select的内容
    getModelOrBrand(data) {
      this.param.brandId = data.brand;
      this.param.modelId = data.model;
    }
  }
};
```

For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

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