diff --git a/console/packages/components/src/components/modal/Modal.stories.ts b/console/packages/components/src/components/modal/Modal.stories.ts index a18f76a6bf..87eb41c787 100644 --- a/console/packages/components/src/components/modal/Modal.stories.ts +++ b/console/packages/components/src/components/modal/Modal.stories.ts @@ -4,6 +4,7 @@ import { VModal } from "."; import { VButton } from "../button"; import { IconArrowLeft, IconArrowRight } from "@/icons/icons"; import { VSpace } from "../space"; +import { ref } from "vue"; const meta: Meta = { title: "Modal", @@ -12,16 +13,20 @@ const meta: Meta = { render: (args) => ({ components: { VModal, VButton, VSpace, IconArrowLeft, IconArrowRight }, setup() { - return { args }; + const modal = ref(); + return { args, modal }; }, template: ` 打开 diff --git a/console/packages/components/src/components/modal/Modal.vue b/console/packages/components/src/components/modal/Modal.vue index 967cca40d8..cbccf7aa99 100644 --- a/console/packages/components/src/components/modal/Modal.vue +++ b/console/packages/components/src/components/modal/Modal.vue @@ -1,5 +1,5 @@