소스 검색

refactor(photography): 优化国际化调用方式

- 将 $t 方法替换为 i18n.global.t 以统一国际化调用
- 保持原有的白底导出和产品相册功能不变
- 提高代码的一致性和可维护性
panqiuyao 19 시간 전
부모
커밋
89f709ee44
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      frontend/src/views/Photography/detail.vue

+ 2 - 2
frontend/src/views/Photography/detail.vue

@@ -542,8 +542,8 @@ const launchExternalTool = async (pagePath: string, successMessage: string) => {
   }
 }
 
-const handleWhiteBgExportClick = () => launchExternalTool('/copy_800_tool', $t('photoDetail2.whiteBgExportStarted'))
-const handleProductAlbumClick = () => launchExternalTool('/product_list', $t('photoDetail2.productAlbumStarted'))
+const handleWhiteBgExportClick = () => launchExternalTool('/copy_800_tool', i18n.global.t('photoDetail2.whiteBgExportStarted'))
+const handleProductAlbumClick = () => launchExternalTool('/product_list', i18n.global.t('photoDetail2.productAlbumStarted'))
 
 // 货号选择弹窗相关状态
 const goodsSelectDialogVisible = ref(false)