mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
23 lines
460 B
Vue
23 lines
460 B
Vue
|
<template>
|
||
|
<el-button :plain="true" @click="openHTML">Use HTML String</el-button>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent } from 'vue'
|
||
|
import { ElMessage } from 'element-plus'
|
||
|
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const openHTML = () => {
|
||
|
ElMessage({
|
||
|
dangerouslyUseHTMLString: true,
|
||
|
message: '<strong>This is <i>HTML</i> string</strong>',
|
||
|
})
|
||
|
}
|
||
|
return {
|
||
|
openHTML,
|
||
|
}
|
||
|
},
|
||
|
})
|
||
|
</script>
|