li.shaoyi 3 tahun lalu
induk
melakukan
3d0c13b466

+ 3 - 3
src/packages/mobile/router/animateRouter.ts

@@ -32,7 +32,7 @@ export default new (class {
      * @param options 
      * @returns 
      */
-    create(options: RouterOptions) {
+    create = (options: RouterOptions) => {
         const router = createRouter(options);
         const { push, replace, go, forward, back } = router;
         const { actionName } = toRefs(this._state.value);
@@ -73,7 +73,7 @@ export default new (class {
         }
 
         router.beforeResolve((to) => {
-            this.add(to);
+            this.addHistory(to);
         })
 
         return router;
@@ -83,7 +83,7 @@ export default new (class {
      * 添加历史记录
      * @param route 
      */
-    private add(route: RouteLocationNormalized) {
+    private addHistory = (route: RouteLocationNormalized) => {
         const { historyStacks, excludeName, actionName, transitionName } = toRefs(this._state.value);
         excludeName.value = [];
 

+ 1 - 1
src/packages/pc/components/layouts/sidebar/index.vue

@@ -33,7 +33,7 @@ const hideSidebar = (value: boolean) => {
 
 // 监听设备变化
 const isMobile = computed(() => {
-  const flag = globalState.getValue('isMobile');
+  const flag = false;
   if (flag) {
     hideSidebar(true);
   } else {

+ 0 - 1
src/store/state/index.ts

@@ -5,7 +5,6 @@ import { merge } from '@/utils/object'
  * 初始数据
  */
 const source: Store.GlobalState = {
-    isMobile: false,
     goodsList: [],
     quoteList: [],
     accountList: [],

+ 0 - 1
src/types/store/state.d.ts

@@ -1,7 +1,6 @@
 declare namespace Store {
     /** 全局状态数据 */
     interface GlobalState {
-        isMobile: boolean;
         goodsList: Ermcp.Goods[]; // 商品列表
         quoteList: Ermcp.QuoteDay[]; // 盘面列表
         accountList: Ermcp.TaAccountsRsp[]; // 资金账号列表