diff --git a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.common.js b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.common.js index d89c49ada7047300651575b888719ccd0d078cf8..b2fdf57dada4787c4e661d64ab5354de1b0afef4 100644 --- a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.common.js +++ b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.common.js @@ -2282,14 +2282,9 @@ var HTML5History = (function (History$$1) { HTML5History.prototype.ensureURL = function ensureURL (push ) { if (getLocation(this.base) !== this.current.fullPath) { var current = cleanPath(this.base + this.current.fullPath); - // fixed by xxxxxx - var location = { - path: current, - params: { - __id__: this.current.params.__id__ - } - }; - push ? pushState(location, location.params.__id__) : replaceState(location, location.params.__id__); + // fixed by xxxxxx + var id = this.current.params.__id__; + push ? pushState(current, id) : replaceState(current, id); } }; diff --git a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.esm.js b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.esm.js index 7071a0589f9f7e62fe8712d255d5e8b28c7f1905..66c36cf43382e853c89931fd446afe11e69ad4b9 100644 --- a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.esm.js +++ b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.esm.js @@ -2280,14 +2280,9 @@ var HTML5History = (function (History$$1) { HTML5History.prototype.ensureURL = function ensureURL (push ) { if (getLocation(this.base) !== this.current.fullPath) { var current = cleanPath(this.base + this.current.fullPath); - // fixed by xxxxxx - var location = { - path: current, - params: { - __id__: this.current.params.__id__ - } - }; - push ? pushState(location, location.params.__id__) : replaceState(location, location.params.__id__); + // fixed by xxxxxx + var id = this.current.params.__id__; + push ? pushState(current, id) : replaceState(current, id); } }; diff --git a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.js b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.js index b3de0b579a9fc63d426ceb861a79caf100ce3436..35d9b7572d90fcee81dc1ce1cd796c6f8fcfedcd 100644 --- a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.js +++ b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.js @@ -2286,14 +2286,9 @@ var HTML5History = (function (History$$1) { HTML5History.prototype.ensureURL = function ensureURL (push ) { if (getLocation(this.base) !== this.current.fullPath) { var current = cleanPath(this.base + this.current.fullPath); - // fixed by xxxxxx - var location = { - path: current, - params: { - __id__: this.current.params.__id__ - } - }; - push ? pushState(location, location.params.__id__) : replaceState(location, location.params.__id__); + // fixed by xxxxxx + var id = this.current.params.__id__; + push ? pushState(current, id) : replaceState(current, id); } }; diff --git a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.min.js b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.min.js index eefcdf7023ced9d239a4ed4691afe85974618202..90a5348eda91157701c36cef3ec36b0461cb1af6 100644 --- a/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.min.js +++ b/packages/vue-cli-plugin-uni/packages/h5-vue-router/dist/vue-router.min.js @@ -3,4 +3,4 @@ * (c) 2020 Evan You * @license MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueRouter=e()}(this,function(){"use strict";function l(t){return-1=e.length?n():e[t]?r(e[t],function(){o(t+1)}):o(t+1)};o(0)}function ct(r){return function(t,e,u){var c=!1,p=0,f=null;pt(r,function(r,t,n,o){if("function"==typeof r&&void 0===r.cid){c=!0,p++;var e,i=lt(function(t){var e;((e=t).__esModule||ht&&"Module"===e[Symbol.toStringTag])&&(t=t.default),r.resolved="function"==typeof t?t:d.extend(t),n.components[o]=t,--p<=0&&u()}),a=lt(function(t){var e="Failed to resolve async component "+o+": "+t;f||(f=l(t)?t:new Error(e),u(f))});try{e=r(i,a)}catch(t){a(t)}if(e)if("function"==typeof e.then)e.then(i,a);else{var s=e.component;s&&"function"==typeof s.then&&s.then(i,a)}}}),c||u()}}function pt(t,r){return ft(t.map(function(e){return Object.keys(e.components).map(function(t){return r(e.components[t],e.instances[t],e,t)})}))}function ft(t){return Array.prototype.concat.apply([],t)}var ht="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function lt(r){var n=!1;return function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(!n)return n=!0,r.apply(this,t)}}var dt=function(t,e){this.router=t,this.base=function(t){if(!t)if(v){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=O,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function yt(t,i,a,e){var r=pt(t,function(t,e,r,n){var o=function(t,e){"function"!=typeof t&&(t=d.extend(t));return t.options[e]}(t,i);if(o)return Array.isArray(o)?o.map(function(t){return a(t,e,r,n)}):a(o,e,r,n)});return ft(e?r.reverse():r)}function vt(t,e){if(e)return function(){return t.apply(e,arguments)}}dt.prototype.listen=function(t){this.cb=t},dt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},dt.prototype.onError=function(t){this.errorCbs.push(t)},dt.prototype.transitionTo=function(t,e,r){var n=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){n.updateRoute(o),e&&e(o),n.ensureURL(),n.ready||(n.ready=!0,n.readyCbs.forEach(function(t){t(o)}))},function(e){r&&r(e),e&&!n.ready&&(n.ready=!0,n.readyErrorCbs.forEach(function(t){t(e)}))})},dt.prototype.confirmTransition=function(r,e,t){var n=this,o=this.current,i=function(e){l(e)&&(n.errorCbs.length?n.errorCbs.forEach(function(t){t(e)}):console.error(e)),t&&t(e)},a=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,function(){e.index=r,e.updateRoute(n)})}},t.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},t.prototype.ensureURL=function(){},t}(dt),jt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=F(t.routes||[],this),this.id=t.id||1,this.minId=t.id||1;var e=t.mode||"hash";switch(this.fallback="history"===e&&!et&&!1!==t.fallback,this.fallback&&(e="hash"),v||(e="abstract"),this.mode=e){case"history":this.history=new mt(this,t.base);break;case"hash":this.history=new _t(this,t.base,this.fallback);break;case"abstract":this.history=new Et(this,t.base)}},Ot={currentRoute:{configurable:!0}};function Ct(e,r){return e.push(r),function(){var t=e.indexOf(r);-1=e.length?n():e[t]?r(e[t],function(){o(t+1)}):o(t+1)};o(0)}function ct(r){return function(t,e,u){var c=!1,p=0,f=null;pt(r,function(r,t,n,o){if("function"==typeof r&&void 0===r.cid){c=!0,p++;var e,i=lt(function(t){var e;((e=t).__esModule||ht&&"Module"===e[Symbol.toStringTag])&&(t=t.default),r.resolved="function"==typeof t?t:d.extend(t),n.components[o]=t,--p<=0&&u()}),a=lt(function(t){var e="Failed to resolve async component "+o+": "+t;f||(f=l(t)?t:new Error(e),u(f))});try{e=r(i,a)}catch(t){a(t)}if(e)if("function"==typeof e.then)e.then(i,a);else{var s=e.component;s&&"function"==typeof s.then&&s.then(i,a)}}}),c||u()}}function pt(t,r){return ft(t.map(function(e){return Object.keys(e.components).map(function(t){return r(e.components[t],e.instances[t],e,t)})}))}function ft(t){return Array.prototype.concat.apply([],t)}var ht="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function lt(r){var n=!1;return function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(!n)return n=!0,r.apply(this,t)}}var dt=function(t,e){this.router=t,this.base=function(t){if(!t)if(v){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=O,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function yt(t,i,a,e){var r=pt(t,function(t,e,r,n){var o=function(t,e){"function"!=typeof t&&(t=d.extend(t));return t.options[e]}(t,i);if(o)return Array.isArray(o)?o.map(function(t){return a(t,e,r,n)}):a(o,e,r,n)});return ft(e?r.reverse():r)}function vt(t,e){if(e)return function(){return t.apply(e,arguments)}}dt.prototype.listen=function(t){this.cb=t},dt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},dt.prototype.onError=function(t){this.errorCbs.push(t)},dt.prototype.transitionTo=function(t,e,r){var n=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){n.updateRoute(o),e&&e(o),n.ensureURL(),n.ready||(n.ready=!0,n.readyCbs.forEach(function(t){t(o)}))},function(e){r&&r(e),e&&!n.ready&&(n.ready=!0,n.readyErrorCbs.forEach(function(t){t(e)}))})},dt.prototype.confirmTransition=function(r,e,t){var n=this,o=this.current,i=function(e){l(e)&&(n.errorCbs.length?n.errorCbs.forEach(function(t){t(e)}):console.error(e)),t&&t(e)},a=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,function(){e.index=r,e.updateRoute(n)})}},t.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},t.prototype.ensureURL=function(){},t}(dt),jt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=F(t.routes||[],this),this.id=t.id||1,this.minId=t.id||1;var e=t.mode||"hash";switch(this.fallback="history"===e&&!et&&!1!==t.fallback,this.fallback&&(e="hash"),v||(e="abstract"),this.mode=e){case"history":this.history=new mt(this,t.base);break;case"hash":this.history=new _t(this,t.base,this.fallback);break;case"abstract":this.history=new Et(this,t.base)}},Ot={currentRoute:{configurable:!0}};function Ct(e,r){return e.push(r),function(){var t=e.indexOf(r);-1