mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-26 04:27:26 +08:00
feat(components): [message-box] MessageBox can drag overflow the viewport (#15674)
feat(components): [message-box] can drag overflow the viewport
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open the Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open the Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open the Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open the Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Open a draggable Message Box</el-button>
|
||||
<el-button plain @click="open2">
|
||||
Open a overflow draggable Message Box
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@ -29,4 +32,30 @@ const open = () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const open2 = () => {
|
||||
ElMessageBox.confirm(
|
||||
'proxy will permanently delete the file. Continue?',
|
||||
'Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
draggable: true,
|
||||
overflow: true,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'Delete completed',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Delete canceled',
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button text @click="open">Click to open Message Box</el-button>
|
||||
<el-button plain @click="open">Click to open Message Box</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
Reference in New Issue
Block a user