|
|
@@ -57,7 +57,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import RuleAPI, { RuleDetail, WEEK_DAY_LABEL } from "@/api/module_payment/rule";
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
+import { onMounted, ref, watch } from "vue";
|
|
|
|
|
|
interface Props {
|
|
|
ruleId: string;
|
|
|
@@ -95,4 +95,11 @@ async function fetchDetail() {
|
|
|
onMounted(() => {
|
|
|
fetchDetail();
|
|
|
});
|
|
|
+
|
|
|
+watch(() => props.ruleId, (newVal) => {
|
|
|
+ if (newVal) {
|
|
|
+ detailData.value = { status: "", created_time: "", updated_time: "" } as RuleDetail;
|
|
|
+ fetchDetail();
|
|
|
+ }
|
|
|
+});
|
|
|
</script>
|