diff --git a/src/views/idChinese.vue b/src/views/idChinese/idChinese.vue
similarity index 59%
rename from src/views/idChinese.vue
rename to src/views/idChinese/idChinese.vue
index 9f8fc8772..13e63234d 100644
--- a/src/views/idChinese.vue
+++ b/src/views/idChinese/idChinese.vue
@@ -5,7 +5,7 @@
@@ -27,35 +27,43 @@
-
-
diff --git a/src/views/idChinese/idChinese.worker.ts b/src/views/idChinese/idChinese.worker.ts
new file mode 100644
index 000000000..69d7e9c7a
--- /dev/null
+++ b/src/views/idChinese/idChinese.worker.ts
@@ -0,0 +1,7 @@
+import { all } from '@/utils/idCard.js'
+
+self.addEventListener('message', (e) => {
+ const { idData } = e.data
+ const result = all(idData)
+ self.postMessage(result)
+})
diff --git a/vite.config.ts b/vite.config.ts
index c7edc222d..29c3420cb 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -176,5 +176,8 @@ export default defineConfig({
javascriptEnabled: true
}
}
+ },
+ worker: {
+ format: 'es'
}
})