From 08d5e0e4fdb39d796a51b55628737be75e9125c7 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 9 Jan 2025 11:55:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(AiEartagPicker):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=80=B3=E6=A0=87=E9=80=89=E6=8B=A9=E5=99=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 优化代码格式和缩进 - 修复 penId 属性未使用的问题 - 改进 getEartag 方法,确保正确处理返回数据 - 更新模板中的点击事件和样式 --- project/xumu/components/AiEartagPicker.vue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/project/xumu/components/AiEartagPicker.vue b/project/xumu/components/AiEartagPicker.vue index faf2e86f..cafaf8ac 100644 --- a/project/xumu/components/AiEartagPicker.vue +++ b/project/xumu/components/AiEartagPicker.vue @@ -3,8 +3,8 @@ export default { name: "AiEartagPicker", props: { instance: Function, - value: {default: () => []}, - action: {default: "/api/breed/earTag/getEarTagByPenId"}, + value: { default: () => [] }, + action: { default: "/api/breed/earTag/getEarTagByPenId" }, penId: String }, model: { @@ -39,7 +39,7 @@ export default { getEartag() { !/undefined/.test(this.api) && this.instance.post(this.api).then(res => { if (res?.data) { - this.list = res.data + this.list = res.data?.map(v => ({ key: v, label: v })) || [] } }) }, @@ -54,15 +54,16 @@ export default { @@ -84,7 +85,7 @@ export default { right: 0; z-index: 999; - & > div { + &>div { height: 100%; } }