fast-vue-multi-pages-vite 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -560,7 +560,7 @@ declare class FastVueMultiWindow {
560
560
  /**
561
561
  * 获取实际访问的浏览器地址
562
562
  */
563
- static getRealWindowUrl(): string;
563
+ static getRealWindowUrls(): string[];
564
564
  /**
565
565
  * 设置当前window对象里实际的url地址
566
566
  * @param url
package/dist/index.js CHANGED
@@ -1606,10 +1606,11 @@ var FastVueMultiWindow = class FastVueMultiWindow {
1606
1606
  /**
1607
1607
  * 获取实际访问的浏览器地址
1608
1608
  */
1609
- static getRealWindowUrl() {
1610
- let url = window.location.href;
1611
- if (window["__LOCATION_HREF"]) url = window["__LOCATION_HREF"];
1612
- return url;
1609
+ static getRealWindowUrls() {
1610
+ let urls = [];
1611
+ if (window["__LOCATION_HREF"]) urls.push(window["__LOCATION_HREF"]);
1612
+ urls.push(window.location.href);
1613
+ return urls;
1613
1614
  }
1614
1615
  /**
1615
1616
  * 设置当前window对象里实际的url地址
@@ -1623,13 +1624,24 @@ var FastVueMultiWindow = class FastVueMultiWindow {
1623
1624
  * @param paramName 参数名
1624
1625
  */
1625
1626
  static getWindowUrlParam(paramName) {
1626
- return FastVueMultiHttp.Base.getUrlParam(FastVueMultiWindow.getRealWindowUrl(), paramName);
1627
+ let urls = FastVueMultiWindow.getRealWindowUrls();
1628
+ for (let url of urls) {
1629
+ let value = FastVueMultiHttp.Base.getUrlParam(url, paramName);
1630
+ if (value !== null && value !== void 0) return value;
1631
+ }
1632
+ return null;
1627
1633
  }
1628
1634
  /**
1629
1635
  * 获取地址栏携带的参数对象信息
1630
1636
  */
1631
1637
  static getWindowUrlInfo() {
1632
- return FastVueMultiHttp.Base.getUrlParamInfo(FastVueMultiWindow.getRealWindowUrl());
1638
+ let info = {};
1639
+ let urls = FastVueMultiWindow.getRealWindowUrls();
1640
+ for (let url of urls) {
1641
+ let value = FastVueMultiHttp.Base.getUrlParamInfo(url);
1642
+ if (value !== null && value !== void 0) for (let valueKey in value) info[valueKey] = value[valueKey];
1643
+ }
1644
+ return info;
1633
1645
  }
1634
1646
  /**
1635
1647
  * 设置当前页面是否使用了vue-router
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-vue-multi-pages-vite",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "author": "janesen",
5
5
  "description": "Vite-快速搭建VUE项目工具类的基本库,主要用于多个页面独立生成html",
6
6
  "main": "./dist/index.js",