Skip to content

Commit

Permalink
✨ [doc/dialog] add closing control demo
Browse files Browse the repository at this point in the history
  • Loading branch information
higuaifan committed Jan 7, 2025
1 parent d4babb0 commit 434cd3e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
20 changes: 20 additions & 0 deletions doc/demos/message/dialog/closingControl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup lang="ts">
import { useDialog } from 'shuimo-ui';
const { visible, closeDialog } = useDialog();
</script>

<template>

<m-dialog v-model:visible="visible" :close-btn="false">
<template #active>
<m-button>点击显示弹窗</m-button>
</template>
<div><m-button @click="closeDialog">关闭</m-button></div>
</m-dialog>

</template>

<style scoped>
</style>
3 changes: 2 additions & 1 deletion doc/i18n/components/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const message = {
'点击控制': 'Click Control',
'普通悬浮提示': 'Basic Tooltip',
'普通确认框': 'Basic Confirm',
'控制关闭': 'Closing Control',
},
zh: {
'普通弹窗': '普通弹窗',
Expand All @@ -33,6 +34,6 @@ export const message = {
'点击控制': '点击控制',
'普通悬浮提示': '普通悬浮提示',
'普通确认框': '普通确认框',

'控制关闭': '控制关闭',
},
};
4 changes: 4 additions & 0 deletions doc/pages/docs/components/message/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

::: demo message/dialog/height

### {{$t(\'控制关闭\')}}

::: demo message/dialog/closingControl

## API

::: api message/dialog

0 comments on commit 434cd3e

Please sign in to comment.