feat: convert create-edit to script setup and ts
This commit is contained in:
parent
16d8c2224b
commit
0e14e3053d
1 changed files with 5 additions and 3 deletions
|
@ -30,7 +30,7 @@
|
|||
<x-button
|
||||
v-if="primaryLabel !== ''"
|
||||
variant="primary"
|
||||
@click.prevent.stop="primary"
|
||||
@click.prevent.stop="primary()"
|
||||
:icon="primaryIcon"
|
||||
:disabled="primaryDisabled"
|
||||
>
|
||||
|
@ -42,7 +42,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { i18n } from '@/i18n'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
defineProps({
|
||||
title: {
|
||||
|
@ -52,7 +52,8 @@ defineProps({
|
|||
primaryLabel: {
|
||||
type: String,
|
||||
default() {
|
||||
return i18n.global.t('misc.create')
|
||||
const {t} = useI18n()
|
||||
return t('misc.create')
|
||||
},
|
||||
},
|
||||
primaryIcon: {
|
||||
|
@ -76,6 +77,7 @@ defineProps({
|
|||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['create', 'primary', 'tertiary'])
|
||||
|
||||
function primary() {
|
||||
|
|
Loading…
Reference in a new issue