vue-router-gray

0.1.12 • Public • Published

vue-router-gray

基于vue-router的灰度发布策略

使用

import vueRouterGray from 'vue-router-gray';
const router = new VueRouter({});
vueRouterGray(router, {
  check(params) {
    /*{
      protocol: location.protocol,
      host: location.host,
      path: location.pathname,
      search: location.search,
      hash: location.hash,
    }*/
    return new Promise((done) => {
      setTimeout(() => done({
        grayUrl: 'https://xxxx.com/gray/xxx'
      }), 400);
    });
  },
});

/vue-router-gray/

    Package Sidebar

    Install

    npm i vue-router-gray

    Weekly Downloads

    7

    Version

    0.1.12

    License

    MIT

    Last publish

    Collaborators

    • kylen8036
    • wxnet