@sigmaott/base-next 1.1.8 → 1.2.0

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.
package/nuxt.config.ts CHANGED
@@ -67,7 +67,7 @@ export default defineNuxtConfig({
67
67
 
68
68
  imports: {
69
69
  dirs: [
70
- './constants',
70
+ resolve('./constants'),
71
71
  // all hooks, helper folders in components folder
72
72
  'components/**/*/hooks/*.ts',
73
73
  'components/**/*/helpers/*.ts',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sigmaott/base-next",
3
3
  "type": "module",
4
- "version": "1.1.8",
4
+ "version": "1.2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/src/api/axios.ts CHANGED
@@ -18,7 +18,14 @@ export const service = axios.create({
18
18
  baseURL: window.__NUXT__.config.public.apiBase,
19
19
  })
20
20
 
21
- const showError = useThrottleFn((statusCode: any, error: any) => {
21
+ let lastErrorTime = 0
22
+ const showError = (statusCode: any, error: any) => {
23
+ const now = Date.now()
24
+ if (now - lastErrorTime < 1500) {
25
+ return // Skip if called too frequently
26
+ }
27
+ lastErrorTime = now
28
+
22
29
  ElNotification({
23
30
  title: `${[window.translate?.('global.error'), statusCode || ''].join(' ')}`,
24
31
  type: 'error',
@@ -28,7 +35,7 @@ const showError = useThrottleFn((statusCode: any, error: any) => {
28
35
  customClass: '!w-[650px] !z-69999',
29
36
  modalClass: '!z-69999',
30
37
  })
31
- }, 1500)
38
+ }
32
39
 
33
40
  export function addInterceptor(service: AxiosInstance, transformRes?: (res) => any) {
34
41
  service.interceptors.request.use((config) => {
@@ -1 +1 @@
1
- 1752465830743
1
+ 1752475292076