🕶 Vue Composition API for automatic fetch data when condition has been changed

Overview

vue-condition-watcher 🕶

CircleCI vue3 vue3 npm npm bundle size npm

Introduction

Vue Composition API for automatic fetch data when condition has been changed

Features

✔ Auto fetch data when conditions changed.
✔ Auto filtter falsy value in conditions.
✔ Auto convert the corresponding type. (string, number, array, date)
✔ Store the conditions within the URL hash every time a condition is changed
✔ Sync the state with the query string and initialize off of that and that back/forward/refresh work.
✔ Support Vue2 @vue/composition-api

👉 Download Vue3 example here (Use Vite)

$ cd examples/vue3
$ yarn 
$ yarn serve

👉 Download Vue2 @vue/composition-api example here

$ cd examples/vue2
$ yarn 
$ yarn serve

👉 Online demo with vue-infinite-scroll

Edit vue-condition-watcher demo


export default {
  directives: { infiniteScroll },
  setup() {
    const items = ref([])

    const config = {
      fetcher: api.addBox,
      conditions: {
        offset: 0,
        limit: 10
      },
      afterFetch(data) {
        if (!data) return
        items.value = items.value.concat(data)
      }
    }
    
    const { conditions, loading } = useConditionWatcher(config)

    const loadMore = () => {
      if (loading.value) return
      conditions.offset += conditions.limit
    }

    return {
      conditions,
      loading,
      items,
      loadMore
    }
  }
}

Quick Start

Simple example for vue-next and vue-router-next

createApp({
  template: `
    <div class="filter">
      <input v-model="conditions.name">
      <button @click="refresh">Refresh</button>
    </div>
    <div class="container" v-if="!loading">
      {{ data }}
    </div>
    <div class="loading" v-else>Loading...</div>
  `,
  setup() {
    const config = {
      fetcher: params => axios.get('/user/', {params}),
      conditions: {
        name: ''
      },
    }
    return useConditionWatcher(config, {sync: 'router'})
  },
})
.provide('router', router)
.use(router)
.mount(document.createElement('div'))

Usage

In your project

$ yarn add vue-condition-watcher

Or with npm

$ npm install vue-condition-watcher

CDN

https://unpkg.com/vue-condition-watcher/dist/index.js

API

const { conditions, data, error, loading, refresh } = useConditionWatcher(config, queryOptions)

Parameters

  • config : An object of config for vue-condition-watcher
    • fetcher ( ⚠️ Required) : Can be any asynchronous function to fetch data

    • conditions ( ⚠️ Required) : An object of conditions, also be initial value

    • defaultParams: An object of fetcher's default parameters

    • beforeFetch: A function you can do before fetch data Parameters

    • afterFetch: A function you can do after fetch data. Parameters: data.

      const config = {
        fetcher: params => axios.get('url', { params }),
      
        defaultParams: {
          type: 'member'
        },
      
        conditions: {
          offset: 0,
          limit: 10,
          username: '',
          tags: [],
          created_at: new Date()
        },
      
        beforeFetch: conditions => {
          // conditions is an object clone copy from config.conditions
          conditions.created_at = dayjs(conditions.created_at, 'YYYY-MM-DD');
          return conditions
        },
        afterFetch(data) {
          console.log(data)
        }
      }
  • queryOptions: An object of options to sync query string with conditions
    • ⚠️ queryOptions work base on vue-router, you need install vue-router first.

    • sync: key of provide name ( String | Symbol )

      • main.js: register router
        import {createApp} from 'vue'
        import App from './App.vue'
        import { router } from './router'
      
        const app = createApp(App)
          .provide('router', router) // it's should be required
          .use(router)
          .mount('#app')
      • then
      useConditionWatcher(config, {sync: 'router'})
    • ignore: you can ignore key name from conditions, will not push with query.

      useConditionWatcher(config, {sync: 'router', ignore: ['offset', 'limit']})
      How to use in vue@2 with @vue/composition-api
      • ( Good ) Add provide in main.js
        new Vue({
          el: '#app',
          router,
          store,
          provide: {
            router
          },
          render: h => h(App)
        })
      • Add provide in current file
        import { useConditionWatcher } from "vue-condition-watcher";
        import { provide } from "@vue/composition-api";
        import router from "@/router";
        import api from "../api";
        
        export default {
          setup() {
            provide("router", router);
        
            const config = {
              fetcher: api.users,
              conditions: {
                offset: 0,
                limit: 9
              }
            };
        
            return useConditionWatcher(config, {sync: 'router', ignore: ['offset', 'limit']});
          }
        };

Return Values

  • reactive : An object and returns a reactive proxy of conditions
  • data: Data resolved by config.fetcher
  • error: Error thrown by config.fetcher
  • loading: Request is loading
  • refresh: A function to re-fetch data
Comments
  • chore(afterFetch & beforeFetch): improve types

    chore(afterFetch & beforeFetch): improve types

    Changes

    1. Sync afterFetch Fn return type to finally data type
    • before
    截圖 2022-04-14 下午4 34 38
    • after
    截圖 2022-04-14 下午4 34 23
    1. Update generics orders
    • before: <Cond, Result>
    • after: <Result, Cond, AfterResult, AfterCond>
    opened by jedy05097952 0
  • chore(deps): bump minimist from 1.2.5 to 1.2.6

    chore(deps): bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump nanoid from 3.1.30 to 3.2.0

    chore(deps): bump nanoid from 3.1.30 to 3.2.0

    Bumps nanoid from 3.1.30 to 3.2.0.

    Changelog

    Sourced from nanoid's changelog.

    Change Log

    This project adheres to Semantic Versioning.

    3.2

    • Added --size and --alphabet arguments to binary (by Vitaly Baev).

    3.1.32

    • Reduced async exports size (by Artyom Arutyunyan).
    • Moved from Jest to uvu (by Vitaly Baev).

    3.1.31

    • Fixed collision vulnerability on object in size (by Artyom Arutyunyan).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump tmpl from 1.0.4 to 1.0.5

    chore(deps): bump tmpl from 1.0.4 to 1.0.5

    Bumps tmpl from 1.0.4 to 1.0.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump ws from 5.2.2 to 5.2.3

    chore(deps): bump ws from 5.2.2 to 5.2.3

    Bumps ws from 5.2.2 to 5.2.3.

    Release notes

    Sourced from ws's releases.

    5.2.3

    Bug fixes

    • Backported 00c425ec to the 5.x release line (76d47c14).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump glob-parent from 5.1.1 to 5.1.2

    chore(deps): bump glob-parent from 5.1.1 to 5.1.2

    Bumps glob-parent from 5.1.1 to 5.1.2.

    Release notes

    Sourced from glob-parent's releases.

    v5.1.2

    Bug Fixes

    Changelog

    Sourced from glob-parent's changelog.

    5.1.2 (2021-03-06)

    Bug Fixes

    6.0.0 (2021-05-03)

    ⚠ BREAKING CHANGES

    • Correct mishandled escaped path separators (#34)
    • upgrade scaffold, dropping node <10 support

    Bug Fixes

    • Correct mishandled escaped path separators (#34) (32f6d52), closes #32

    Miscellaneous Chores

    • upgrade scaffold, dropping node <10 support (e83d0c5)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9

    chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9

    Bumps hosted-git-info from 2.8.8 to 2.8.9.

    Changelog

    Sourced from hosted-git-info's changelog.

    2.8.9 (2021-04-07)

    Bug Fixes

    Commits
    Maintainer changes

    This version was pushed to npm by nlf, a new releaser for hosted-git-info since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump lodash from 4.17.19 to 4.17.21

    chore(deps): bump lodash from 4.17.19 to 4.17.21

    Bumps lodash from 4.17.19 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • ded9bc6 Bump to v4.17.20.
    • 63150ef Documentation fixes.
    • 00f0f62 test.js: Remove trailing comma.
    • 846e434 Temporarily use a custom fork of lodash-cli.
    • 5d046f3 Re-enable Travis tests on 4.17 branch.
    • aa816b3 Remove /npm-package.
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump y18n from 4.0.0 to 4.0.1

    chore(deps): bump y18n from 4.0.0 to 4.0.1

    Bumps y18n from 4.0.0 to 4.0.1.

    Changelog

    Sourced from y18n's changelog.

    Change Log

    All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

    5.0.5 (2020-10-25)

    Bug Fixes

    5.0.4 (2020-10-16)

    Bug Fixes

    • exports: node 13.0 and 13.1 require the dotted object form with a string fallback (#105) (4f85d80)

    5.0.3 (2020-10-16)

    Bug Fixes

    • exports: node 13.0-13.6 require a string fallback (#103) (e39921e)

    5.0.2 (2020-10-01)

    Bug Fixes

    5.0.1 (2020-09-05)

    Bug Fixes

    5.0.0 (2020-09-05)

    ⚠ BREAKING CHANGES

    • exports maps are now used, which modifies import behavior.
    • drops Node 6 and 4. begin following Node.js LTS schedule (#89)

    Features

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by oss-bot, a new releaser for y18n since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump lodash from 4.17.15 to 4.17.19

    chore(deps): bump lodash from 4.17.15 to 4.17.19

    Bumps lodash from 4.17.15 to 4.17.19.

    Release notes

    Sourced from lodash's releases.

    4.17.16

    Commits
    Maintainer changes

    This version was pushed to npm by mathias, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Prevent other query parameters from being overwritten

    Prevent other query parameters from being overwritten

    Is it possible to have vue-condition-watcher not overwrite query params from other vue-condition-watcher instances? For example i have a data-table component wich makes use of vue-condition-watcher but i also build a sibling component for defining filter criteria which also syncs its values to query parameters. Right now vue-condition-watcher removes all query parameters which are not defined in conditions.

    question 
    opened by goldelehr 0
Releases(2.0.0-beta.2)
  • 2.0.0-beta.2(Nov 30, 2022)

    What's Changed

    • feat: improve mutate function type

    Full Changelog: https://github.com/runkids/vue-condition-watcher/compare/2.0.0-beta.0...2.0.0-beta.2

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta.1(Jul 17, 2022)

    What's Changed

    • fix: beforeFetch type
    • fix: resetConditions only assign value if property exists
    • chore: modify peerDependencies

    Full Changelog: https://github.com/runkids/vue-condition-watcher/compare/2.0.0-beta.0...2.0.0-beta.1

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta.0(Jul 17, 2022)

    This is the first 2.0 beta version. Still change until the stable release. Documentation will also be updated once stable.

    Breakings

    loading is renamed to isLoading

    - const { loading } = useConditionWatcher({...})
    + const { isLoading } = useConditionWatcher({...})
    

    Change export to export default

    - import { useConditionWatcher } from 'vue-condition-watcher'
    + import useConditionWatcher from 'vue-condition-watcher'
    

    What's Changed

    • chore: Switch to pnpm & turborepo & vitest
    • breaking: rename loading to isLoading
    • fix: beforeFetch receive conditions type

    Full Changelog: https://github.com/runkids/vue-condition-watcher/compare/1.4.7...2.0.0-beta.0

    Source code(tar.gz)
    Source code(zip)
Transforms Vue.js 2.0 SFCs to Vue.js 3.0 Composition API syntax.

vue2-migration-helper Transforms Vue.js SFCs to composition api syntax. Install npm i vue2-migration-helper CLI # convert all .vue files in source dir

Muhammad Ubaid Raza 26 Nov 1, 2022
🛠️Vue kit of useful Vue Composition API functions

??️ Vue kit of useful Vue Composition API functions.

Salvatore Tedde 44 Jan 2, 2023
Use Vue Composition API Right Now (WIP)

Vue Use Use Vue Composition API Right Now. Note: Currently only Vue.js 2.x is supported. Since Vue.js has released a beta version of 3.0, this library

FE Next 26 Jul 7, 2022
A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.

?? vue-concurrency Inspired by ember-concurrency. A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition

Martin Malinda 268 Dec 26, 2022
🍍Automatically Typed, Modular and lightweight Store for Vue using the composition api with DevTools support

??Automatically Typed, Modular and lightweight Store for Vue using the composition api with DevTools support

Eduardo San Martin Morote 9.5k Dec 30, 2022
Collection of essential Vue Composition Utilities for Vue 2 and 3

Collection of essential Vue Composition Utilities ?? Features ?? Interactive docs & demos ?? Seamless migration: Works for both Vue 3 and 2 ⚡ Fully tr

VueUse 96 Dec 23, 2022
A Vue composition function that makes infinite scroll a breeze.

vue-use-infinite-scroll Installation npm i -S vue-use-infinite-scroll Usage template <div> <span>{{ errorMessageRef }}</span> <ul> <li

Andrea Simone Costa 110 Nov 12, 2022
Collection of utility composition functions for Vue

Extensive collection of composition functions for Vue

Justin Brooks 89 Nov 26, 2022
Vue Json Pretty - A Vue component for rendering JSON data as a tree structure.

Vue Json Pretty A Vue component for rendering JSON data as a tree structure. Now it supports Vue3 at least. If you still use Vue2, see 1.x. English |

Daniel 792 Dec 30, 2022
Vue mixin that maps props to local data

Props To Local Works with: This mixin will sync down properties to local data. This allows defining a property that can be changed within the componen

Cristian Pallarés 6 Jan 2, 2022
Async data loading plugin for Vue.js

Async data loading plugin for Vue.js

vuejs 420 Nov 24, 2022
Download your JSON data as an XLS or CSV file directly from the browser

JSON to Excel for VUE 2 Download your JSON data as an Excel file directly from the browser. This component is based on the solution proposed on this t

DockerLead 0 Aug 17, 2021
Vue Use Utilities build on top of vue-demi & @vue/compostion-api

Vue Use Utilities Vue Use Utilities build on top of vue-demi & @vue/compostion-api. It works both for Vue 2 & 3. ✨ Features ?? Composable Utilities ??

Vue Blocks 28 Dec 12, 2022
A plugin that provides a composable API for giving elements a fixed aspect ratio.

@tailwindcss/aspect-ratio A plugin that provides a composable API for giving elements a fixed aspect ratio. Installation Install the plugin from npm:

Tailwind Labs 758 Dec 26, 2022
Internationalization plugin for Vue.js - fluent-vue is Vue.js integration for Fluent.js

Internationalization plugin for Vue.js - fluent-vue is Vue.js integration for Fluent.js

Ivan Demchuk 164 Dec 28, 2022
🤲 Use Vue 3's Fragment feature in Vue 2 to return multiple root elements

?? Vue 2 fragment directive to return multiple root elements

hiroki osame 180 Dec 22, 2022
The word highlighter library for Vue 2 and Vue 3.

The word highlighter library for Vue 2 and Vue 3.

ryo 122 Jan 3, 2023
Leon L. 4 Nov 8, 2022
JSX for Vue 3 - Babel Plugin JSX for Vue 3.0

JSX for Vue 3 - Babel Plugin JSX for Vue 3.0

vuejs 1.5k Jan 3, 2023