halo/console/packages
Ryan Wang 44cb311fac
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 控制是否显示(渲染)。
```
2023-12-29 07:15:39 +00:00
..
api-client Bump versions to 2.12.0-SNAPSHOT for next development (#4968) 2023-12-01 08:34:09 +00:00
components refactor: visible condition of modal component (#5078) 2023-12-29 07:15:39 +00:00
editor fix: fix anchor positioning for identical table of contents names (#5101) 2023-12-26 10:48:06 +00:00
shared Bump versions to 2.12.0-SNAPSHOT for next development (#4968) 2023-12-01 08:34:09 +00:00
ui-plugin-bundler-kit Bump versions to 2.12.0-SNAPSHOT for next development (#4968) 2023-12-01 08:34:09 +00:00