@pubinfo/core 2.0.0-beta.1 → 2.0.0-beta.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.
Files changed (460) hide show
  1. package/{es/AppSetting-BXQHV5F8.js → dist/AppSetting-C8JYYwjf.js} +16 -16
  2. package/{es/HCheckList.vue_vue_type_script_setup_true_lang-DanhyVxU.js → dist/HCheckList.vue_vue_type_script_setup_true_lang-pGv1_kD7.js} +2 -2
  3. package/{es/PreferencesContent-CQkwkQ_1.js → dist/PreferencesContent-C49d-vmJ.js} +46 -46
  4. package/{es/SettingBreadcrumb-Bp_66IFN.js → dist/SettingBreadcrumb-C-yAQx2V.js} +2 -2
  5. package/{es/SettingCopyright-BPSnoTQb.js → dist/SettingCopyright-DqBATcFr.js} +1 -1
  6. package/{es/SettingEnableTransition-Rx2-0Wxj.js → dist/SettingEnableTransition-Dbxyx29L.js} +1 -1
  7. package/{es/SettingHome-BW27PQqs.js → dist/SettingHome-CMZmM_CF.js} +1 -1
  8. package/{es/SettingMenu-D5gdNfal.js → dist/SettingMenu-BVMQeUIl.js} +2 -2
  9. package/{es/SettingMode-B4_HGVez.js → dist/SettingMode-B5sHVxPV.js} +1 -1
  10. package/{es/SettingNavSearch-CRovYxzh.js → dist/SettingNavSearch-DLK9gQZj.js} +1 -1
  11. package/{es/SettingOther-D0zo11vM.js → dist/SettingOther-C_SGwGP9.js} +1 -1
  12. package/{es/SettingPage-B8GHuoKV.js → dist/SettingPage-B21udtFQ.js} +1 -1
  13. package/{es/SettingTabbar-Cn_QzvA8.js → dist/SettingTabbar-Cw4Y_0aT.js} +2 -2
  14. package/{es/SettingThemes-D_DpEncn.js → dist/SettingThemes-BiMTS-Jm.js} +2 -2
  15. package/{es/SettingToolbar-Csl2gnfi.js → dist/SettingToolbar-DFYHdt5Y.js} +1 -1
  16. package/{es/SettingTopbar-CaHjQULM.js → dist/SettingTopbar-DV9I8JAn.js} +2 -2
  17. package/{es/SettingWidthMode-BGiP7gTw.js → dist/SettingWidthMode-DBT0vpbI.js} +1 -1
  18. package/{es/TopThinMode-DWm0oY5Y.js → dist/TopThinMode-Bhe61DqD.js} +1 -1
  19. package/{es/_...all_-DI_QAUox.js → dist/_...all_-DdTUTYRx.js} +1 -1
  20. package/{es/colors-oRlAXMUC.js → dist/colors-DIxsmpcn.js} +1 -1
  21. package/{lib → dist}/components/PubinfoProvider/index.d.ts +1 -0
  22. package/{lib → dist}/composables/auth.d.ts +1 -1
  23. package/{es/index-ChOUZNbk.js → dist/index-B3IukB6_.js} +2 -2
  24. package/{es/index-Dav3jQVP.js → dist/index-BSsKIigI.js} +2 -2
  25. package/{es/index-B9I6Pru6.js → dist/index-BmLVBGQQ.js} +12 -12
  26. package/{es/index-P2cA5UeU.js → dist/index-Bq0l9LxQ.js} +4 -4
  27. package/{es/index-BHkrq701.js → dist/index-BtEsIJvE.js} +21 -21
  28. package/{es/index-D8eeneI_.js → dist/index-C6wl3PFA.js} +22 -22
  29. package/{es/index-BvVAS3S-.js → dist/index-ClFzex_G.js} +14 -8
  30. package/{es/index-BkqnOkyO.js → dist/index-Dfo6jPsW.js} +1 -1
  31. package/{es/index-DvHnVMX5.js → dist/index-Dkz4hXeC.js} +2119 -2122
  32. package/{es → dist}/index.js +25 -26
  33. package/{es/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-BBe8CvCV.js → dist/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-CwNNyyGP.js} +1 -1
  34. package/{lib → dist}/interface.d.ts +11 -0
  35. package/{es → dist}/layout/composables/useContext.d.ts +1 -2
  36. package/{lib → dist}/layout/ui-kit/HDialog.vue.d.ts +12 -1
  37. package/{lib → dist}/layout/ui-kit/HSlideover.vue.d.ts +12 -1
  38. package/{es/notification-6D5hA7Bp.js → dist/menu-B5iLIYKi.js} +1867 -1903
  39. package/{es/pick-Br-UKn7B.js → dist/pick-CTnAIBFU.js} +1 -1
  40. package/{es → dist}/request.js +23 -23
  41. package/{lib → dist}/stores/modules/favorites.d.ts +1 -0
  42. package/{es → dist}/stores/modules/iframe.d.ts +1 -0
  43. package/{es → dist}/stores/modules/index.d.ts +8 -1
  44. package/{es → dist}/stores/modules/keepAlive.d.ts +1 -0
  45. package/{es → dist}/stores/modules/menu.d.ts +1 -0
  46. package/{es → dist}/stores/modules/route.d.ts +1 -0
  47. package/{lib → dist}/stores/modules/settings.d.ts +1 -0
  48. package/{lib → dist}/stores/modules/tabbar.d.ts +1 -0
  49. package/dist/stores/modules/user.d.ts +36 -0
  50. package/{es → dist}/style.css +1 -1
  51. package/package.json +18 -24
  52. package/src/components/PubinfoProvider/index.ts +2 -0
  53. package/src/composables/auth.ts +1 -1
  54. package/src/interface.ts +11 -0
  55. package/src/layout/components/Tools/index.vue +8 -25
  56. package/src/layout/composables/useContext.ts +0 -2
  57. package/src/layout/composables/useWatermark.ts +2 -2
  58. package/src/layout/provider.ts +0 -3
  59. package/src/layout/ui-kit/HDialog.vue +4 -1
  60. package/src/layout/ui-kit/HSlideover.vue +4 -1
  61. package/src/pages/system/change-organization/index.vue +3 -3
  62. package/src/route/routes.ts +2 -11
  63. package/src/stores/helper.ts +2 -2
  64. package/src/stores/modules/favorites.ts +1 -0
  65. package/src/stores/modules/iframe.ts +1 -0
  66. package/src/stores/modules/index.ts +8 -1
  67. package/src/stores/modules/keepAlive.ts +1 -0
  68. package/src/stores/modules/menu.ts +1 -0
  69. package/src/stores/modules/route.ts +2 -1
  70. package/src/stores/modules/settings.ts +1 -0
  71. package/src/stores/modules/tabbar.ts +1 -0
  72. package/src/stores/modules/user.ts +55 -20
  73. package/src/stores/plugin/sideEffect/favoritesStorage.ts +1 -1
  74. package/src/stores/plugin/sideEffect/tabbarStorage.ts +1 -1
  75. package/es/components/PubinfoProvider/index.d.ts +0 -8
  76. package/es/composables/auth.d.ts +0 -8
  77. package/es/interface.d.ts +0 -29
  78. package/es/layout/ui-kit/HDialog.vue.d.ts +0 -28
  79. package/es/layout/ui-kit/HSlideover.vue.d.ts +0 -30
  80. package/es/stores/modules/favorites.d.ts +0 -32
  81. package/es/stores/modules/notification.d.ts +0 -18
  82. package/es/stores/modules/settings.d.ts +0 -85
  83. package/es/stores/modules/tabbar.d.ts +0 -59
  84. package/es/stores/modules/user.d.ts +0 -3
  85. package/lib/AppSetting-CCiwpjoq.cjs +0 -1
  86. package/lib/HButton.vue_vue_type_script_setup_true_lang-D-XkyoXl.cjs +0 -1
  87. package/lib/HCheckList.vue_vue_type_script_setup_true_lang-DwA8einQ.cjs +0 -1
  88. package/lib/HDivider-DCfDgE8l.cjs +0 -1
  89. package/lib/HInput.vue_vue_type_script_setup_true_lang-CwS0mGyL.cjs +0 -1
  90. package/lib/HToggle-BP6YYf-s.cjs +0 -1
  91. package/lib/PreferencesContent-DgL-Jc_J.cjs +0 -3
  92. package/lib/SettingBreadcrumb-BQ78yEP4.cjs +0 -1
  93. package/lib/SettingCopyright-x7aPlkQy.cjs +0 -1
  94. package/lib/SettingEnableTransition-CD3-44Iy.cjs +0 -1
  95. package/lib/SettingHome-u52oz6i8.cjs +0 -1
  96. package/lib/SettingMenu-DsElOvvv.cjs +0 -1
  97. package/lib/SettingMode-C_kgpTxw.cjs +0 -1
  98. package/lib/SettingNavSearch-3auTi8UW.cjs +0 -1
  99. package/lib/SettingOther-6XGQq7OA.cjs +0 -1
  100. package/lib/SettingPage-C8yIHpLc.cjs +0 -1
  101. package/lib/SettingTabbar-K-nHb89z.cjs +0 -1
  102. package/lib/SettingThemes-BeNwFz7K.cjs +0 -1
  103. package/lib/SettingToolbar-Be1V7lwV.cjs +0 -1
  104. package/lib/SettingTopbar-C-j8O3c8.cjs +0 -1
  105. package/lib/SettingWidthMode-GMjAF-s3.cjs +0 -1
  106. package/lib/TopThinMode-DGUvyHT2.cjs +0 -1
  107. package/lib/_...all_-C4CXjAo9.cjs +0 -1
  108. package/lib/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  109. package/lib/api/enum/code.d.ts +0 -67
  110. package/lib/api/helper.d.ts +0 -32
  111. package/lib/api/index.d.ts +0 -12
  112. package/lib/api/interface.d.ts +0 -14
  113. package/lib/api/modules/auth/index.d.ts +0 -1
  114. package/lib/api/modules/auth/renzhengfuwu.d.ts +0 -50
  115. package/lib/api/modules/configData/heibaimingdanfuwu.d.ts +0 -36
  116. package/lib/api/modules/configData/index.d.ts +0 -3
  117. package/lib/api/modules/configData/xitongpeizhifuwu.d.ts +0 -99
  118. package/lib/api/modules/configData/zidianfuwu.d.ts +0 -71
  119. package/lib/api/modules/rbac/gangweijiekou.d.ts +0 -43
  120. package/lib/api/modules/rbac/index.d.ts +0 -11
  121. package/lib/api/modules/rbac/jiaosejiekou.d.ts +0 -50
  122. package/lib/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +0 -43
  123. package/lib/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +0 -64
  124. package/lib/api/modules/rbac/yonghujiekou.d.ts +0 -106
  125. package/lib/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +0 -36
  126. package/lib/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +0 -29
  127. package/lib/api/modules/rbac/ziyuanjiekou.d.ts +0 -85
  128. package/lib/api/modules/rbac/zuhuguanlijiekou.d.ts +0 -36
  129. package/lib/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +0 -29
  130. package/lib/api/modules/rbac/zuzhijiekou.d.ts +0 -64
  131. package/lib/api/request.d.ts +0 -2
  132. package/lib/api/system/app.d.ts +0 -17
  133. package/lib/api/system/user.d.ts +0 -24
  134. package/lib/assets/styles/index.d.ts +0 -6
  135. package/lib/colors-KAaBT84S.cjs +0 -1
  136. package/lib/components/NotAllowed/index.vue.d.ts +0 -2
  137. package/lib/components/PageHeader/index.vue.d.ts +0 -23
  138. package/lib/components/PageMain/index.vue.d.ts +0 -27
  139. package/lib/components/PassStrengthValidator/index.vue.d.ts +0 -26
  140. package/lib/components/PassStrengthValidator/rule.vue.d.ts +0 -8
  141. package/lib/components/PubinfoApp/index.vue.d.ts +0 -2
  142. package/lib/components/PubinfoIcon/index.vue.d.ts +0 -10
  143. package/lib/components/index.d.ts +0 -8
  144. package/lib/composables/index.d.ts +0 -4
  145. package/lib/composables/log.d.ts +0 -6
  146. package/lib/composables/theme.d.ts +0 -3
  147. package/lib/composables/watchDiff.d.ts +0 -2
  148. package/lib/config/index.d.ts +0 -1
  149. package/lib/config/settings.d.ts +0 -3
  150. package/lib/context.d.ts +0 -14
  151. package/lib/create.d.ts +0 -3
  152. package/lib/directives/index.d.ts +0 -4
  153. package/lib/directives/plugins/permission.d.ts +0 -6
  154. package/lib/index-38bsQrho.cjs +0 -1
  155. package/lib/index-BEqD62a0.cjs +0 -1
  156. package/lib/index-Bbm9CQRP.cjs +0 -1
  157. package/lib/index-BqHsuJkr.cjs +0 -1
  158. package/lib/index-JZl6Zh3L.cjs +0 -44
  159. package/lib/index-VGR0Mt4q.cjs +0 -240
  160. package/lib/index-WMo0GAa6.cjs +0 -1
  161. package/lib/index-_YsHduAE.cjs +0 -1
  162. package/lib/index-gr8kFwPx.cjs +0 -18
  163. package/lib/index-zvGq9tSu.cjs +0 -1
  164. package/lib/index.cjs +0 -1
  165. package/lib/index.d.ts +0 -11
  166. package/lib/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-SCJ5qyPu.cjs +0 -1
  167. package/lib/layout/Layout.vue.d.ts +0 -20
  168. package/lib/layout/components/BackTop/index.vue.d.ts +0 -2
  169. package/lib/layout/components/Content/IframeView.vue.d.ts +0 -4
  170. package/lib/layout/components/Content/LinkView.vue.d.ts +0 -2
  171. package/lib/layout/components/Content/index.vue.d.ts +0 -2
  172. package/lib/layout/components/Copyright/index.vue.d.ts +0 -2
  173. package/lib/layout/components/Header/TopMode/More.vue.d.ts +0 -26
  174. package/lib/layout/components/Header/TopMode/NotCursor.vue.d.ts +0 -25
  175. package/lib/layout/components/Header/TopMode/index.vue.d.ts +0 -4
  176. package/lib/layout/components/Header/TopThinMode.vue.d.ts +0 -4
  177. package/lib/layout/components/Header/index.vue.d.ts +0 -19
  178. package/lib/layout/components/Logo/index.vue.d.ts +0 -26
  179. package/lib/layout/components/Menu/index.vue.d.ts +0 -10
  180. package/lib/layout/components/Menu/item.vue.d.ts +0 -11
  181. package/lib/layout/components/Menu/sub.vue.d.ts +0 -219
  182. package/lib/layout/components/Menu/types.d.ts +0 -42
  183. package/lib/layout/components/SettingBar/AppSetting.vue.d.ts +0 -12
  184. package/lib/layout/components/SettingBar/components/DayNightToggle.vue.d.ts +0 -9
  185. package/lib/layout/components/SettingBar/components/SettingBreadcrumb.vue.d.ts +0 -2
  186. package/lib/layout/components/SettingBar/components/SettingCopyright.vue.d.ts +0 -2
  187. package/lib/layout/components/SettingBar/components/SettingEnableTransition.vue.d.ts +0 -2
  188. package/lib/layout/components/SettingBar/components/SettingHome.vue.d.ts +0 -2
  189. package/lib/layout/components/SettingBar/components/SettingMenu.vue.d.ts +0 -2
  190. package/lib/layout/components/SettingBar/components/SettingMode.vue.d.ts +0 -2
  191. package/lib/layout/components/SettingBar/components/SettingNavSearch.vue.d.ts +0 -2
  192. package/lib/layout/components/SettingBar/components/SettingOther.vue.d.ts +0 -2
  193. package/lib/layout/components/SettingBar/components/SettingPage.vue.d.ts +0 -2
  194. package/lib/layout/components/SettingBar/components/SettingTabbar.vue.d.ts +0 -2
  195. package/lib/layout/components/SettingBar/components/SettingThemes.vue.d.ts +0 -2
  196. package/lib/layout/components/SettingBar/components/SettingToolbar.vue.d.ts +0 -2
  197. package/lib/layout/components/SettingBar/components/SettingTopbar.vue.d.ts +0 -2
  198. package/lib/layout/components/SettingBar/components/SettingWidthMode.vue.d.ts +0 -2
  199. package/lib/layout/components/SettingBar/index.vue.d.ts +0 -2
  200. package/lib/layout/components/Sidebar/MainSidebar.vue.d.ts +0 -2
  201. package/lib/layout/components/Sidebar/SubSidebar.vue.d.ts +0 -2
  202. package/lib/layout/components/Sidebar/index.vue.d.ts +0 -2
  203. package/lib/layout/components/Tools/Breadcrumb/index.vue.d.ts +0 -17
  204. package/lib/layout/components/Tools/Breadcrumb/item.vue.d.ts +0 -25
  205. package/lib/layout/components/Tools/DayNightSwitch.vue.d.ts +0 -2
  206. package/lib/layout/components/Tools/HotkeysIntro.vue.d.ts +0 -4
  207. package/lib/layout/components/Tools/Preferences/PreferencesContent.vue.d.ts +0 -2
  208. package/lib/layout/components/Tools/Preferences/index.vue.d.ts +0 -4
  209. package/lib/layout/components/Tools/Search.vue.d.ts +0 -199
  210. package/lib/layout/components/Tools/index.vue.d.ts +0 -233
  211. package/lib/layout/components/Topbar/Tabbar/MoreAction.vue.d.ts +0 -217
  212. package/lib/layout/components/Topbar/Tabbar/index.vue.d.ts +0 -14
  213. package/lib/layout/components/Topbar/Toolbar/Favorites.vue.d.ts +0 -4
  214. package/lib/layout/components/Topbar/Toolbar/Star.vue.d.ts +0 -2
  215. package/lib/layout/components/Topbar/Toolbar/index.vue.d.ts +0 -2
  216. package/lib/layout/components/Topbar/index.vue.d.ts +0 -2
  217. package/lib/layout/composables/useContext.d.ts +0 -18
  218. package/lib/layout/composables/useGetComputedStyle.d.ts +0 -15
  219. package/lib/layout/composables/useHotkey.d.ts +0 -5
  220. package/lib/layout/composables/useMainPage.d.ts +0 -14
  221. package/lib/layout/composables/useMenu.d.ts +0 -8
  222. package/lib/layout/composables/useTabbar.d.ts +0 -14
  223. package/lib/layout/composables/useTitle.d.ts +0 -3
  224. package/lib/layout/composables/useViewTransition.d.ts +0 -3
  225. package/lib/layout/composables/useWatermark.d.ts +0 -4
  226. package/lib/layout/index.d.ts +0 -19
  227. package/lib/layout/provider.d.ts +0 -1
  228. package/lib/layout/ui-kit/HBadge.vue.d.ts +0 -20
  229. package/lib/layout/ui-kit/HButton.vue.d.ts +0 -26
  230. package/lib/layout/ui-kit/HCheckList.vue.d.ts +0 -20
  231. package/lib/layout/ui-kit/HDivider.vue.d.ts +0 -20
  232. package/lib/layout/ui-kit/HDropdown.vue.d.ts +0 -18
  233. package/lib/layout/ui-kit/HDropdownMenu.vue.d.ts +0 -26
  234. package/lib/layout/ui-kit/HDropdownTree.vue.d.ts +0 -32
  235. package/lib/layout/ui-kit/HInput.vue.d.ts +0 -17
  236. package/lib/layout/ui-kit/HKbd.vue.d.ts +0 -17
  237. package/lib/layout/ui-kit/HSelect.vue.d.ts +0 -17
  238. package/lib/layout/ui-kit/HTabList.vue.d.ts +0 -22
  239. package/lib/layout/ui-kit/HToggle.vue.d.ts +0 -14
  240. package/lib/layout/ui-kit/HTooltip.vue.d.ts +0 -23
  241. package/lib/locales/index.d.ts +0 -301
  242. package/lib/locales/lang/en.json.d.ts +0 -99
  243. package/lib/locales/lang/zh-cn.json.d.ts +0 -100
  244. package/lib/locales/lang/zh-tw.json.d.ts +0 -100
  245. package/lib/locales/ui.d.ts +0 -3
  246. package/lib/modules.d.ts +0 -11
  247. package/lib/notification-IZqPm_OK.cjs +0 -199
  248. package/lib/pages/personal/profile/index.vue.d.ts +0 -2
  249. package/lib/pages/system/[...all].vue.d.ts +0 -2
  250. package/lib/pages/system/change-organization/index.vue.d.ts +0 -2
  251. package/lib/pages/system/change-password/components/ChangePasswordForm/index.vue.d.ts +0 -18
  252. package/lib/pages/system/change-password/index.vue.d.ts +0 -31
  253. package/lib/pages/system/index.vue.d.ts +0 -2
  254. package/lib/pages/system/not-permission/index.vue.d.ts +0 -2
  255. package/lib/pages/system/reload.vue.d.ts +0 -2
  256. package/lib/pick-y2yLda1R.cjs +0 -1
  257. package/lib/question-line-Cd0CU4hr.cjs +0 -1
  258. package/lib/reload-6L7Dzs7h.cjs +0 -1
  259. package/lib/request.cjs +0 -6
  260. package/lib/right-C5JQ_uRB.cjs +0 -1
  261. package/lib/route/async.d.ts +0 -9
  262. package/lib/route/guard/auth.d.ts +0 -3
  263. package/lib/route/guard/basic.d.ts +0 -3
  264. package/lib/route/guard/index.d.ts +0 -3
  265. package/lib/route/guard/setting.d.ts +0 -3
  266. package/lib/route/index.d.ts +0 -7
  267. package/lib/route/routes.d.ts +0 -3
  268. package/lib/stores/enum/index.d.ts +0 -20
  269. package/lib/stores/helper.d.ts +0 -2
  270. package/lib/stores/index.d.ts +0 -5
  271. package/lib/stores/modules/iframe.d.ts +0 -41
  272. package/lib/stores/modules/index.d.ts +0 -9
  273. package/lib/stores/modules/keepAlive.d.ts +0 -23
  274. package/lib/stores/modules/menu.d.ts +0 -32
  275. package/lib/stores/modules/notification.d.ts +0 -18
  276. package/lib/stores/modules/route.d.ts +0 -42
  277. package/lib/stores/modules/user.d.ts +0 -3
  278. package/lib/stores/plugin/persist.d.ts +0 -5
  279. package/lib/stores/plugin/sideEffect/cleanup.d.ts +0 -5
  280. package/lib/stores/plugin/sideEffect/favoritesStorage.d.ts +0 -5
  281. package/lib/stores/plugin/sideEffect/iframeCache.d.ts +0 -5
  282. package/lib/stores/plugin/sideEffect/index.d.ts +0 -5
  283. package/lib/stores/plugin/sideEffect/tabbarStorage.d.ts +0 -5
  284. package/lib/style.css +0 -9
  285. package/lib/utils/cleanup.d.ts +0 -8
  286. package/lib/utils/crypto.d.ts +0 -4
  287. package/lib/utils/eventBus.d.ts +0 -5
  288. package/lib/utils/index.d.ts +0 -14
  289. package/lib/utils/injectionKeys.d.ts +0 -2
  290. package/lib/utils/storage.d.ts +0 -21
  291. package/lib/utils/utils.d.ts +0 -3
  292. package/lib/utils/watermark.d.ts +0 -51
  293. package/src/layout/components/Tools/Notification.vue +0 -152
  294. package/src/pages/personal/notification.vue +0 -58
  295. package/src/stores/modules/notification.ts +0 -34
  296. /package/{es → dist}/HButton.vue_vue_type_script_setup_true_lang-CYAzn9Mg.js +0 -0
  297. /package/{es → dist}/HDivider-DgXBhPr0.js +0 -0
  298. /package/{es → dist}/HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js +0 -0
  299. /package/{es → dist}/HToggle-Cd71WKvG.js +0 -0
  300. /package/{es → dist}/_plugin-vue_export-helper-CHgC5LLL.js +0 -0
  301. /package/{es → dist}/api/enum/code.d.ts +0 -0
  302. /package/{es → dist}/api/helper.d.ts +0 -0
  303. /package/{es → dist}/api/index.d.ts +0 -0
  304. /package/{es → dist}/api/interface.d.ts +0 -0
  305. /package/{es → dist}/api/modules/auth/index.d.ts +0 -0
  306. /package/{es → dist}/api/modules/auth/renzhengfuwu.d.ts +0 -0
  307. /package/{es → dist}/api/modules/configData/heibaimingdanfuwu.d.ts +0 -0
  308. /package/{es → dist}/api/modules/configData/index.d.ts +0 -0
  309. /package/{es → dist}/api/modules/configData/xitongpeizhifuwu.d.ts +0 -0
  310. /package/{es → dist}/api/modules/configData/zidianfuwu.d.ts +0 -0
  311. /package/{es → dist}/api/modules/rbac/gangweijiekou.d.ts +0 -0
  312. /package/{es → dist}/api/modules/rbac/index.d.ts +0 -0
  313. /package/{es → dist}/api/modules/rbac/jiaosejiekou.d.ts +0 -0
  314. /package/{es → dist}/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +0 -0
  315. /package/{es → dist}/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +0 -0
  316. /package/{es → dist}/api/modules/rbac/yonghujiekou.d.ts +0 -0
  317. /package/{es → dist}/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +0 -0
  318. /package/{es → dist}/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +0 -0
  319. /package/{es → dist}/api/modules/rbac/ziyuanjiekou.d.ts +0 -0
  320. /package/{es → dist}/api/modules/rbac/zuhuguanlijiekou.d.ts +0 -0
  321. /package/{es → dist}/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +0 -0
  322. /package/{es → dist}/api/modules/rbac/zuzhijiekou.d.ts +0 -0
  323. /package/{es → dist}/api/request.d.ts +0 -0
  324. /package/{es → dist}/api/system/app.d.ts +0 -0
  325. /package/{es → dist}/api/system/user.d.ts +0 -0
  326. /package/{es → dist}/assets/styles/index.d.ts +0 -0
  327. /package/{es → dist}/components/NotAllowed/index.vue.d.ts +0 -0
  328. /package/{es → dist}/components/PageHeader/index.vue.d.ts +0 -0
  329. /package/{es → dist}/components/PageMain/index.vue.d.ts +0 -0
  330. /package/{es → dist}/components/PassStrengthValidator/index.vue.d.ts +0 -0
  331. /package/{es → dist}/components/PassStrengthValidator/rule.vue.d.ts +0 -0
  332. /package/{es → dist}/components/PubinfoApp/index.vue.d.ts +0 -0
  333. /package/{es → dist}/components/PubinfoIcon/index.vue.d.ts +0 -0
  334. /package/{es → dist}/components/index.d.ts +0 -0
  335. /package/{es → dist}/composables/index.d.ts +0 -0
  336. /package/{es → dist}/composables/log.d.ts +0 -0
  337. /package/{es → dist}/composables/theme.d.ts +0 -0
  338. /package/{es → dist}/composables/watchDiff.d.ts +0 -0
  339. /package/{es → dist}/config/index.d.ts +0 -0
  340. /package/{es → dist}/config/settings.d.ts +0 -0
  341. /package/{es → dist}/context.d.ts +0 -0
  342. /package/{es → dist}/create.d.ts +0 -0
  343. /package/{es → dist}/directives/index.d.ts +0 -0
  344. /package/{es → dist}/directives/plugins/permission.d.ts +0 -0
  345. /package/{es → dist}/index-DTQQt_XY.js +0 -0
  346. /package/{es → dist}/index.d.ts +0 -0
  347. /package/{es → dist}/layout/Layout.vue.d.ts +0 -0
  348. /package/{es → dist}/layout/components/BackTop/index.vue.d.ts +0 -0
  349. /package/{es → dist}/layout/components/Content/IframeView.vue.d.ts +0 -0
  350. /package/{es → dist}/layout/components/Content/LinkView.vue.d.ts +0 -0
  351. /package/{es → dist}/layout/components/Content/index.vue.d.ts +0 -0
  352. /package/{es → dist}/layout/components/Copyright/index.vue.d.ts +0 -0
  353. /package/{es → dist}/layout/components/Header/TopMode/More.vue.d.ts +0 -0
  354. /package/{es → dist}/layout/components/Header/TopMode/NotCursor.vue.d.ts +0 -0
  355. /package/{es → dist}/layout/components/Header/TopMode/index.vue.d.ts +0 -0
  356. /package/{es → dist}/layout/components/Header/TopThinMode.vue.d.ts +0 -0
  357. /package/{es → dist}/layout/components/Header/index.vue.d.ts +0 -0
  358. /package/{es → dist}/layout/components/Logo/index.vue.d.ts +0 -0
  359. /package/{es → dist}/layout/components/Menu/index.vue.d.ts +0 -0
  360. /package/{es → dist}/layout/components/Menu/item.vue.d.ts +0 -0
  361. /package/{es → dist}/layout/components/Menu/sub.vue.d.ts +0 -0
  362. /package/{es → dist}/layout/components/Menu/types.d.ts +0 -0
  363. /package/{es → dist}/layout/components/SettingBar/AppSetting.vue.d.ts +0 -0
  364. /package/{es → dist}/layout/components/SettingBar/components/DayNightToggle.vue.d.ts +0 -0
  365. /package/{es → dist}/layout/components/SettingBar/components/SettingBreadcrumb.vue.d.ts +0 -0
  366. /package/{es → dist}/layout/components/SettingBar/components/SettingCopyright.vue.d.ts +0 -0
  367. /package/{es → dist}/layout/components/SettingBar/components/SettingEnableTransition.vue.d.ts +0 -0
  368. /package/{es → dist}/layout/components/SettingBar/components/SettingHome.vue.d.ts +0 -0
  369. /package/{es → dist}/layout/components/SettingBar/components/SettingMenu.vue.d.ts +0 -0
  370. /package/{es → dist}/layout/components/SettingBar/components/SettingMode.vue.d.ts +0 -0
  371. /package/{es → dist}/layout/components/SettingBar/components/SettingNavSearch.vue.d.ts +0 -0
  372. /package/{es → dist}/layout/components/SettingBar/components/SettingOther.vue.d.ts +0 -0
  373. /package/{es → dist}/layout/components/SettingBar/components/SettingPage.vue.d.ts +0 -0
  374. /package/{es → dist}/layout/components/SettingBar/components/SettingTabbar.vue.d.ts +0 -0
  375. /package/{es → dist}/layout/components/SettingBar/components/SettingThemes.vue.d.ts +0 -0
  376. /package/{es → dist}/layout/components/SettingBar/components/SettingToolbar.vue.d.ts +0 -0
  377. /package/{es → dist}/layout/components/SettingBar/components/SettingTopbar.vue.d.ts +0 -0
  378. /package/{es → dist}/layout/components/SettingBar/components/SettingWidthMode.vue.d.ts +0 -0
  379. /package/{es → dist}/layout/components/SettingBar/index.vue.d.ts +0 -0
  380. /package/{es → dist}/layout/components/Sidebar/MainSidebar.vue.d.ts +0 -0
  381. /package/{es → dist}/layout/components/Sidebar/SubSidebar.vue.d.ts +0 -0
  382. /package/{es → dist}/layout/components/Sidebar/index.vue.d.ts +0 -0
  383. /package/{es → dist}/layout/components/Tools/Breadcrumb/index.vue.d.ts +0 -0
  384. /package/{es → dist}/layout/components/Tools/Breadcrumb/item.vue.d.ts +0 -0
  385. /package/{es → dist}/layout/components/Tools/DayNightSwitch.vue.d.ts +0 -0
  386. /package/{es → dist}/layout/components/Tools/HotkeysIntro.vue.d.ts +0 -0
  387. /package/{es → dist}/layout/components/Tools/Preferences/PreferencesContent.vue.d.ts +0 -0
  388. /package/{es → dist}/layout/components/Tools/Preferences/index.vue.d.ts +0 -0
  389. /package/{es → dist}/layout/components/Tools/Search.vue.d.ts +0 -0
  390. /package/{es → dist}/layout/components/Tools/index.vue.d.ts +0 -0
  391. /package/{es → dist}/layout/components/Topbar/Tabbar/MoreAction.vue.d.ts +0 -0
  392. /package/{es → dist}/layout/components/Topbar/Tabbar/index.vue.d.ts +0 -0
  393. /package/{es → dist}/layout/components/Topbar/Toolbar/Favorites.vue.d.ts +0 -0
  394. /package/{es → dist}/layout/components/Topbar/Toolbar/Star.vue.d.ts +0 -0
  395. /package/{es → dist}/layout/components/Topbar/Toolbar/index.vue.d.ts +0 -0
  396. /package/{es → dist}/layout/components/Topbar/index.vue.d.ts +0 -0
  397. /package/{es → dist}/layout/composables/useGetComputedStyle.d.ts +0 -0
  398. /package/{es → dist}/layout/composables/useHotkey.d.ts +0 -0
  399. /package/{es → dist}/layout/composables/useMainPage.d.ts +0 -0
  400. /package/{es → dist}/layout/composables/useMenu.d.ts +0 -0
  401. /package/{es → dist}/layout/composables/useTabbar.d.ts +0 -0
  402. /package/{es → dist}/layout/composables/useTitle.d.ts +0 -0
  403. /package/{es → dist}/layout/composables/useViewTransition.d.ts +0 -0
  404. /package/{es → dist}/layout/composables/useWatermark.d.ts +0 -0
  405. /package/{es → dist}/layout/index.d.ts +0 -0
  406. /package/{es → dist}/layout/provider.d.ts +0 -0
  407. /package/{es → dist}/layout/ui-kit/HBadge.vue.d.ts +0 -0
  408. /package/{es → dist}/layout/ui-kit/HButton.vue.d.ts +0 -0
  409. /package/{es → dist}/layout/ui-kit/HCheckList.vue.d.ts +0 -0
  410. /package/{es → dist}/layout/ui-kit/HDivider.vue.d.ts +0 -0
  411. /package/{es → dist}/layout/ui-kit/HDropdown.vue.d.ts +0 -0
  412. /package/{es → dist}/layout/ui-kit/HDropdownMenu.vue.d.ts +0 -0
  413. /package/{es → dist}/layout/ui-kit/HDropdownTree.vue.d.ts +0 -0
  414. /package/{es → dist}/layout/ui-kit/HInput.vue.d.ts +0 -0
  415. /package/{es → dist}/layout/ui-kit/HKbd.vue.d.ts +0 -0
  416. /package/{es → dist}/layout/ui-kit/HSelect.vue.d.ts +0 -0
  417. /package/{es → dist}/layout/ui-kit/HTabList.vue.d.ts +0 -0
  418. /package/{es → dist}/layout/ui-kit/HToggle.vue.d.ts +0 -0
  419. /package/{es → dist}/layout/ui-kit/HTooltip.vue.d.ts +0 -0
  420. /package/{es → dist}/locales/index.d.ts +0 -0
  421. /package/{es → dist}/locales/lang/en.json.d.ts +0 -0
  422. /package/{es → dist}/locales/lang/zh-cn.json.d.ts +0 -0
  423. /package/{es → dist}/locales/lang/zh-tw.json.d.ts +0 -0
  424. /package/{es → dist}/locales/ui.d.ts +0 -0
  425. /package/{es → dist}/modules.d.ts +0 -0
  426. /package/{es → dist}/pages/personal/profile/index.vue.d.ts +0 -0
  427. /package/{es → dist}/pages/system/[...all].vue.d.ts +0 -0
  428. /package/{es → dist}/pages/system/change-organization/index.vue.d.ts +0 -0
  429. /package/{es → dist}/pages/system/change-password/components/ChangePasswordForm/index.vue.d.ts +0 -0
  430. /package/{es → dist}/pages/system/change-password/index.vue.d.ts +0 -0
  431. /package/{es → dist}/pages/system/index.vue.d.ts +0 -0
  432. /package/{es → dist}/pages/system/not-permission/index.vue.d.ts +0 -0
  433. /package/{es → dist}/pages/system/reload.vue.d.ts +0 -0
  434. /package/{es → dist}/question-line-CfkciTFq.js +0 -0
  435. /package/{es → dist}/reload-CUcPYtl7.js +0 -0
  436. /package/{es → dist}/right-Bfe2p1o0.js +0 -0
  437. /package/{es → dist}/route/async.d.ts +0 -0
  438. /package/{es → dist}/route/guard/auth.d.ts +0 -0
  439. /package/{es → dist}/route/guard/basic.d.ts +0 -0
  440. /package/{es → dist}/route/guard/index.d.ts +0 -0
  441. /package/{es → dist}/route/guard/setting.d.ts +0 -0
  442. /package/{es → dist}/route/index.d.ts +0 -0
  443. /package/{es → dist}/route/routes.d.ts +0 -0
  444. /package/{es → dist}/stores/enum/index.d.ts +0 -0
  445. /package/{es → dist}/stores/helper.d.ts +0 -0
  446. /package/{es → dist}/stores/index.d.ts +0 -0
  447. /package/{es → dist}/stores/plugin/persist.d.ts +0 -0
  448. /package/{es → dist}/stores/plugin/sideEffect/cleanup.d.ts +0 -0
  449. /package/{es → dist}/stores/plugin/sideEffect/favoritesStorage.d.ts +0 -0
  450. /package/{es → dist}/stores/plugin/sideEffect/iframeCache.d.ts +0 -0
  451. /package/{es → dist}/stores/plugin/sideEffect/index.d.ts +0 -0
  452. /package/{es → dist}/stores/plugin/sideEffect/tabbarStorage.d.ts +0 -0
  453. /package/{es → dist}/utils/cleanup.d.ts +0 -0
  454. /package/{es → dist}/utils/crypto.d.ts +0 -0
  455. /package/{es → dist}/utils/eventBus.d.ts +0 -0
  456. /package/{es → dist}/utils/index.d.ts +0 -0
  457. /package/{es → dist}/utils/injectionKeys.d.ts +0 -0
  458. /package/{es → dist}/utils/storage.d.ts +0 -0
  459. /package/{es → dist}/utils/utils.d.ts +0 -0
  460. /package/{es → dist}/utils/watermark.d.ts +0 -0
