feat: watch duration

This commit is contained in:
Fine 2023-01-31 15:17:24 +08:00
parent a19e06f4d4
commit c40a98375f

View File

@ -45,7 +45,7 @@ limitations under the License. -->
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, ref, defineComponent } from "vue"; import { computed, ref, defineComponent, watch } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useAppStoreWithOut } from "@/store/modules/app"; import { useAppStoreWithOut } from "@/store/modules/app";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
@ -134,6 +134,12 @@ limitations under the License. -->
}; };
source.value = useSourceProcessor(json, d); source.value = useSourceProcessor(json, d);
} }
watch(
() => appStoreWithOut.durationTime,
() => {
queryMetrics();
},
);
return { return {
t, t,
graph, graph,