0.2.2 • Published 5 years ago

vue-connect-search v0.2.2

Weekly downloads
22
License
MIT
Repository
github
Last release
5 years ago

vue-connect-search

simple route search sync manager

install

import Vue from 'vue'
import VueConnectSearch from 'vue-connect-search'

Vue.use(VueConnectSearch)

in your component

when url is [path]?a=3&b=3&c=6 $search will be {a:3,b:'3',c:'6'}

<template>
    <!-- auto merged by route.query && default schema -->
    {{$search}}
</template>

<script>
import { getList } from '@/api/custom-service'
export default {
  connectSearch:{
    schema:{
      a: {type: Number,default: 0},
      b: {type: String,default: ''}
    },
    // will called when query changed (notice when params change,this will NOT trigger)
    onQueryChange(){

    },
    // will trigger when params change
    onParamsChange(){

    }
  }
}
</script>

Development Setup

# install deps
npm install

# serve demo at localhost:8080
npm run dev

# build library and demo
npm run build

# build library
npm run build:library

# build demo
npm run build:demo

License

MIT

Copyright (c) 2018 FlynnLee

0.2.2

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago