element-plus/docs/.vitepress/vitepress/components/demo/vp-source-code.vue
msidolphin 8210a307e3
fix(docs): jitter when expand source code (#6279)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2022-02-25 17:04:45 +08:00

28 lines
461 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>
</div>
</template>
<style scoped lang="scss">
.language-vue {
margin: 0;
border-radius: 0;
}
</style>