@@ -4,11 +4,16 @@ import { NButton } from 'naive-ui'
44import { fetchClearUserPrompt , fetchDeleteUserPrompt , fetchImportUserPrompt , fetchUpsertUserPrompt , fetchUserPromptList } from ' @/api'
55import { UserPrompt } from ' @/components/common/Setting/model'
66import { useBasicLayout } from ' @/hooks/useBasicLayout'
7- import { t } from ' @/locales'
87import { useAuthStoreWithout , usePromptStore } from ' @/store'
98import { SvgIcon } from ' ..'
109import PromptRecommend from ' ../../../assets/recommend.json'
1110
11+ const props = defineProps <Props >()
12+
13+ const emit = defineEmits <Emit >()
14+
15+ const { t } = useI18n ()
16+
1217interface DataProps {
1318 _id? : string
1419 title: string
@@ -24,10 +29,6 @@ interface Emit {
2429 (e : ' update:visible' , visible : boolean ): void
2530}
2631
27- const props = defineProps <Props >()
28-
29- const emit = defineEmits <Emit >()
30-
3132const message = useMessage ()
3233
3334const show = computed ({
@@ -399,7 +400,7 @@ async function handleGetUserPromptList() {
399400 <NModal v-model:show =" show" style =" width : 90% ; max-width : 900px ;" preset =" card" >
400401 <div class =" space-y-4" >
401402 <NTabs type =" segment" >
402- <NTabPane name =" local" :tab =" $ t('store.local')" >
403+ <NTabPane name =" local" :tab =" t('store.local')" >
403404 <div
404405 class =" flex gap-3 mb-4"
405406 :class =" [isMobile ? 'flex-col' : 'flex-row justify-between']"
@@ -410,28 +411,28 @@ async function handleGetUserPromptList() {
410411 size =" small"
411412 @click =" changeShowModal('add')"
412413 >
413- {{ $ t('common.add') }}
414+ {{ t('common.add') }}
414415 </NButton >
415416 <NButton
416417 size =" small"
417418 @click =" changeShowModal('local_import')"
418419 >
419- {{ $ t('common.import') }}
420+ {{ t('common.import') }}
420421 </NButton >
421422 <NButton
422423 size =" small"
423424 :loading =" exportLoading"
424425 @click =" exportPromptTemplate()"
425426 >
426- {{ $ t('common.export') }}
427+ {{ t('common.export') }}
427428 </NButton >
428429 <NPopconfirm @positive-click =" clearPromptTemplate" >
429430 <template #trigger >
430431 <NButton size =" small" >
431- {{ $ t('common.clear') }}
432+ {{ t('common.clear') }}
432433 </NButton >
433434 </template >
434- {{ $ t('store.clearStoreConfirm') }}
435+ {{ t('store.clearStoreConfirm') }}
435436 </NPopconfirm >
436437 </div >
437438 <div class =" flex items-center" >
@@ -474,9 +475,9 @@ async function handleGetUserPromptList() {
474475 </NListItem >
475476 </NList >
476477 </NTabPane >
477- <NTabPane name =" download" :tab =" $ t('store.online')" >
478+ <NTabPane name =" download" :tab =" t('store.online')" >
478479 <p class =" mb-4" >
479- {{ $ t('store.onlineImportWarning') }}
480+ {{ t('store.onlineImportWarning') }}
480481 </p >
481482 <div class =" flex items-center gap-4" >
482483 <NInput v-model:value =" downloadURL" placeholder =" " />
@@ -487,7 +488,7 @@ async function handleGetUserPromptList() {
487488 :loading =" importLoading"
488489 @click =" downloadPromptTemplate()"
489490 >
490- {{ $ t('common.download') }}
491+ {{ t('common.download') }}
491492 </NButton >
492493 </div >
493494 <NDivider />
0 commit comments