mirror of https://github.com/ElemeFE/element
delete Select configs
parent
c0b5b32b65
commit
d382d46e06
|
@ -1,80 +0,0 @@
|
||||||
# element-select
|
|
||||||
> A element-select component for Vue.js.
|
|
||||||
|
|
||||||
## dependencies
|
|
||||||
- vue-clickoutside
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
```shell
|
|
||||||
npm i element-select -D
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
```javascript
|
|
||||||
import vue from 'Vue'
|
|
||||||
|
|
||||||
// import component
|
|
||||||
import Component from 'element-select'
|
|
||||||
import 'element-select/lib/style.css'
|
|
||||||
|
|
||||||
Vue.use(Component)
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
```javascript
|
|
||||||
import { ElSelect, ElOption, ElOptionGroup } from 'element-select'
|
|
||||||
|
|
||||||
Vue.component('el-select', ElSelect)
|
|
||||||
Vue.component('el-option', ElOption)
|
|
||||||
Vue.component('el-option-group', ElOptionGroup)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Select Attributes
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
||||||
|---------- |-------------- |---------- |-------------------------------- |-------- |
|
|
||||||
| multiple | 是否多选 | boolean | — | false |
|
|
||||||
| disabled | 是否禁用 | boolean | — | false |
|
|
||||||
| size | 输入框尺寸 | string | large/small/mini | — |
|
|
||||||
| clearable | 单选时是否可以清空选项 | boolean | — | false |
|
|
||||||
| multiple-limit | 多选时用户最多可以选择的项目数,为 0 则不限制 | number | — | 0 |
|
|
||||||
| name | select input 的 name 属性 | string | — | — |
|
|
||||||
| placeholder | 占位符 | string | — | 请选择 |
|
|
||||||
| filterable | 是否可搜索 | boolean | — | false |
|
|
||||||
| allow-create | 是否允许用户创建新条目,需配合 `filterable` 使用 | boolean | — | false |
|
|
||||||
| filter-method | 自定义过滤方法 | function | — | — |
|
|
||||||
| remote | 是否为远程搜索 | boolean | — | false |
|
|
||||||
| remote-method | 远程搜索方法 | function | — | — |
|
|
||||||
| loading | 是否正在从远程获取数据 | boolean | — | false |
|
|
||||||
|
|
||||||
### Select Events
|
|
||||||
| 事件名称 | 说明 | 回调参数 |
|
|
||||||
|---------|---------|---------|
|
|
||||||
| change | 选中值发生变化时触发 | 目前的选中值 |
|
|
||||||
|
|
||||||
### Option Group Attributes
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
||||||
|---------- |-------------- |---------- |-------------------------------- |-------- |
|
|
||||||
| label | 分组的组名 | string | — | — |
|
|
||||||
| disabled | 是否将该分组下所有选项置为禁用 | boolean | — | false |
|
|
||||||
|
|
||||||
### Option Attributes
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
||||||
|---------- |-------------- |---------- |-------------------------------- |-------- |
|
|
||||||
| value | 选项的值 | string/number/object | — | — |
|
|
||||||
| label | 选项的标签,若不设置则默认与 `value` 相同 | string/number | — | — |
|
|
||||||
| disabled | 是否禁用该选项 | boolean | — | false |
|
|
||||||
|
|
||||||
|
|
||||||
## Development
|
|
||||||
```shell
|
|
||||||
make dev
|
|
||||||
|
|
||||||
## test
|
|
||||||
make test
|
|
||||||
|
|
||||||
## build
|
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
# License
|
|
||||||
[MIT](https://opensource.org/licenses/MIT)
|
|
|
@ -1,12 +0,0 @@
|
||||||
import ElSelect from './src/select';
|
|
||||||
import ElOption from './src/option';
|
|
||||||
import ElOptionGroup from './src/option-group';
|
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
export default function(Vue) {
|
|
||||||
Vue.component(ElSelect.name, ElSelect);
|
|
||||||
Vue.component(ElOption.name, ElOption);
|
|
||||||
Vue.component(ElOptionGroup.name, ElOptionGroup);
|
|
||||||
};
|
|
||||||
|
|
||||||
export { ElSelect, ElOption, ElOptionGroup };
|
|
|
@ -1,6 +0,0 @@
|
||||||
var cooking = require('cooking');
|
|
||||||
var gen = require('../../build/gen-single-config');
|
|
||||||
|
|
||||||
cooking.set(gen(__dirname, 'ElSelect', '_index.js'));
|
|
||||||
|
|
||||||
module.exports = cooking.resolve();
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"name": "element-select",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"description": "A el-select component for Vue.",
|
|
||||||
"main": "lib/index.js",
|
|
||||||
"keywords": [
|
|
||||||
"element",
|
|
||||||
"vue",
|
|
||||||
"component"
|
|
||||||
],
|
|
||||||
"author": "qingwei.li<qingwei.li@ele.me>",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/ElemeFE/element/tree/master/packages/select",
|
|
||||||
"devDependencies": {
|
|
||||||
"throttle-debounce": "^1.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue