From ce96deb22461727821d4bcde8cc4b4a2c4989eac Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 11 Aug 2024 17:23:16 +0800 Subject: [PATCH] style: Update CustomRuleCard.vue to include rule ID field --- src/components/cards/CustomRuleCard.vue | 64 ++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/src/components/cards/CustomRuleCard.vue b/src/components/cards/CustomRuleCard.vue index f1fe6a26..524eb29b 100644 --- a/src/components/cards/CustomRuleCard.vue +++ b/src/components/cards/CustomRuleCard.vue @@ -26,12 +26,16 @@ const ruleInfo = ref({ publish_time: '', }) +// 规则ID +const ruleId = ref('') + // 规则名称 const ruleName = ref('') // 打开详情弹窗 function openRuleInfoDialog() { ruleInfo.value = props.rule + ruleId.value = props.rule.id ruleName.value = props.rule.name ruleInfoDialog.value = true } @@ -39,6 +43,7 @@ function openRuleInfoDialog() { // 保存详情数据 function saveRuleInfo() { ruleInfoDialog.value = false + ruleInfo.value.id = ruleId.value ruleInfo.value.name = ruleName.value emit('change', ruleInfo.value) } @@ -67,23 +72,68 @@ function onClose() { - - + + + + + - + - + - + - + - +