From ba95bae7ef1d5f8faf9d7c73c98e54ce3e346f00 Mon Sep 17 00:00:00 2001 From: my_ong <429426262@qq.com> Date: Tue, 10 Dec 2024 12:54:49 +0800 Subject: [PATCH] =?UTF-8?q?bug:=20=E4=BF=AE=E6=94=B9eslint=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=9A=84=E4=BB=A3=E7=A0=81=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stock/component/apply-form.vue | 8 ++++---- vite.config.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/stock/component/apply-form.vue b/src/views/stock/component/apply-form.vue index baf6a66..3ffc896 100644 --- a/src/views/stock/component/apply-form.vue +++ b/src/views/stock/component/apply-form.vue @@ -151,9 +151,9 @@ // 选中时在末尾新增一行 // value: number, option: { label: string, value: number } - const insertEvent = (value: string) => { + const insertEvent = (value: string | number) => { // 根据value找到对应的物料信息 - const m = materialList.value.find((item) => item.id === (value ? parseInt(value) : -1)) + const m = materialList.value.find((item) => item.id === value) if (m) { const row: RowVO = { id: m.id ? m.id : -1, @@ -174,12 +174,12 @@ } // 取消选中时,删除table中的行 - const removeEvent = (value: string) => { + const removeEvent = (value: string | number) => { const $table = tableRef.value // 根据value找到对应的行 if ($table) { $table.getTableData().fullData.forEach((item) => { - if (item.id === (value ? parseInt(value) : -1)) { + if (item.id === value) { $table.remove(item) } }) diff --git a/vite.config.ts b/vite.config.ts index d937eee..b95741e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -60,7 +60,7 @@ export default defineConfig(({ mode }) => { proxy: { '/api': { // target: 'https://iot.riemann.tech/api/', - target: 'http://127.0.0.1:7777', + target: 'http://127.0.0.1:8888', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), },