package/package.json CHANGED
@@ -1,50 +1,44 @@
1
1
  {
2
2
  "name": "@pubinfo/core",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.1",
4
+ "version": "2.0.0-beta.12",
5
5
  "exports": {
6
6
  ".": {
7
- "types": "./es/index.d.ts",
8
- "import": "./es/index.js",
9
- "require": "./lib/index.cjs"
7
+ "types": "./dist/index.d.ts",
8
+ "default": "./dist/index.js"
10
9
  },
11
10
  "./request": {
12
- "types": "./es/api/index.d.ts",
13
- "import": "./es/request.js",
14
- "require": "./lib/request.cjs"
15
- },
16
- "./style.css": {
17
- "import": "./es/style.css",
18
- "require": "./lib/style.css"
11
+ "types": "./dist/api/index.d.ts",
12
+ "default": "./dist/request.js"
19
13
  },
14
+ "./style.css": "./dist/style.css",
20
15
  "./types": "./types/index.d.ts"
21
16
  },
22
- "main": "./lib/index.js",
23
- "module": "./es/index.js",
24
- "types": "./es/index.d.ts",
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
25
20
  "files": [
26
- "es",
27
- "lib",
21
+ "dist",
28
22
  "src",
29
23
  "types"
30
24
  ],
31
25
  "peerDependencies": {
32
- "alova": "^3.2.6",
33
- "pinia": "^2.3.0",
26
+ "alova": "^3.2.9",
27
+ "pinia": "^2.3.1",
34
28
  "vue": "^3.5.13",
35
- "vue-i18n": "^9.14.0",
29
+ "vue-i18n": "^10.0.5",
36
30
  "vue-router": "^4.5.0",
37
- "@pubinfo/config": "2.0.0-beta.1"
31
+ "@pubinfo/config": "2.0.0-beta.12"
38
32
  },
39
33
  "dependencies": {
40
34
  "@alova/adapter-axios": "^2.0.13",
41
35
  "@ant-design/icons-vue": "^7.0.1",
42
36
  "@headlessui/vue": "^1.7.23",
43
37
  "@imengyu/vue3-context-menu": "^1.4.4",
44
- "@pubinfo/pro-components": "^1.6.1",
38
+ "@pubinfo/pro-components": "^1.7.0",
45
39
  "@unocss/reset": "^65.5.0",
46
40
  "@vueuse/core": "^12.7.0",
47
- "@vueuse/integrations": "^12.7.0",
41
+ "@vueuse/integrations": "^12.8.2",
48
42
  "ant-design-vue": "^4.2.6",
49
43
  "axios": "^1.8.1",
50
44
  "consola": "^3.4.0",
@@ -89,9 +83,9 @@
89
83
  "vite": "^6.2.0",
90
84
  "vite-plugin-dts": "^4.5.3",
91
85
  "vue": "^3.5.13",
92
- "vue-i18n": "^9.14.2",
86
+ "vue-i18n": "^10.0.5",
93
87
  "vue-router": "^4.5.0",
94
- "@pubinfo/config": "2.0.0-beta.1"
88
+ "@pubinfo/config": "2.0.0-beta.12"
95
89
  },
96
90
  "scripts": {
97
91
  "dev": "vite build -w -m watch",
@@ -1,3 +1,5 @@
1
+ import type { InjectionKey } from 'vue';
2
+
1
3
  interface PubinfoProviderProps {
2
4
  loadIcon?: (name?: string) => any
3
5
  }
@@ -14,7 +14,7 @@ export function useAuth() {
14
14
  const settingsStore = useSettingsStore();
15
15
  const userStore = useUserStore();
16
16
  if (settingsStore.settings.app.enablePermission) {
17
- return userStore.permissions.includes(permission);
17
+ return userStore.user.permissions.includes(permission);
18
18
  }
19
19
  else {
20
20
  return true;
package/src/interface.ts CHANGED
@@ -20,9 +20,20 @@ export interface Options {
20
20
  }
21
21
 
22
22
  export interface Module {
23
+ /** 唯一值 */
23
24
  name: string
25
+ /** 初始化内容 */
24
26
  setup?: (ctx: Context) => void
27
+ /**
28
+ * 插件调用顺序:
29
+ * - `enforce: pre` 插件
30
+ * - 腾龙核心功能(即内置的各类路由守卫、状态管理等)
31
+ * - 普通插件
32
+ * - 项目初始化函数(即 `createPubinfo` 第三个参数)
33
+ * - `enforce: post` 插件
34
+ */
25
35
  enforce?: 'pre' | 'post'
36
+ /** 钩子函数 */
26
37
  hooks?: Partial<Hooks>
27
38
  }
28
39
 
@@ -2,7 +2,6 @@
2
2
  import { useFullscreen } from '@vueuse/core';
3
3
  import { useI18n } from 'vue-i18n';
4
4
  import CarbonUserAvatarFilledAlt from '~icons/carbon/user-avatar-filled-alt';
5
- // import FluentAlert12Regular from '~icons/fluent/alert-12-regular';
6
5
  import FluentArrowSync16Filled from '~icons/fluent/arrow-sync-16-filled';
7
6
  import FluentFullScreenMaximize16Filled from '~icons/fluent/full-screen-maximize-16-filled';
8
7
  import FluentFullScreenMinimize16Filled from '~icons/fluent/full-screen-minimize-16-filled';
@@ -17,7 +16,6 @@ import useViewTransition from '../../composables/useViewTransition';
17
16
  import DayNightSwitch from './DayNightSwitch.vue';
18
17
  import HotkeysIntro from './HotkeysIntro.vue';
19
18
  // import I18nSelector from './I18nSelector.vue';
20
- // import Notification from './Notification.vue';
21
19
  import Preferences from './Preferences/index.vue';
22
20
  import Search from './Search.vue';
23
21
 
@@ -26,9 +24,7 @@ defineOptions({
26
24
  });
27
25
 
28
26
  const router = useRouter();
29
- const { settingsStore, userStore, notificationStore, generateI18nTitle } = useContext();
30
-
31
- notificationStore.init();
27
+ const { settingsStore, userStore, generateI18nTitle } = useContext();
32
28
 
33
29
  const { t } = useI18n();
34
30
 
@@ -67,9 +63,9 @@ const userMenu = computed(() => [
67
63
  icon: 'i-iconamoon-synchronize-duotone',
68
64
  handle: () => router.push({
69
65
  name: 'ChangeOrganization',
70
- params: { orgId: userStore.orgId },
66
+ params: { orgId: userStore.user.orgId },
71
67
  }),
72
- hide: userStore.orgList.length <= 1,
68
+ hide: userStore.user.orgList.length <= 1,
73
69
  },
74
70
  {
75
71
  label: t('route.personal.profile'),
@@ -133,7 +129,7 @@ function toggleColorScheme(event: MouseEvent) {
133
129
 
134
130
  const avatarError = ref(false);
135
131
 
136
- watch(() => userStore.avatar, () => {
132
+ watch(() => userStore.user.avatar, () => {
137
133
  if (avatarError.value) {
138
134
  avatarError.value = false;
139
135
  }
@@ -175,20 +171,7 @@ const searchComponentsClass = computed(() => {
175
171
  >
176
172
  <IconamoonSearch text="14px" />
177
173
  </span>
178
- <!-- <HDropdown
179
- v-if="settingsStore.settings.toolbar.enableNotification"
180
- class="item"
181
- >
182
- <HBadge
183
- :value="notificationStore.total"
184
- >
185
- <FluentAlert12Regular text="15px" />
186
- </HBadge>
187
- <template #dropdown>
188
- <Notification />
189
- </template>
190
- </HDropdown>
191
- <I18nSelector class="item">
174
+ <!-- <I18nSelector class="item">
192
175
  <RiTranslate text="15px" />
193
176
  </I18nSelector> -->
194
177
  <span
@@ -210,8 +193,8 @@ const searchComponentsClass = computed(() => {
210
193
  </div>
211
194
  <div flex-center cursor-pointer gap-1>
212
195
  <img
213
- v-if="userStore.avatar && !avatarError"
214
- :src="userStore.avatar"
196
+ v-if="userStore.user.avatar && !avatarError"
197
+ :src="userStore.user.avatar"
215
198
  :onerror="() => (avatarError = true)"
216
199
  class="h-[24px] w-[24px] rounded-full"
217
200
  >
@@ -222,7 +205,7 @@ const searchComponentsClass = computed(() => {
222
205
  <PhLineVerticalThin />
223
206
  <HDropdownMenu :items="userMenu">
224
207
  <div flex-center cursor-pointer gap-1>
225
- {{ userStore.account }}
208
+ {{ userStore.user.account }}
226
209
  <MaterialSymbolsExpandMoreRounded ml="5px" mr="10px" />
227
210
  </div>
228
211
  </HDropdownMenu>
@@ -3,7 +3,6 @@ import type {
3
3
  useIframeStore,
4
4
  useKeepAliveStore,
5
5
  useMenuStore,
6
- useNotificationStore,
7
6
  useRouteStore,
8
7
  useSettingsStore,
9
8
  useTabbarStore,
@@ -16,7 +15,6 @@ interface LayoutContext {
16
15
  keepAliveStore: ReturnType<typeof useKeepAliveStore>
17
16
  iframeStore: ReturnType<typeof useIframeStore>
18
17
  userStore: ReturnType<typeof useUserStore>
19
- notificationStore: ReturnType<typeof useNotificationStore>
20
18
  menuStore: ReturnType<typeof useMenuStore>
21
19
  routeStore: ReturnType<typeof useRouteStore>
22
20
  tabbarStore: ReturnType<typeof useTabbarStore>
@@ -27,11 +27,11 @@ export default function useWatermark() {
27
27
  const type = settingsStore.settings.watermark.text;
28
28
  switch (type) {
29
29
  case 'U':
30
- return `${userStore.account}`;
30
+ return `${userStore.user.account}`;
31
31
  case 'O':
32
32
  return `${userStore.userOrgName}`;
33
33
  case 'OU':
34
- return `${userStore.userOrgName} ${userStore.account}`;
34
+ return `${userStore.userOrgName} ${userStore.user.account}`;
35
35
  default:
36
36
  return type;
37
37
  }
@@ -3,7 +3,6 @@ import {
3
3
  useIframeStore,
4
4
  useKeepAliveStore,
5
5
  useMenuStore,
6
- useNotificationStore,
7
6
  useRouteStore,
8
7
  useSettingsStore,
9
8
  useTabbarStore,
@@ -33,7 +32,6 @@ export const Provider = defineComponent({
33
32
  const keepAliveStore = useKeepAliveStore();
34
33
  const iframeStore = useIframeStore();
35
34
  const userStore = useUserStore();
36
- const notificationStore = useNotificationStore();
37
35
  const routeStore = useRouteStore();
38
36
  const tabbarStore = useTabbarStore();
39
37
  const favoritesStore = useFavoritesStore();
@@ -46,7 +44,6 @@ export const Provider = defineComponent({
46
44
  keepAliveStore,
47
45
  iframeStore,
48
46
  userStore,
49
- notificationStore,
50
47
  routeStore,
51
48
  tabbarStore,
52
49
  favoritesStore,
@@ -23,7 +23,10 @@ const emit = defineEmits<{
23
23
  'close': []
24
24
  }>();
25
25
 
26
- const slots = useSlots();
26
+ const slots = defineSlots<{
27
+ default: any
28
+ footer: any
29
+ }>();
27
30
 
28
31
  const overlayTransitionClass = ref({
29
32
  enter: 'ease-in-out duration-500',
@@ -26,7 +26,10 @@ const emit = defineEmits<{
26
26
  'close': []
27
27
  }>();
28
28
 
29
- const slots = useSlots();
29
+ const slots = defineSlots<{
30
+ default: any
31
+ footer: any
32
+ }>();
30
33
 
31
34
  const overlayTransitionClass = ref({
32
35
  enter: 'ease-in-out duration-500',
@@ -11,7 +11,7 @@ const userStore = useUserStore();
11
11
  const router = useRouter();
12
12
 
13
13
  // 切断响应式,否则组织清楚后会导致页面闪烁
14
- const rawOrganization = toRaw(userStore.orgList);
14
+ const rawOrganization = toRaw(userStore.user.orgList);
15
15
  const orgList = computed(() => {
16
16
  const org = rawOrganization.map((item) => {
17
17
  return {
@@ -37,7 +37,7 @@ async function changeOrganization() {
37
37
  const org = orgList.value[activeIndex.value];
38
38
  const orgId = org?.orgId;
39
39
  if (orgId) {
40
- if (orgId === userStore.orgId) {
40
+ if (orgId === userStore.user.orgId) {
41
41
  message.error('请避免切换到当前已选组织');
42
42
  }
43
43
  else {
@@ -83,7 +83,7 @@ async function changeOrganization() {
83
83
  <span mr-10px>
84
84
  {{ item.label }}
85
85
  </span>
86
- <a-tag v-if="userStore.orgId === item.orgId" color="blue">
86
+ <a-tag v-if="userStore.user.orgId === item.orgId" color="blue">
87
87
  当前使用组织
88
88
  </a-tag>
89
89
  <a-tag v-if="item.main" color="red">
@@ -27,8 +27,8 @@ export const constantRoutes: RouteRecordRaw[] = [
27
27
  name: 'ChangeOrganization',
28
28
  component: () => import('@/pages/system/change-organization/index.vue'),
29
29
  beforeEnter: (to) => {
30
- const user = useUserStore();
31
- if (isUndefined(to.params.orgId) || to.params.orgId !== user.orgId) {
30
+ const userStore = useUserStore();
31
+ if (isUndefined(to.params.orgId) || to.params.orgId !== userStore.user.orgId) {
32
32
  return { name: 'Login' };
33
33
  }
34
34
  return true;
@@ -96,15 +96,6 @@ export const systemRoutes: RouteRecordRaw[] = [
96
96
  icon: 'i-iconamoon-profile-duotone',
97
97
  },
98
98
  },
99
- // {
100
- // path: 'personal/notification',
101
- // name: 'Notification',
102
- // component: () => import('@/pages/personal/notification.vue'),
103
- // meta: {
104
- // title: '通知中心',
105
- // i18n: 'route.personal.notification',
106
- // },
107
- // },
108
99
  ],
109
100
  },
110
101
  ];
@@ -13,8 +13,8 @@ export function getfavoritesMemoryKey() {
13
13
 
14
14
  function getUserPrefix() {
15
15
  const userStore = useUserStore();
16
- const userId = userStore.userId;
17
- const orgId = userStore.orgId;
16
+ const userId = userStore.user.userId;
17
+ const orgId = userStore.user.orgId;
18
18
  return getHash(`${orgId}${userId}`);
19
19
  }
20
20
 
@@ -150,3 +150,4 @@ const useFavoritesStore = defineStore(
150
150
  );
151
151
 
152
152
  export default useFavoritesStore;
153
+ export type FavoritesStore = ReturnType<typeof useFavoritesStore>;
@@ -112,3 +112,4 @@ const useIframeStore = defineStore(
112
112
  );
113
113
 
114
114
  export default useIframeStore;
115
+ export type IframeStore = ReturnType<typeof useIframeStore>;
@@ -1,9 +1,16 @@
1
1
  export { default as useFavoritesStore } from './favorites';
2
+ export * from './favorites';
2
3
  export { default as useIframeStore } from './iframe';
4
+ export * from './iframe';
3
5
  export { default as useKeepAliveStore } from './keepAlive';
6
+ export * from './keepAlive';
4
7
  export { default as useMenuStore } from './menu';
5
- export { default as useNotificationStore } from './notification';
8
+ export * from './menu';
6
9
  export { default as useRouteStore } from './route';
10
+ export * from './route';
7
11
  export { default as useSettingsStore } from './settings';
12
+ export * from './settings';
8
13
  export { default as useTabbarStore } from './tabbar';
14
+ export * from './tabbar';
9
15
  export { default as useUserStore } from './user';
16
+ export * from './user';
@@ -66,3 +66,4 @@ const useKeepAliveStore = defineStore(
66
66
  );
67
67
 
68
68
  export default useKeepAliveStore;
69
+ export type KeepAliveStore = ReturnType<typeof useKeepAliveStore>;
@@ -205,3 +205,4 @@ const useMenuStore = defineStore(
205
205
  );
206
206
 
207
207
  export default useMenuStore;
208
+ export type MenuStore = ReturnType<typeof useMenuStore>;
@@ -266,7 +266,7 @@ const useRouteStore = defineStore(
266
266
  let returnRoutes: Route.recordMainRaw[];
267
267
  // 如果权限功能开启,则需要对路由数据进行筛选过滤
268
268
  if (settingsStore.settings.app.enablePermission) {
269
- returnRoutes = filterAsyncRoutes(routesRaw.value, userStore.permissions);
269
+ returnRoutes = filterAsyncRoutes(routesRaw.value, userStore.user.permissions);
270
270
  }
271
271
  else {
272
272
  returnRoutes = cloneDeep(routesRaw.value);
@@ -433,3 +433,4 @@ const useRouteStore = defineStore(
433
433
  );
434
434
 
435
435
  export default useRouteStore;
436
+ export type RouteStore = ReturnType<typeof useRouteStore>;
@@ -369,3 +369,4 @@ const useSettingsStore = defineStore(
369
369
  );
370
370
 
371
371
  export default useSettingsStore;
372
+ export type SettingsStore = ReturnType<typeof useSettingsStore>;
@@ -336,3 +336,4 @@ const useTabbarStore = defineStore(
336
336
  );
337
337
 
338
338
  export default useTabbarStore;
339
+ export type TabbarStore = ReturnType<typeof useTabbarStore>;
@@ -1,5 +1,5 @@
1
1
  import type { AxiosRequestHeaders } from 'axios';
2
- import type { LocationQueryValue } from 'vue-router';
2
+ import type { ComputedRef } from 'vue';
3
3
  import { postAuthChangeLoginOrg, postAuthLogin } from '@/api/modules/auth';
4
4
  import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, putRbacUserChangePassword } from '@/api/modules/rbac';
5
5
  import { usePubinfoContext } from '@/context';
@@ -8,7 +8,50 @@ import { find } from 'lodash-es';
8
8
  import { defineStore } from 'pinia';
9
9
  import { STORE_NAME } from '../enum';
10
10
 
11
- const useUserStore = defineStore(
11
+ export interface UserStore {
12
+ /** 用户信息 */
13
+ user: User
14
+
15
+ /** 用户组织名称 */
16
+ userOrgName: ComputedRef<string>
17
+
18
+ /** 是否登录 */
19
+ isLogin: ComputedRef<boolean>
20
+
21
+ /** 获取用户信息 */
22
+ getUserInfo: () => Promise<API.ResponseDataPubUserBo>
23
+
24
+ /** 获取用户权限码 */
25
+ getPermissions: () => Promise<string[]>
26
+
27
+ /** 登录 */
28
+ login: (data: {
29
+ account: string
30
+ password: string
31
+ captchas: string
32
+ captchaHash: string
33
+ loginType?: 'password' | string
34
+ }) => Promise<void>
35
+
36
+ /** 登出 */
37
+ logout: () => void
38
+
39
+ /** 修改密码 */
40
+ changeUserPassword: (form: API.putRbacUserChangePasswordParams & {
41
+ token?: string | string[]
42
+ }) => Promise<API.ResponseDataVoid>
43
+
44
+ /** 切换组织 */
45
+ changeOrg: (changeOrgId: string) => Promise<void>
46
+
47
+ /** 设置TOKEN */
48
+ setToken: (accessToken: string, refreshToken: string) => void
49
+
50
+ /** 清空用户信息 */
51
+ clean: () => void
52
+ }
53
+
54
+ const useUserStore = defineStore<STORE_NAME.USER, UserStore>(
12
55
  STORE_NAME.USER,
13
56
  () => {
14
57
  const { router } = usePubinfoContext();
@@ -65,7 +108,7 @@ const useUserStore = defineStore(
65
108
  password: string
66
109
  captchas: string
67
110
  captchaHash: string
68
- loginType?: 'password'
111
+ loginType?: 'password' | string
69
112
  }) {
70
113
  const {
71
114
  account: loginName,
@@ -83,14 +126,13 @@ const useUserStore = defineStore(
83
126
  code,
84
127
  });
85
128
  const { accessToken, refreshToken } = result.data as Required<API.LoginTokenVo>;
86
- await setToken(accessToken, refreshToken);
129
+ setToken(accessToken, refreshToken);
87
130
  }
88
131
 
89
132
  /**
90
133
  * 执行用户注销操作,并跳转到登录页面。
91
- * @param _redirect - 注销后的重定向路径,默认为当前页面的完整路径。
92
134
  */
93
- async function logout(_redirect = router?.currentRoute.value.fullPath) {
135
+ function logout() {
94
136
  router?.push({
95
137
  name: 'Login',
96
138
  });
@@ -123,6 +165,7 @@ const useUserStore = defineStore(
123
165
  if (userData.userOrgList?.length && !user.orgId) {
124
166
  user.orgId = find(userData.userOrgList, ['main', true])!.orgId!;
125
167
  }
168
+ return res;
126
169
  }
127
170
 
128
171
  /**
@@ -130,7 +173,7 @@ const useUserStore = defineStore(
130
173
  * @param form - 包含要修改的密码和令牌的表单数据
131
174
  * @returns 修改密码的结果
132
175
  */
133
- async function changeUserPassword(form: API.putRbacUserChangePasswordParams & { token?: LocationQueryValue | LocationQueryValue[] }) {
176
+ async function changeUserPassword(form: API.putRbacUserChangePasswordParams & { token?: string | string[] }) {
134
177
  const headers = {} as AxiosRequestHeaders;
135
178
  if (form.token) {
136
179
  headers.authorization = form.token;
@@ -151,7 +194,7 @@ const useUserStore = defineStore(
151
194
  * @param accessToken 访问令牌
152
195
  * @param refreshToken 刷新令牌数据
153
196
  */
154
- async function setToken(accessToken: string, refreshToken: string) {
197
+ function setToken(accessToken: string, refreshToken: string) {
155
198
  user.token = accessToken;
156
199
  user.refreshToken = refreshToken;
157
200
  }
@@ -173,33 +216,25 @@ const useUserStore = defineStore(
173
216
  async function changeOrg(changeOrgId: string) {
174
217
  const res = await postAuthChangeLoginOrg({ orgId: changeOrgId });
175
218
  const { accessToken, refreshToken } = res.data as Required<API.LoginTokenVo>;
176
- await setToken(accessToken, refreshToken);
219
+ setToken(accessToken, refreshToken);
177
220
  user.orgId = changeOrgId;
178
221
  router?.push({
179
222
  path: '/',
180
223
  });
181
224
  }
182
225
 
183
- async function phoneLogin(phone: string, verify: string) {
184
- // message.success(`${phone}登录成功`);
185
- // await setToken(accessToken, refreshTokenData);
186
- // await getUserInfo();
187
- }
188
-
189
226
  return {
190
227
  user,
228
+ userOrgName,
191
229
  isLogin,
230
+ getUserInfo,
231
+ getPermissions,
192
232
  login,
193
233
  logout,
194
- phoneLogin,
195
- getPermissions,
196
234
  changeUserPassword,
197
- userOrgName,
198
235
  changeOrg,
199
236
  setToken,
200
- getUserInfo,
201
237
  clean,
202
- ...toRefs(user),
203
238
  };
204
239
  },
205
240
  {
@@ -13,7 +13,7 @@ import useUserStore from '../../modules/user';
13
13
  export function createFavoritesStoragePlugin({ store }: PiniaPluginContext) {
14
14
  if (store.$id === STORE_NAME.FAVORITES) {
15
15
  const favoritesStore = store as ReturnType<typeof useFavoritesStore>;
16
- const favoritesId = computed(() => useUserStore().account);
16
+ const favoritesId = computed(() => useUserStore().user.account);
17
17
  const settingsStore = useSettingsStore();
18
18
 
19
19
  // list 变化时更新存储
@@ -14,7 +14,7 @@ import useUserStore from '../../modules/user';
14
14
  export function createTabbarStoragePlugin({ store }: PiniaPluginContext) {
15
15
  if (store.$id === STORE_NAME.TABBAR) {
16
16
  const tabbarStore = store as ReturnType<typeof useTabbarStore>;
17
- const tabbarId = computed(() => useUserStore().account);
17
+ const tabbarId = computed(() => useUserStore().user.account);
18
18
  const settingsStore = useSettingsStore();
19
19
 
20
20
  // list 变化时更新存储
@@ -1,8 +0,0 @@
1
- interface PubinfoProviderProps {
2
- loadIcon?: (name?: string) => any;
3
- }
4
- export declare const pubinfoInjectionKey: InjectionKey<PubinfoProviderProps>;
5
- export declare function createPubinfoProvider(props: PubinfoProviderProps): void;
6
- export declare function useProvider(): any;
7
- declare const _default: any;
8
- export default _default;
@@ -1,8 +0,0 @@
1
- /**
2
- * 处理身份验证和权限检查的自定义钩子。
3
- * @returns 包含 auth 和 authAll 函数的对象。
4
- */
5
- export declare function useAuth(): {
6
- auth: (value: string | string[]) => any;
7
- authAll: (value: string[]) => boolean;
8
- };
package/es/interface.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { Pinia } from 'pinia';
2
- import { App } from 'vue';
3
- import { Router, RouterOptions as VueRouterOptions } from 'vue-router';
4
- type PartialKeys<T, Keys extends keyof T> = Omit<T, Keys> & Partial<Pick<T, Keys>>;
5
- export type RouterOptions = PartialKeys<VueRouterOptions, 'history'> & {
6
- base?: string;
7
- };
8
- export interface Context {
9
- app: App<Element>;
10
- store: Pinia;
11
- router: Router;
12
- }
13
- export interface Options {
14
- rootContainer?: string | Element;
15
- immediate?: boolean;
16
- modules?: ModuleOptions[];
17
- hooks?: Partial<Hooks>;
18
- }
19
- export interface Module {
20
- name: string;
21
- setup?: (ctx: Context) => void;
22
- enforce?: 'pre' | 'post';
23
- hooks?: Partial<Hooks>;
24
- }
25
- export type FalsyModule = false | null | undefined;
26
- export type ModuleOptions = Module | ModuleOptions[] | FalsyModule;
27
- export interface Hooks {
28
- }
29
- export {};