Skip to content

Commit

Permalink
fix(finance-management): 私有云计费,重命名后编辑无法回显最新名称
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Jun 27, 2023
1 parent 4b87d42 commit 22096dc
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const props = defineProps<{
*/
operate: "VIEW" | "EDIT" | "CREATE";
}>();
/**
* 刷新详情
* @param policyId 策略id
Expand All @@ -73,6 +74,24 @@ const billingPolicyId = computed(() => {
}
return undefined;
});
const billingPolicyName = computed(() => {
if (props.billingPolicy) {
return props.billingPolicy.name;
}
return undefined;
});
watch(
() => billingPolicyName,
() => {
if (billingPolicyName.value) {
policyForm.value.name = billingPolicyName.value;
}
},
{ deep: true }
);
watch(
billingPolicyId,
() => {
Expand Down

0 comments on commit 22096dc

Please sign in to comment.