From a9453aa9195fe419654d88a44a6d6f15ff7a1ba9 Mon Sep 17 00:00:00 2001 From: Megghy Date: Wed, 8 Oct 2025 02:39:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A1=AE=E4=BF=9D=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AF=B9=E8=B1=A1=E5=AD=98=E5=9C=A8=E5=B9=B6?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=9B=E6=9B=B4=E6=96=B0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=8E=A7=E4=BB=B6=E4=BB=A5=E6=94=AF=E6=8C=81=20guardF?= =?UTF-8?q?ree=20=E5=92=8C=20allowGuardLevel=20=E7=9A=84=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/point/PointManage.vue | 38 ++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/views/manage/point/PointManage.vue b/src/views/manage/point/PointManage.vue index 6be67ea..7bab1d9 100644 --- a/src/views/manage/point/PointManage.vue +++ b/src/views/manage/point/PointManage.vue @@ -316,10 +316,15 @@ function OnFileListChange(files: UploadFileInfo[]) { } function onUpdateClick(item: ResponsePointGoodModel) { + const copiedItem = JSON.parse(JSON.stringify(item)) + // 确保 setting 对象存在 + if (!copiedItem.setting) { + copiedItem.setting = { + allowGuardLevel: 0, + } + } currentGoodsModel.value = { - goods: JSON.parse(JSON.stringify({ - ...item, - })), + goods: copiedItem, fileList: item.cover ? [ { @@ -949,6 +954,9 @@ onMounted(() => { }) :checked="currentGoodsModel.goods.setting?.guardFree != undefined" @update:checked=" (v) => { + if (!currentGoodsModel.goods.setting) { + currentGoodsModel.goods.setting = { allowGuardLevel: 0 }; + } // @ts-ignore currentGoodsModel.goods.setting.guardFree = v ? { year: undefined, month: undefined } : undefined; } @@ -978,12 +986,22 @@ onMounted(() => { }) :gap="8" > @@ -1009,7 +1027,15 @@ onMounted(() => { }) - + 不限