Commit 8cd53113 authored by Smile's avatar Smile Committed by wux

客户端设置、创建订单部分样式多语言适配

parent 10a7d77c
......@@ -2,8 +2,8 @@
<view>
<dHeader :title="$lang.lang.addressInfo.addInfo"></dHeader>
<view class="container">
<uni-forms ref="form" :model="form" :label-width="80" :rules="rules">
<uni-forms-item
<uni-forms ref="form" :model="form" :rules="rules">
<uni-forms-item class="custom-label-width"
:label="$lang.lang.addressInfo.consignee"
required
name="name"
......@@ -121,8 +121,22 @@ export default {
created() {
this.getCountry();
},
mounted() {
this.updateLabels();
},
methods: {
updateLabels() {
this.$nextTick(() => {
const labels = this.$el.querySelectorAll('.uni-forms-item__label');
labels.forEach(label => {
// 移除 width 样式
label.style.removeProperty('width');
// 设置 min-width 样式
label.style.minWidth = '70px';
});
console.log(labels);
});
},
saveAddress() {
this.$refs.form.validate().then(async (valid) => {
if (valid) {
......@@ -162,12 +176,8 @@ export default {
});
if (i >= 0) this.areaIndex = i;
data.forEach((item) => {
const str = item.tel + " " + item.nameZh;
if (this.$lang.locale == "zh") {
this.areaName.push(str);
} else {
const str = item.tel + " " + item[this.$lang.name];
this.areaName.push(str);
}
});
}
} catch (error) {}
......
......@@ -106,7 +106,7 @@
if(res.code == 0 && res.data.length > 0){
for(let i in res.data){
that.areaData.push(res.data[i].tel)
that.areaName.push('+'+res.data[i].tel + ' ' + res.data[i][this.$lang.name])
that.areaName.push('+'+res.data[i].tel + ' ' + res.data[i][that.$lang.name])
}
}
})
......@@ -287,7 +287,7 @@ page{
padding: 0 10upx;
margin-right: 20upx;
font-size: var(--f26);
width: 20%;
min-width: 21%;
}
.login-phone .login-area text{
margin-right: 10upx;
......
......@@ -6,7 +6,7 @@
<view @click="hiddeDatePicker" class="pickerCancel">{{ $lang.lang.myInfo.cancel }}</view>
<!-- 输入框 -->
<input
style="width: 70%"
class="pickerInput"
:placeholder="$lang.lang.myInfo.placeholder"
:show-action="false"
v-model="searchValue"
......@@ -175,7 +175,10 @@ export default {
text-decoration: none;
padding: 0rpx 8rpx;
}
.pickerInput{
width: 60%;
text-align: center;
}
.pickerConfirm {
font-size: 30rpx;
color: #2979ff;
......
......@@ -418,6 +418,7 @@ export default {
const data = this.languages[e.detail.value].value;
this.locale = data
uni.setStorageSync('locale', data)
uni.setLocale(data);
this.$lang.setLang(data)
this.getIdcard()
;(this.companyNotice = this.$lang.lang.site.unauth),
......
......@@ -249,15 +249,16 @@ page{
.login-phone .login-area{
display: flex;
align-items: center;
justify-content: center;
justify-content: left;
font-size: var(--f30);
/* background-color: #27417C; */
border-radius: 60upx;
height: 50upx;
margin-top: 24upx;
padding: 0 10upx;
//padding: 0 10upx;
margin-right: 20upx;
font-size: var(--f26);
min-width: 12%;
}
.login-phone .login-area text{
margin-right: 10upx;
......
......@@ -403,7 +403,7 @@ textarea{
width: 48upx;
}
.corder-checkbox label{
width: 45%;
width: 100%;
display: flex;
align-items: center;
font-size: 12px;
......
......@@ -440,7 +440,7 @@ page{
position: absolute;
top:4upx;
right: 44upx;
width: 18upx !important;
width: 20upx !important;
height: 18upx !important;
border-radius: 50%;
background-color: #FF0000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment