2026-03-26 17:48:21 +08:00
|
|
|
<template>
|
2026-06-18 11:31:43 +08:00
|
|
|
<view v-if="false" class="lang-float" :style="{ bottom: bottom }" @click="openPicker">
|
2026-03-26 17:48:21 +08:00
|
|
|
<text class="lang-float-txt">A/文</text>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: 'LanguageFloat',
|
|
|
|
|
props: {
|
|
|
|
|
bottom: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: '300rpx'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
openPicker() {
|
2026-06-18 11:31:43 +08:00
|
|
|
// 已固定简体中文,不再提供语言切换
|
|
|
|
|
this.$i18n.locale = 'zh-Hans'
|
|
|
|
|
uni.setStorageSync('app_locale', 'zh-Hans')
|
2026-03-26 17:48:21 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.lang-float {
|
|
|
|
|
position: fixed;
|
|
|
|
|
right: 24rpx;
|
|
|
|
|
z-index: 998;
|
|
|
|
|
width: 88rpx;
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
border-radius: 44rpx;
|
|
|
|
|
background: rgba(74, 124, 89, 0.92);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.12);
|
|
|
|
|
}
|
|
|
|
|
.lang-float-txt {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
</style>
|