-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: visible condition of modal component (#5078)
#### What type of PR is this? /area console /kind improvement /milestone 2.12.x #### What this PR does / why we need it: 重构 UI 的 Modal 组件,支持通过 v-if 控制是否显示(渲染)。 example: ```vue <script lang="ts" setup> import { ref } from "vue" const visible = ref(false) const modal = ref() function open() { visible.value = true } function close() { modal.value.close() } </script> <template> <button @click="open">Open</button> <VModal v-if="visible" ref="modal" title="test"> <button @click="close">Close</button> </VModal> </template> ``` #### Which issue(s) this PR fixes: Fixes #5077 #### Special notes for your reviewer: 测试方式: 1. cd console && pnpm --filter "./packages/components" storybook 2. 测试 Modal 组件在文档中是否工作正常。 3. 启动 Console 或者 UC。 4. 观察以前页面上的弹框是否工作正常。 #### Does this PR introduce a user-facing change? ```release-note 重构 UI 的 Modal 组件,支持通过 v-if 控制是否显示(渲染)。 ```
- Loading branch information
Showing
2 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters