diff --git a/src/components/Echart/src/Echart.vue b/src/components/Echart/src/Echart.vue index 84f23da..58cae29 100644 --- a/src/components/Echart/src/Echart.vue +++ b/src/components/Echart/src/Echart.vue @@ -20,7 +20,7 @@ const props = defineProps({ type: Object as PropType, required: true }, - width: propTypes.oneOfType([Number, String]).def(''), + width: propTypes.oneOfType([Number, String]).def('100%'), height: propTypes.oneOfType([Number, String]).def('500px') }) @@ -86,7 +86,9 @@ const contentResizeHandler = async (e: TransitionEvent) => { } onMounted(() => { - initChart() + setTimeout(() => { + initChart() + }, 0) window.addEventListener('resize', resizeHandler) diff --git a/src/views/Components/Dialog.vue b/src/views/Components/Dialog.vue index a718489..cd7e16a 100644 --- a/src/views/Components/Dialog.vue +++ b/src/views/Components/Dialog.vue @@ -7,6 +7,7 @@ import { Form, FormSchema } from '@/components/Form' import { useValidator } from '@/hooks/web/useValidator' import { getDictOneApi } from '@/api/common' import { useForm } from '@/hooks/web/useForm' +import Echart from './Echart.vue' const { required } = useValidator() @@ -113,7 +114,7 @@ const formSubmit = async () => { -
{{ v }}
+