refactor: 统一多语言key的组件命名格式为短横线分隔

根据i18n规范,将所有组件相关的多语言key从驼峰式改为短横线分隔格式,同步更新文档中的示例说明。
This commit is contained in:
2026-06-30 10:28:36 +08:00
parent e6d47a3d78
commit 55a5a68517
19 changed files with 100 additions and 100 deletions

View File

@@ -90,12 +90,12 @@
<!-- 查看更多(仅非滚动模式显示) -->
<view class="view-more" v-if="viewMore.support && viewMore.control && list.length > 0"
:style="viewMoreStyle" @tap.stop="toListPage">
<text>{{ viewMore.text || $lang('components-diy.diyArticle.viewMore') }}</text>
<text>{{ viewMore.text || $lang('components-diy.diy-article.viewMore') }}</text>
<uni-icons type="arrowright" size="12" :color="viewMore.color" />
</view>
</template>
<view v-if="list.length === 0 && !loading" class="empty-placeholder">
<text class="empty-text">{{ $lang('components-diy.diyArticle.noArticles') }}</text>
<text class="empty-text">{{ $lang('components-diy.diy-article.noArticles') }}</text>
</view>
</view>
</view>

View File

@@ -17,7 +17,7 @@
<view class="video-title" :style="[{ '--title-line-clamp': titleLineClamp }]">{{ value.videoTitle }}
</view>
<!-- 视频统计信息 -->
<view class="video-stats" v-if="showViewCount && value.showViewCount">{{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }}</view>
<view class="video-stats" v-if="showViewCount && value.showViewCount">{{ $lang('components-diy.diy-channel-video.viewCountSuffix', { count: value.viewCount }) }}</view>
</view>
</view>
@@ -29,7 +29,7 @@
<view class="play-icon-css"></view>
</view>
<view class="video-stats-overlay" v-if="showViewCount && value.showViewCount">
{{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }}
{{ $lang('components-diy.diy-channel-video.viewCountSuffix', { count: value.viewCount }) }}
</view>
</view>
<view class="video-info">
@@ -37,7 +37,7 @@
<view class="video-title" :style="[{ '--title-line-clamp': titleLineClamp }]">{{ value.videoTitle }}
</view>
<!-- 视频统计信息,非列表模式下显示 -->
<view class="video-stats" v-if="showViewCount && value.showViewCount && !listMode">{{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }}</view>
<view class="video-stats" v-if="showViewCount && value.showViewCount && !listMode">{{ $lang('components-diy.diy-channel-video.viewCountSuffix', { count: value.viewCount }) }}</view>
</view>
</view>
</view>

View File

@@ -50,19 +50,19 @@
<view v-if="goodsValue.priceStyle.lineControl && showMarketPrice(dataItem)"
class="delete-price price-font"
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.priceStyle.lineColor : '' }">
¥{{ showMarketPrice(dataItem) }}</view>
<view class="sale" v-if="goodsValue.saleStyle.control"
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
{{ $lang('components-diy.diyGoodsRecommend.soldPrefix') }}{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : $lang('unit.piece') }}
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</x-skeleton>
¥{{ showMarketPrice(dataItem) }}</view>
<view class="sale" v-if="goodsValue.saleStyle.control"
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
{{ $lang('components-diy.diy-goods-recommend.soldPrefix') }}{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : $lang('unit.piece') }}
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</x-skeleton>
</template>
<script>

View File

@@ -14,7 +14,7 @@
</view>
<view class="fui-remark jump" style="padding-right: 20rpx; text-align: center; line-height: 140rpx;">
<span style="font-size:24rpx;padding: 14rpx 18rpx;border-radius:8rpx"
:style="{ background: item.BtBgColor, color: item.BtColor }" @tap.stop="previewSqs()">{{ $lang('components-diy.diyKefu.addNow') }}</span>
:style="{ background: item.BtBgColor, color: item.BtColor }" @tap.stop="previewSqs()">{{ $lang('components-diy.diy-kefu.addNow') }}</span>
</view>
</view>
</view>

View File

@@ -12,7 +12,7 @@
style="border-radius:6rpx;width: 60rpx;"></image>
</view>
<view class="fui-cell-text" style="color:#333;">{{ item.title }}</view>
<view class="fui-cell-remark" style="font-size: 24rpx;">{{ $lang('components-diy.diyListmenu.view') }}</view>
<view class="fui-cell-remark" style="font-size: 24rpx;">{{ $lang('components-diy.diy-listmenu.view') }}</view>
</view>
</view>
<ns-login ref="login"></ns-login>

View File

