1.0.1 • Published 6 years ago

vue-initial-list v1.0.1

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

vue-initial-list

If you are looking for a high-performance vue component that supports incoming Chinese data automatically and alphabetically, you are in the right place.

  • Tiny and very very easy to use.

  • List with high performance.

  • Sort automatically by initials.

Live demos

Simple usage

npm install vue-initial-list or yarn add vue-initial-list
// main.js
import VueInitialList from 'vue-initial-list'
Vue.use(VueInitialList)

// app.js
<template>
    <div>
        <vue-initial-list :options="options" @change="cb"/>
    </div>
</template>

<script>
    export default {
        data () {
            return {
                options: [
                    {
                    name: "上海市",
                    tags: "SHANGHAI,上海市",
                    cityid: 4
                    },
                    {
                    name: "深圳市",
                    tags: "SHENZHEN,深圳市",
                    cityid: 2
                    },
                    {
                    name: "广州市",
                    tags: "GUANGZHOU,广州市",
                    cityid: 3
                    },
                    {
                    name: "武汉市",
                    tags: "WUHAN,武汉市",
                    cityid: 6
                    }
                ]
            }
        },
    }
</script>

Notice

  • The key of the passed in options for sorting attribute values must be name

Props type

PropTypeRequiredDescription
optionsArrayIncoming data list, as long as each object's name attribute is a value for sorting.

Contributions

Welcome to improve vue-initial-list with any issue, pull request or code review.

Changelogs

Maintain and update occasionally, for changes see release.

1.0.1

6 years ago

1.0.0

6 years ago