update graph

This commit is contained in:
Qiuxia Fan 2022-07-07 11:48:10 +08:00
parent 84315db9c5
commit f1b5b9890a

View File

@ -14,14 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<Line :data="data" :intervalTime="intervalTime" :config="config" /> <Line
:data="data"
:intervalTime="intervalTime"
:config="config"
@click="clickEvent"
/>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import type { PropType } from "vue"; import type { PropType } from "vue";
import Line from "./Line.vue"; import Line from "./Line.vue";
import { AreaConfig } from "@/types/dashboard"; import { AreaConfig, EventParams } from "@/types/dashboard";
/*global defineProps */ /*global defineProps, defineEmits */
const emits = defineEmits(["click"]);
defineProps({ defineProps({
data: { data: {
type: Object as PropType<{ [key: string]: number[] }>, type: Object as PropType<{ [key: string]: number[] }>,
@ -41,4 +47,7 @@ defineProps({
default: () => ({}), default: () => ({}),
}, },
}); });
function clickEvent(params: EventParams) {
emits("click", params);
}
</script> </script>