@@ -21,17 +21,17 @@
</view>
</view>
</view>
<view class="room-info" v-if="value.isShowAnchorInfo || value.isShowLiveGood">
<block v-if="value.isShowAnchorInfo">
<image
:src="liveInfo.anchor_img != '' ? $util.img(liveInfo.anchor_img) : $util.getDefaultImage().head"
class="anchor-img" @error="liveInfo.anchor_img = $util.getDefaultImage().head" show-menu-by-longpress/>
<text class="anchor-name">{{ $lang('components-diy.diyLive.anchorPrefix') }}{{ liveInfo.anchor_name }}</text>
</block>
<text class="separate" v-if="value.isShowAnchorInfo && value.isShowLiveGood">|</text>
<block v-if="value.isShowLiveGood">
<text class="goods-text">{{ $lang('components-diy.diyLive.goodsPrefix') }}{{ liveInfo.goods.length }}</text>
</block>
<view class="room-info" v-if="value.isShowAnchorInfo || value.isShowLiveGood">
<block v-if="value.isShowAnchorInfo">
<image
:src="liveInfo.anchor_img != '' ? $util.img(liveInfo.anchor_img) : $util.getDefaultImage().head"
class="anchor-img" @error="liveInfo.anchor_img = $util.getDefaultImage().head" show-menu-by-longpress/>
<text class="anchor-name">{{ $lang('components-diy.diy-live.anchorPrefix') }}{{ liveInfo.anchor_name }}</text>
</block>
<text class="separate" v-if="value.isShowAnchorInfo && value.isShowLiveGood">|</text>
<block v-if="value.isShowLiveGood">
<text class="goods-text">{{ $lang('components-diy.diy-live.goodsPrefix') }}{{ liveInfo.goods.length }}</text>
</block>
</view>
</view>
</x-skeleton>

View File

