element-plus/docs/examples/message/basic.vue
云游君 6b7bc4fd94
refactor(theme-chalk): message css var & add getCssVarName (#6488)
* refactor(theme-chalk): message css var & add getCssVarName

* Update closable.vue
2022-03-08 21:08:19 +08:00

23 lines
481 B
Vue

<template>
<el-button :plain="true" @click="open">Show message</el-button>
<el-button :plain="true" @click="openVn">VNode</el-button>
</template>
<script lang="ts" setup>
import { h } from 'vue'
import { ElMessage } from 'element-plus'
const open = () => {
ElMessage('this is a message.')
}
const openVn = () => {
ElMessage({
message: h('p', null, [
h('span', null, 'Message can be '),
h('i', { style: 'color: teal' }, 'VNode'),
]),
})
}
</script>