element-plus/docs/examples/config-provider/message.vue
btea 70fa3e7f26
feat(components): [el-message] config-provider message max attr (#5063)
* feat(components): [el-message] config-provider message max attr

* chore: update test

* feat: update test and message-method

* chore: format config-provider.md

* test: add multiple config-provider

* test: config-provider nesting
2022-01-08 20:03:13 +08:00

19 lines
361 B
Vue

<template>
<div>
<el-config-provider :message="config">
<el-button @click="open">open</el-button>
</el-config-provider>
</div>
</template>
<script lang="ts" setup>
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'
const config = reactive({
max: 3,
})
const open = () => {
ElMessage('this is a message.')
}
</script>