element-plus/docs/.vitepress/vitepress/components/demo/vp-source-code.vue
2022-03-13 16:16:11 -04:00

28 lines
457 B
Vue

<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps({
source: {
type: String,
required: true,
},
})
const decoded = computed(() => {
return decodeURIComponent(props.source)
})
</script>
<template>
<div class="example-source-wrapper">
<div class="example-source language-vue" v-html="decoded" />
</div>
</template>
<style scoped lang="scss">
.language-vue {
margin: 0;
border-radius: 0;
}
</style>