refactor: 国际化文本迁移至全局 locales/messages.js
将组件级 i18n 对象重构为统一由全局 locales/messages.js 管理,确保中英文语言切换时正确显示对应文本。 - 新增 utils/i18n.js 国际化工具函数 - 更新 store/$t.mixin.js 翻译混入逻辑 - 迁移 pkgService、pkgBooking、pkgAccount、pkgExplore、pages 等共 58 个组件的中英文文本至全局消息表
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<view class="section-header tn-flex tn-flex-row-between tn-flex-col-center">
|
||||
<view class="title-wrap tn-flex tn-flex-col-center">
|
||||
<view class="title-accent"></view>
|
||||
<text class="section-title">{{ t('sectionTitle') }}</text>
|
||||
<text class="section-title">{{ $tr('房间配置') }}</text>
|
||||
</view>
|
||||
<text class="section-subtitle">{{ t('sectionSubtitle', { count: assetList.length }) }}</text>
|
||||
<text class="section-subtitle">{{ $tr('{count} 项配置', { count: assetList.length }) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="asset-grid">
|
||||
@@ -53,11 +53,7 @@ export default {
|
||||
default: 'zh'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
t(key, params = {}) {
|
||||
return this.$tm('pkgExplore.room_detail.room_detail', key, params)
|
||||
}
|
||||
}
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user