bmp-layout 0.0.11 → 0.0.12

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/bmp-layout.es.js CHANGED
@@ -7849,10 +7849,6 @@ typeof process !== "undefined" ? (_a = process.env) === null || _a === void 0 ?
7849
7849
  const { wsCache: wsCache$2 } = useCache();
7850
7850
  const AccessTokenKey = "ACCESS_TOKEN";
7851
7851
  const RefreshTokenKey = "REFRESH_TOKEN";
7852
- const getAccessToken = () => {
7853
- const accessToken = wsCache$2.get(AccessTokenKey);
7854
- return accessToken ? accessToken : wsCache$2.get("ACCESS_TOKEN");
7855
- };
7856
7852
  const removeToken = () => {
7857
7853
  wsCache$2.delete(AccessTokenKey);
7858
7854
  wsCache$2.delete(RefreshTokenKey);
@@ -7893,12 +7889,7 @@ const useUserStore = defineStore("layout-user", {
7893
7889
  },
7894
7890
  actions: {
7895
7891
  // 从缓存加载用户信息到state
7896
- loadUserFromCacheAction() {
7897
- if (!getAccessToken()) {
7898
- this.resetState();
7899
- return null;
7900
- }
7901
- const userInfo = wsCache$1.get(CACHE_KEY.USER);
7892
+ loadUserFromCacheAction(userInfo) {
7902
7893
  this.permissions = new Set(userInfo.permissions);
7903
7894
  this.roles = userInfo.roles;
7904
7895
  this.user = userInfo.user;
@@ -7906,9 +7897,6 @@ const useUserStore = defineStore("layout-user", {
7906
7897
  wsCache$1.set(CACHE_KEY.USER, userInfo);
7907
7898
  wsCache$1.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus);
7908
7899
  },
7909
- setUserInfoAction(userInfo) {
7910
- wsCache$1.set(CACHE_KEY.USER, userInfo);
7911
- },
7912
7900
  async setUserAvatarAction(avatar) {
7913
7901
  const userInfo = wsCache$1.get(CACHE_KEY.USER);
7914
7902
  this.user.avatar = avatar;
@@ -9377,7 +9365,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
9377
9365
  }, [renderLayout(layout), createVNode(_sfc_main$w, null, null)]);
9378
9366
  }
9379
9367
  });
9380
- const LLayout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e261cf16"]]);
9368
+ const BmpLayout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e261cf16"]]);
9381
9369
  const _sfc_main$d = {
9382
9370
  __name: "ConfigGlobal",
9383
9371
  props: {
@@ -11319,30 +11307,30 @@ function useLayout() {
11319
11307
  };
11320
11308
  }
11321
11309
  export {
11322
- _sfc_main$3 as LAlert,
11323
- _sfc_main$1 as LAnchor,
11324
- _sfc_main$w as LBacktop,
11325
- _sfc_main$6 as LBadge,
11326
- _sfc_main$d as LConfigGlobal,
11327
- createImageViewer as LCreateImageViewer,
11328
- _sfc_main$4 as LDialog,
11329
- _sfc_main$v as LIcon,
11330
- LLayout,
11331
- PageCard as LPageCard,
11332
- PageHeader as LPageHeader,
11333
- _sfc_main$5 as LPagination,
11334
- setI18n as LSetI18n,
11335
- setPinia as LSetPinia,
11336
- Steps as LSteps,
11337
- UploadFile as LUploadFile,
11338
- UploadImg as LUploadImg,
11339
- UploadImgs as LUploadImgs,
11340
- useAppStore as LUseAppStore,
11341
- useAppStoreWithOut as LUseAppStoreWithOut,
11342
- useLayout as LUseLayout,
11343
- usePermissionStore as LUsePermissionStore,
11344
- usePermissionStoreWithOut as LUsePermissionStoreWithOut,
11345
- useUserStore as LUseUserStore,
11346
- useUserStoreWithOut as LUseUserStoreWithOut,
11347
- LLayout as default
11310
+ _sfc_main$3 as BmpAlert,
11311
+ _sfc_main$1 as BmpAnchor,
11312
+ _sfc_main$w as BmpBacktop,
11313
+ _sfc_main$6 as BmpBadge,
11314
+ _sfc_main$d as BmpConfigGlobal,
11315
+ createImageViewer as BmpCreateImageViewer,
11316
+ _sfc_main$4 as BmpDialog,
11317
+ _sfc_main$v as BmpIcon,
11318
+ BmpLayout,
11319
+ PageCard as BmpPageCard,
11320
+ PageHeader as BmpPageHeader,
11321
+ _sfc_main$5 as BmpPagination,
11322
+ setI18n as BmpSetI18n,
11323
+ setPinia as BmpSetPinia,
11324
+ Steps as BmpSteps,
11325
+ UploadFile as BmpUploadFile,
11326
+ UploadImg as BmpUploadImg,
11327
+ UploadImgs as BmpUploadImgs,
11328
+ useAppStore as BmpUseAppStore,
11329
+ useAppStoreWithOut as BmpUseAppStoreWithOut,
11330
+ useLayout as BmpUseLayout,
11331
+ usePermissionStore as BmpUsePermissionStore,
11332
+ usePermissionStoreWithOut as BmpUsePermissionStoreWithOut,
11333
+ useUserStore as BmpUseUserStore,
11334
+ useUserStoreWithOut as BmpUseUserStoreWithOut,
11335
+ BmpLayout as default
11348
11336
  };