Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
feat: code-core.vueをscript setupに変更 #122
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Aug 16, 2022
1 parent a09beb8 commit 5caba7d
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions src/client/app/common/views/components/code-core.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
<template>
<code class="inline" v-if="inline">{{ code }}</code>
<highlightjs v-else :language="lang" :code="code"/>
<code class="inline" v-if="inline">{{ code }}</code>
<highlightjs v-else :language="lang" :code="code" />
</template>

<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: {
code: {
type: String,
required: true
},
lang: {
type: String,
required: false
},
inline: {
type: Boolean,
required: false
}
<script setup lang="ts">
const { code, lang, inline } = defineProps({
code: {
type: String,
required: true,
},
lang: {
type: String,
required: false,
},
inline: {
type: Boolean,
required: false,
},
});
</script>
Expand Down

0 comments on commit 5caba7d

Please sign in to comment.