解决多语言切换时部分组件文本未更新问题
This commit is contained in:
@@ -383,7 +383,6 @@ onMounted(() => {
|
||||
&.is-transition {
|
||||
transition-property: transform;
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ const props = defineProps({
|
||||
*/
|
||||
title: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
/**
|
||||
* 选择器占位符文本
|
||||
@@ -140,7 +140,7 @@ const props = defineProps({
|
||||
*/
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
/**
|
||||
* 选项数据源,支持树形结构
|
||||
|
||||
@@ -380,7 +380,6 @@ function getItemStyle(index: number) {
|
||||
if (props.animation > 0 && !isCurrent) {
|
||||
style["transition-property"] = "transform";
|
||||
style["transition-duration"] = `${props.animation}ms`;
|
||||
style["transition-timing-function"] = "ease";
|
||||
}
|
||||
|
||||
// 拖拽状态下的样式处理
|
||||
|
||||
@@ -37,7 +37,7 @@ const props = defineProps({
|
||||
// 空状态文本
|
||||
text: {
|
||||
type: String,
|
||||
default: t("暂无数据")
|
||||
default: () => t("暂无数据")
|
||||
},
|
||||
// 空状态图标名称
|
||||
icon: {
|
||||
|
||||
@@ -140,7 +140,7 @@ const props = defineProps({
|
||||
// 占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("请输入")
|
||||
default: () => t("请输入")
|
||||
},
|
||||
// 占位符样式类
|
||||
placeholderClass: {
|
||||
|
||||
@@ -113,12 +113,12 @@ const props = defineProps({
|
||||
// 弹窗标题
|
||||
title: {
|
||||
type: String,
|
||||
default: t("车牌键盘")
|
||||
default: () => t("车牌键盘")
|
||||
},
|
||||
// 输入框占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("安全键盘,请放心输入")
|
||||
default: () => t("安全键盘,请放心输入")
|
||||
},
|
||||
// 最大输入长度
|
||||
maxlength: {
|
||||
|
||||
@@ -117,12 +117,12 @@ const props = defineProps({
|
||||
// 弹窗标题
|
||||
title: {
|
||||
type: String,
|
||||
default: t("数字键盘")
|
||||
default: () => t("数字键盘")
|
||||
},
|
||||
// 输入框占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("安全键盘,请放心输入")
|
||||
default: () => t("安全键盘,请放心输入")
|
||||
},
|
||||
// 最大输入长度
|
||||
maxlength: {
|
||||
@@ -132,7 +132,7 @@ const props = defineProps({
|
||||
// 确认按钮文本
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: t("确定")
|
||||
default: () => t("确定")
|
||||
},
|
||||
// 是否显示输入值
|
||||
showValue: {
|
||||
|
||||
@@ -140,12 +140,12 @@ const props = defineProps({
|
||||
// 弹窗标题
|
||||
title: {
|
||||
type: String,
|
||||
default: t("密码键盘")
|
||||
default: () => t("密码键盘")
|
||||
},
|
||||
// 输入框占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("安全键盘,请放心输入")
|
||||
default: () => t("安全键盘,请放心输入")
|
||||
},
|
||||
// 最小输入长度
|
||||
minlength: {
|
||||
@@ -160,7 +160,7 @@ const props = defineProps({
|
||||
// 确认按钮文本
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: t("确定")
|
||||
default: () => t("确定")
|
||||
},
|
||||
// 是否显示输入值
|
||||
showValue: {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}"
|
||||
@tap="onTap"
|
||||
>
|
||||
<view class="cl-list-item__inner w-" :class="[pt.inner?.className]">
|
||||
<view class="cl-list-item__inner" :class="[pt.inner?.className]">
|
||||
<cl-icon
|
||||
:name="icon"
|
||||
:size="pt.icon?.size ?? 36"
|
||||
|
||||
@@ -42,7 +42,7 @@ const props = defineProps({
|
||||
// 加载中显示内容
|
||||
loadingText: {
|
||||
type: String,
|
||||
default: t("加载中")
|
||||
default: () => t("加载中")
|
||||
},
|
||||
// 是否加载完成
|
||||
finish: {
|
||||
@@ -52,7 +52,7 @@ const props = defineProps({
|
||||
// 加载完成显示内容
|
||||
finishText: {
|
||||
type: String,
|
||||
default: t("没有更多了")
|
||||
default: () => t("没有更多了")
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="cl-picker-view">
|
||||
<view class="cl-picker-view__header" v-if="headers.length > 0">
|
||||
<text
|
||||
class="cl-picker-view__header-item dark:text-white"
|
||||
class="cl-picker-view__header-item dark:!text-white"
|
||||
v-for="(label, index) in headers"
|
||||
:key="index"
|
||||
>{{ label }}</text
|
||||
@@ -140,8 +140,8 @@ const indicatorStyle = computed(() => {
|
||||
|
||||
// 深色模式
|
||||
if (isDark.value) {
|
||||
style.backgroundColor = "rgba(200, 200, 200, 0.04)";
|
||||
style.border = "1rpx solid rgba(255, 255, 255, 0.5)";
|
||||
style.backgroundColor = "rgba(0, 0, 0, 0.1)";
|
||||
style.border = "1rpx solid rgba(255, 255, 255, 0.3)";
|
||||
}
|
||||
|
||||
// 构建样式字符串
|
||||
|
||||
@@ -96,12 +96,12 @@ const props = defineProps({
|
||||
// 选择器标题
|
||||
title: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
// 选择器占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
// 是否显示选择器触发器
|
||||
showTrigger: {
|
||||
@@ -116,7 +116,7 @@ const props = defineProps({
|
||||
// 确认按钮文本
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: t("确定")
|
||||
default: () => t("确定")
|
||||
},
|
||||
// 是否显示确认按钮
|
||||
showConfirm: {
|
||||
@@ -126,7 +126,7 @@ const props = defineProps({
|
||||
// 取消按钮文本
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: t("取消")
|
||||
default: () => t("取消")
|
||||
},
|
||||
// 是否显示取消按钮
|
||||
showCancel: {
|
||||
|
||||
@@ -73,7 +73,7 @@ const props = defineProps({
|
||||
// 占位符文本
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
// 箭头图标名称
|
||||
arrowIcon: {
|
||||
|
||||
@@ -91,12 +91,12 @@ const props = defineProps({
|
||||
// 选择器标题
|
||||
title: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
// 选择器占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: t("请选择")
|
||||
default: () => t("请选择")
|
||||
},
|
||||
// 选项数据,支持树形结构
|
||||
options: {
|
||||
@@ -126,7 +126,7 @@ const props = defineProps({
|
||||
// 确认按钮文本
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: t("确定")
|
||||
default: () => t("确定")
|
||||
},
|
||||
// 是否显示确认按钮
|
||||
showConfirm: {
|
||||
@@ -136,7 +136,7 @@ const props = defineProps({
|
||||
// 取消按钮文本
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: t("取消")
|
||||
default: () => t("取消")
|
||||
},
|
||||
// 是否显示取消按钮
|
||||
showCancel: {
|
||||
|
||||
@@ -108,7 +108,7 @@ const props = defineProps({
|
||||
// 上传按钮显示的文本
|
||||
text: {
|
||||
type: String,
|
||||
default: t("上传/拍摄")
|
||||
default: () => t("上传/拍摄")
|
||||
},
|
||||
// 图片压缩方式:original原图,compressed压缩图
|
||||
sizeType: {
|
||||
|
||||
Reference in New Issue
Block a user