-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Drawer 和 Modal 添加 Esc 快捷关闭配置项 (#680)
Co-authored-by: blankzhang <[email protected]>
- Loading branch information
1 parent
3b919b4
commit 72ca443
Showing
9 changed files
with
174 additions
and
35 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<FSpace> | ||
<FForm :labelWidth="100"> | ||
<FFormItem label="点击蒙层关闭:"> | ||
<FRadioGroup | ||
v-model="maskClosable" | ||
:options="[ | ||
{ label: '是(默认)', value: true }, | ||
{ label: '否', value: false }, | ||
]" | ||
/> | ||
</FFormItem> | ||
<FFormItem label="esc关闭:"> | ||
<FRadioGroup | ||
v-model="escClosable" | ||
:options="[ | ||
{ label: '是(默认)', value: true }, | ||
{ label: '否', value: false }, | ||
]" | ||
/> | ||
</FFormItem> | ||
</FForm> | ||
</FSpace> | ||
<FSpace> | ||
<FButton @click="show = true">打开抽屉</FButton> | ||
<FDrawer | ||
v-model:show="show" | ||
title="抽屉" | ||
:maskClosable="maskClosable" | ||
:escClosable="escClosable" | ||
@ok="show = false" | ||
> | ||
<div>我是内容...</div> | ||
<div>我是内容...</div> | ||
<div>我是内容...</div> | ||
</FDrawer> | ||
</FSpace> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue'; | ||
const show = ref(false); | ||
const maskClosable = ref(true); | ||
const escClosable = ref(true); | ||
</script> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<FSpace> | ||
<FForm :labelWidth="100"> | ||
<FFormItem label="点击蒙层关闭:"> | ||
<FRadioGroup | ||
v-model="maskClosable" | ||
:options="[ | ||
{ label: '是(默认)', value: true }, | ||
{ label: '否', value: false }, | ||
]" | ||
/> | ||
</FFormItem> | ||
<FFormItem label="esc关闭:"> | ||
<FRadioGroup | ||
v-model="escClosable" | ||
:options="[ | ||
{ label: '是(默认)', value: true }, | ||
{ label: '否', value: false }, | ||
]" | ||
/> | ||
</FFormItem> | ||
</FForm> | ||
</FSpace> | ||
<FSpace> | ||
<FButton @click="show = true">打开弹窗</FButton> | ||
<FModal | ||
v-model:show="show" | ||
title="弹窗" | ||
:maskClosable="maskClosable" | ||
:escClosable="escClosable" | ||
@ok="show = false" | ||
> | ||
<div>我是内容...</div> | ||
<div>我是内容...</div> | ||
<div>我是内容...</div> | ||
</FModal> | ||
</FSpace> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue'; | ||
const show = ref(false); | ||
const maskClosable = ref(true); | ||
const escClosable = ref(true); | ||
</script> |
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