From 64ebc160257482b1ddcae9f853de5f80d1af735f Mon Sep 17 00:00:00 2001 From: fengyon <84690330+fengyon@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:01:45 -0700 Subject: [PATCH] fix(toolkit/pro): fix the error: Maximum call stack size exceeded (#136) * fix(toolkit/pro): fix the error: Maximum call stack size exceeded fix #128 * fix(toolkit/pro): fix the error: Maximum call stack size exceeded --- packages/toolkits/pro/package.json | 2 +- .../toolkits/pro/template/tinyvue/src/router/routes/index.ts | 2 +- .../pro/template/tinyvue/src/store/modules/app/index.ts | 2 +- .../pro/template/tinyvue/src/store/modules/user/index.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/toolkits/pro/package.json b/packages/toolkits/pro/package.json index f2f15ca8..336681a3 100644 --- a/packages/toolkits/pro/package.json +++ b/packages/toolkits/pro/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-toolkit-pro", - "version": "1.0.20", + "version": "1.0.21", "description": "TinyPro 开箱即用的中后台前端/设计解决方案", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/toolkits/pro/template/tinyvue/src/router/routes/index.ts b/packages/toolkits/pro/template/tinyvue/src/router/routes/index.ts index aa3c8ac8..ee0ca2cc 100644 --- a/packages/toolkits/pro/template/tinyvue/src/router/routes/index.ts +++ b/packages/toolkits/pro/template/tinyvue/src/router/routes/index.ts @@ -1,6 +1,6 @@ import type { RouteRecordRaw } from 'vue-router'; -const modules = import.meta.globEager('./modules/*.ts'); +const modules = import.meta.glob('./modules/*.ts', { eager: true }); const appRoutes: RouteRecordRaw[] = []; Object.keys(modules).forEach((key) => { diff --git a/packages/toolkits/pro/template/tinyvue/src/store/modules/app/index.ts b/packages/toolkits/pro/template/tinyvue/src/store/modules/app/index.ts index d1d3c0c2..7bb6bc7b 100644 --- a/packages/toolkits/pro/template/tinyvue/src/store/modules/app/index.ts +++ b/packages/toolkits/pro/template/tinyvue/src/store/modules/app/index.ts @@ -7,7 +7,7 @@ const useAppStore = defineStore('app', { getters: { appCurrentSetting(state: AppState): AppState { - return { ...state }; + return state; }, appDevice(state: AppState) { return state.device; diff --git a/packages/toolkits/pro/template/tinyvue/src/store/modules/user/index.ts b/packages/toolkits/pro/template/tinyvue/src/store/modules/user/index.ts index 998dedaf..09992554 100644 --- a/packages/toolkits/pro/template/tinyvue/src/store/modules/user/index.ts +++ b/packages/toolkits/pro/template/tinyvue/src/store/modules/user/index.ts @@ -37,7 +37,7 @@ const useUserStore = defineStore('user', { getters: { userInfo(state: UserState): UserState { - return { ...state }; + return state; }, },