@@ -13,7 +13,7 @@
<div
style="position:absolute;right:12rpx;bottom:48rpx;z-index:1;background:#4390FF;padding:0rpx 20rpx;border-radius:8rpx;color: #fff;"
@tap.stop="handlerClick(item)">
<span style="font-size:24rpx;color: #fff;">{{ $lang('components-diy.diyMap.navigate') }}</span>
<span style="font-size:24rpx;color: #fff;">{{ $lang('components-diy.diy-map.navigate') }}</span>
</div>
</map>
</view>
@@ -71,7 +71,7 @@ export default {
uni.openLocation({
latitude: parseFloat(item.lat),
longitude: parseFloat(item.lng),
name: this.$lang('components-diy.diyMap.navigate'),
name: this.$lang('components-diy.diy-map.navigate'),
})
},
async handlerClick(item) {

View File

@@ -12,7 +12,7 @@
<!-- #ifdef MP -->
<block
v-if="(memberInfo.nickname.indexOf('u_') != -1 && memberInfo.nickname == memberInfo.username) || memberInfo.nickname == memberInfo.mobile">
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diyMemberInfo.clickToAuthorizeAvatarNickname') }}</text></view>
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diy-member-info.clickToAuthorizeAvatarNickname') }}</text></view>
</block>
<view class="nickname" v-else>
<text class="name" @tap.stop="getWxAuth">{{ memberInfo.nickname }}</text>
@@ -36,7 +36,7 @@
<!-- #ifdef H5 -->
<block
v-if="$util.isWeiXin() && ((memberInfo.nickname.indexOf('u_') != -1 && memberInfo.nickname == memberInfo.username) || memberInfo.nickname == memberInfo.mobile)">
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diyMemberInfo.clickToGetWechatAvatar') }}</text></view>
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diy-member-info.clickToGetWechatAvatar') }}</text></view>
</block>
<view class="nickname" v-else>
<text class="name" @tap.stop="redirect('/pages_tool/member/info')">{{ memberInfo.nickname
@@ -194,13 +194,13 @@
<uni-popup ref="completeInfoPopup" type="bottom" :maskClick="false">
<view class="complete-info-wrap">
<view class="head">
<text class="title">{{ $lang('components-diy.diyMemberInfo.completeInfoTitle') }}</text>
<text class="color-tip tips">{{ $lang('components-diy.diyMemberInfo.completeInfoTip') }}</text>
<text class="title">{{ $lang('components-diy.diy-member-info.completeInfoTitle') }}</text>
<text class="color-tip tips">{{ $lang('components-diy.diy-member-info.completeInfoTip') }}</text>
<text class="iconfont icon-close color-tip" @tap.stop="cancelCompleteInfo"></text>
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="item-wrap">
<text class="label">{{ $lang('components-diy.diyMemberInfo.avatarLabel') }}</text>
<text class="label">{{ $lang('components-diy.diy-member-info.avatarLabel') }}</text>
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@error="avatarUrl = $util.getDefaultImage().head" mode="aspectFill" show-menu-by-longpress/>
@@ -208,13 +208,13 @@
</button>
</view>
<view class="item-wrap">
<text class="label">{{ $lang('components-diy.diyMemberInfo.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diyMemberInfo.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
<text class="label">{{ $lang('components-diy.diy-member-info.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diy-member-info.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="item-wrap">
<text class="label">{{ $lang('components-diy.diyMemberInfo.avatarLabel') }}</text>
<text class="label">{{ $lang('components-diy.diy-member-info.avatarLabel') }}</text>
<button open-type="getAuthorize" scope="userInfo" @getAuthorize="aliappGetUserinfo"
:plain="true" class="border-0">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@@ -223,11 +223,11 @@
</button>
</view>
<view class="item-wrap">
<text class="label">{{ $lang('components-diy.diyMemberInfo.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diyMemberInfo.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
<text class="label">{{ $lang('components-diy.diy-member-info.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diy-member-info.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
</view>
<!-- #endif -->
<button type="default" class="save-btn" @tap.stop="saveCompleteInfo" :disabled="isDisabled">{{ $lang('components-diy.diyMemberInfo.save') }}</button>
<button type="default" class="save-btn" @tap.stop="saveCompleteInfo" :disabled="isDisabled">{{ $lang('components-diy.diy-member-info.save') }}</button>
</view>
</uni-popup>
</view>
@@ -493,8 +493,8 @@ export default {
showMemberQrcode() {
if (!this.memberInfo.mobile && !this.memberInfo.member_code) {
uni.showModal({
title: this.$lang('components-diy.diyMemberInfo.tip'),
content: this.$lang('components-diy.diyMemberInfo.bindMobileTip'),
title: this.$lang('components-diy.diy-member-info.tip'),
content: this.$lang('components-diy.diy-member-info.bindMobileTip'),
success: res => {
if (res.confirm) {
// #ifdef MP-WEIXIN
@@ -643,7 +643,7 @@ export default {
saveCompleteInfo() {
if (this.nickName.length == 0) {
this.$util.showToast({
title: this.$lang('components-diy.diyMemberInfo.pleaseEnterNickname')
title: this.$lang('components-diy.diy-member-info.pleaseEnterNickname')
});
return;
}
@@ -682,7 +682,7 @@ export default {
},
fail: () => {
this.$util.showToast({
title: this.$lang('components-diy.diyMemberInfo.uploadFailed')
title: this.$lang('components-diy.diy-member-info.uploadFailed')
});
}
})
@@ -713,7 +713,7 @@ export default {
},
fail: () => {
this.$util.showToast({
title: this.$lang('components-diy.diyMemberInfo.avatarPullFailed')
title: this.$lang('components-diy.diy-member-info.avatarPullFailed')
});
}
})

View File

@@ -38,14 +38,14 @@
<text v-show="value.uploadTime == 1 && item.is_show_release_time == 1">{{
item.update_time_day }}</text>
</view>
<view class="notes-num">
<text v-show="value.readNum == 1 && item.is_show_read_num == 1">{{ $lang('components-diy.diyNotes.readPrefix') }} {{
item.initial_read_num + item.read_num }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="notes-num">
<text v-show="value.readNum == 1 && item.is_show_read_num == 1">{{ $lang('components-diy.diy-notes.readPrefix') }} {{
item.initial_read_num + item.read_num }}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<ns-login ref="login"></ns-login>

View File

@@ -27,9 +27,9 @@
v-model="searchText" @confirm="handlerSearchClick" disabled="true"
@tap.stop="handlerSearchClick"
:placeholderStyle="placeholderStyle" />
<text class="search-content-btn" @tap.stop="handlerSearchClick"
:style="{ 'backgroundColor': value.pageBgColor ? value.pageBgColor : 'rgba(0,0,0,0)' }"
>{{ $lang('components-diy.diySearch.searchBtn') }}</text>
<text class="search-content-btn" @tap.stop="handlerSearchClick"
:style="{ 'backgroundColor': value.pageBgColor ? value.pageBgColor : 'rgba(0,0,0,0)' }"
>{{ $lang('components-diy.diy-search.searchBtn') }}</text>
</view>
<view class="img" v-if="value.iconType == 'img'"
@tap.stop="handlerRedirectToClick(value.searchLink)">

View File

@@ -207,8 +207,8 @@
:style="{ fontSize: value.fontSize * 2 + 'rpx', color: value.textColor, fontWeight: value.fontWeight }">
{{ value.text }}
</text>
<text class="zone"
:style="{ fontSize: value.fontSize * 2 + 'rpx', fontWeight: value.fontWeight }">{{ $lang('components-diy.diyText.zone') }}</text>
<text class="zone"
:style="{ fontSize: value.fontSize * 2 + 'rpx', fontWeight: value.fontWeight }">{{ $lang('components-diy.diy-text.zone') }}</text>
</view>
<text class="iconfont icon-danxuan-xuanzhong"
:style="{ color: value.textColor, fontWeight: value.fontWeight }"></text>