Switch examples options to composition

pull/3774/head
Tuğçe Küçükoğlu 2023-03-20 12:59:03 +03:00
parent 2ce5ef2771
commit b1cacb2778
1 changed files with 7 additions and 7 deletions

View File

@ -2,23 +2,23 @@
<div class="relative doc-section-code">
<div class="flex surface-card align-items-center justify-content-end absolute z-2" :style="{ right: '.75rem', top: '.75rem', gap: '.75rem' }">
<template v-if="codeMode !== 'basic' && !hideToggleCode">
<Button
:class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-active text-primary': codeLang === 'javascript' }]"
label="Options API"
@click="codeLang = 'options'"
></Button>
<Button
:class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-active text-primary': codeLang === 'typescript' }]"
label="Composition API"
@click="codeLang = 'composition'"
></Button>
<Button
:class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-active text-primary': codeLang === 'javascript' }]"
label="Options API"
@click="codeLang = 'options'"
></Button>
</template>
<template v-if="!hideToggleCode">
<Button
v-tooltip.bottom="{ value: 'Toggle Full Code', class: 'doc-section-code-tooltip' }"
type="button"
@click="toggleCodeMode('options')"
@click="toggleCodeMode('composition')"
class="p-button-rounded p-button-text p-button-plain h-2rem w-2rem p-0 inline-flex align-items-center justify-content-center"
icon="pi pi-code"
></Button>
@ -155,7 +155,7 @@ export default {
data() {
return {
codeMode: 'basic',
codeLang: this.code['options'] ? 'options' : 'basic'
codeLang: this.code['options'] ? 'composition' : 'basic'
};
},
methods: {