Skip to content

Commit 22096dc

Browse files
committed
fix(finance-management): 私有云计费,重命名后编辑无法回显最新名称
1 parent 4b87d42 commit 22096dc

File tree

1 file changed

+19
-0
lines changed
  • services/finance-management/frontend/src/views/billing_policy/components

1 file changed

+19
-0
lines changed

services/finance-management/frontend/src/views/billing_policy/components/RightContent.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const props = defineProps<{
4747
*/
4848
operate: "VIEW" | "EDIT" | "CREATE";
4949
}>();
50+
5051
/**
5152
* 刷新详情
5253
* @param policyId 策略id
@@ -73,6 +74,24 @@ const billingPolicyId = computed(() => {
7374
}
7475
return undefined;
7576
});
77+
78+
const billingPolicyName = computed(() => {
79+
if (props.billingPolicy) {
80+
return props.billingPolicy.name;
81+
}
82+
return undefined;
83+
});
84+
85+
watch(
86+
() => billingPolicyName,
87+
() => {
88+
if (billingPolicyName.value) {
89+
policyForm.value.name = billingPolicyName.value;
90+
}
91+
},
92+
{ deep: true }
93+
);
94+
7695
watch(
7796
billingPolicyId,
7897
() => {

0 commit comments

Comments
 (0)