diff --git a/src/router/generalService.ts b/src/router/generalService.ts index a88dbae1..358b6224 100644 --- a/src/router/generalService.ts +++ b/src/router/generalService.ts @@ -21,7 +21,6 @@ export const routesGen: Array = [ { path: "", name: "GeneralService", - redirect: "/generalService", meta: { title: "generalService", icon: "chart", diff --git a/src/router/index.ts b/src/router/index.ts index 13b8ace9..6964388c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -53,6 +53,10 @@ router.beforeEach((to, from, next) => { } (window as any).axiosCancel = []; } - next(); + if (to.path === "/") { + next({ path: "/generalService" }); + } else { + next(); + } }); export default router; diff --git a/src/utils/loading.ts b/src/utils/loading.ts index edbfb349..8cdfa071 100644 --- a/src/utils/loading.ts +++ b/src/utils/loading.ts @@ -14,11 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { ElLoading, ILoadingInstance } from "element-plus"; +import { ElLoading } from "element-plus"; + type Props = { text?: string; fullscreen?: boolean }; export default function (): { - loading: (props: Props) => ILoadingInstance; + loading: (props: Props) => any; } { const loading = (props: Props) => { const loadingInstance = ElLoading.service(props); diff --git a/src/views/dashboard/configuration/WidgetConfig.vue b/src/views/dashboard/configuration/WidgetConfig.vue index 863af2f5..a90605c6 100644 --- a/src/views/dashboard/configuration/WidgetConfig.vue +++ b/src/views/dashboard/configuration/WidgetConfig.vue @@ -15,7 +15,11 @@ limitations under the License. --> -