mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
24 lines
433 B
Vue
24 lines
433 B
Vue
|
<template>
|
||
|
<el-button plain @click="openCenter">Centered text</el-button>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent } from 'vue'
|
||
|
import { ElMessage } from 'element-plus'
|
||
|
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const openCenter = () => {
|
||
|
ElMessage({
|
||
|
showClose: true,
|
||
|
message: 'Centered text',
|
||
|
center: true,
|
||
|
})
|
||
|
}
|
||
|
return {
|
||
|
openCenter,
|
||
|
}
|
||
|
},
|
||
|
})
|
||
|
</script>
|