1.0.13 • Published 3 years ago

igg-vue-input-select v1.0.13

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

demo

  • Default rander rander

  • Popup open popup

  • Default select select

  • Default select all select-all

  • Default only only

Config Nuxt version

install
npm i igg-vue-input-select

nuxt.config.js file
import path from 'path'
export default {
  ...
  alias: {
    vue$: path.resolve(__dirname, 'node_modules/vue/dist/vue.runtime.esm.js')
  },
  ...
}

plugins file
import Vue from 'vue'
import IggVueInputSelect from 'igg-vue-input-select'
Vue.use(IggVueInputSelect)

css file

// assets/main.scss import to nuxt.config.js
import '~/node_modules/@syncfusion/ej2-base/styles/material.css'
import '~/node_modules/@syncfusion/ej2-inputs/styles/material.css'
import '~/node_modules/@syncfusion/ej2-vue-dropdowns/styles/material.css'
import '~/node_modules/@syncfusion/ej2-buttons/styles/material.css'
import '~/node_modules/igg-vue-input-select/dist/igg-vue-input-select.css'
How to use
<template>
  <igg-vue-input-select
    v-model="value"
    input-box
    :options="options"
    :style="style"
    only-text="only"
    placeholder="select text"
    select-all-text="select all"
    filter-bar-placeholder="search text"
    more-text="more"
  />
</template>

<script>
export default {
  data () {
    return {
      select: null,
      style: {
        '--color': 'rgb(192, 108, 255)',
        '--font-family': '"Kanit", sans-serif'
      },
      options: [
        { text: 'Cabbage', value: 'item1' },
        { text: 'Spinach', value: 'item2' },
        { text: 'Wheat grass', value: 'item3' },
        { text: 'Yarrow', value: 'item4' },
        { text: 'Pumpkins', value: 'item5' },
        { text: 'Chickpea', value: 'item6' },
        { text: 'Green bean', value: 'item7' },
        { text: 'Horse gram', value: 'item8' },
        { text: 'Garlic', value: 'item9' },
        { text: 'Nopal', value: 'item10' },
        { text: 'Onion', value: 'item11' }
      ]
    }
  }
}
</script>

props
PropTypeDefaultDescription
v-modelstring numbernullvalue return value
input-boxboolenfalseuse box style
optionsarray:{text,value,append}[]items select
styleobject {varkey:value}nullpass variable css
only-textstringonlytext select only
select-all-textstringSelect alltext select all
filter-bar-placeholderstringSearch textstext search options
more-textstringmoretext more when truncate
placeholderstringSelect texttext placeholder input
select-all-value-textstringSelect alltext select all options
idstringel-1element id

example options

options: [
  { text: 'Cabbage', value: 'item1', append: 10 },
  { text: 'Spinach', value: 'item2', append: 9 },
  { text: 'Wheat grass', value: 'item3' },
  { text: 'Yarrow', value: 'item4' },
  { text: 'Pumpkins', value: 'item5' },
  { text: 'Chickpea', value: 'item6' },
  { text: 'Green bean', value: 'item7' },
  { text: 'Horse gram', value: 'item8' },
  { text: 'Garlic', value: 'item9' },
  { text: 'Nopal', value: 'item10' },
  { text: 'Onion', value: 'item11' }
]

example style

{
  "--color": "rgb(192, 108, 255)",
  "--font-family": "'Kanit', sans-serif"
}

example v-model

["item1", "item2", ...]

example trick resize popup

...
<igg-vue-input-select
  ref="input-select"
  id="el-1"
  input-box
  v-model="select"
  :style="style"
  :options="options"
/>
...
// trick resize component after mount
this.$refs['input-select'].setResizePopup()
1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.1.0

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago