@@ -10,7 +10,7 @@
<script lang="ts" setup>
import { ElLoading } from "element-plus";
-import zhCn from "element-plus/locale/zh-cn.mjs";
+import zhCn from "element-plus/es/locale/lang/zh-cn";
import { lifeHook } from "./request/state";
let loading: ReturnType<typeof ElLoading.service> | null = null;
@@ -15,10 +15,7 @@ export const throttle = <T extends (...args: any) => any>(
) => {
let previous = 0;
- return function <Args extends Array<any>, This>(
- this: This,
- ...args: Parameters<T>
- ) {
+ return function <This>(this: This, ...args: Parameters<T>) {
const now = Date.now();
if (now - previous >= delay) {
fn.apply(this, args);
@@ -1,5 +1,3 @@
/// <reference types="vite/client" />
import "element-plus/global.d.ts";
-
-declare module "element-plus/dist/locale/zh-cn.mjs";