1.0.14 • Published 8 years ago

ciao-vue-select v1.0.14

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

ciao-vue-select

Pure Vue.js Select

Dependencies

  • Vue 2.x
  • Vue2-Filters
  • Bootstrap 3.x
  • Font-Awesome 4.x

Dev-Dependencies

  • vue-cli
  • node-sass
  • sass-loader

Install

yarn install ciao-vue-select

Usage

Template

<form-select :options="options" v-model="value"></form-select>

Vue

import ciaoVueSelect from 'ciao-vue-select'
export default {
  data: function() {
    return {
     value: ['javascript', 'vue', 'css'],
     options: [
       { label: 'HTML', value: 'html' },
       { label: 'CSS', value: 'css' },
       { label: 'SASS', value: 'sass' },
       { label: 'Bootstrap', value: 'bootstrap' },
       { label: 'JavaScript', value: 'javascript' },
       { label: 'Vue.js', value: 'vue' },
       { label: 'Yarn', value: 'yarn' },
       { label: 'Webpack', value: 'webpack' }
     ] 
    }
  },
  components: {
    'form-select': ciaoVueSelect
  }
}

Style

You can choice select style by using prop color.

There has 4 style can use (blue, green, orange, red).

Blue is default style.

Example

<form-select :options="options" v-model="value" :color="'orange'"></form-select>

Limit max

You can limit data amount by using prop max.

Example

<form-select :options="options" v-model="value" :max="3"></form-select>

Use specify property name

You can use specify label's or value's property name

Template

<form-select :options="options" v-model="value" :labelKey="'name'" :valueKey="'id'"></form-select>

Data

data: function() {
  return {
   value: ['javascript', 'vue', 'css'],
   options: [
     { name: 'HTML', id: 'html' },
     { name: 'CSS', id: 'css' },
     { name: 'SASS', id: 'sass' },
     { name: 'Bootstrap', id: 'bootstrap' },
     { name: 'JavaScript', id: 'javascript' },
     { name: 'Vue.js', id: 'vue' },
     { name: 'Yarn', id: 'yarn' },
     { name: 'Webpack', id: 'webpack' }
   ] 
  }
},
1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago