From 2b486b3759f1d6b4cc536bf7b74333b67fa455dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 15 Oct 2025 11:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E5=8D=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form-input/form-input.vue | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pages/form-input/components/form-input/form-input.vue b/pages/form-input/components/form-input/form-input.vue index 8adb1409..50e63073 100644 --- a/pages/form-input/components/form-input/form-input.vue +++ b/pages/form-input/components/form-input/form-input.vue @@ -40,10 +40,13 @@ - - - {{ overall_config.save_draft_title }} + + + {{ back_icon == 'back' ? $t('common.return') : $t('common.home') }} + @@ -93,6 +96,7 @@ export default { }, data() { return { + back_icon: 'home', data_list: [], form_name: '', img_url: '', @@ -129,6 +133,14 @@ export default { methods: { isEmpty, init() { + // 判断应该显示什么icon + let pages = getCurrentPages(); + let length = pages.length; + if (length > 1) { + this.back_icon = 'back'; + } else { + this.back_icon = 'back'; + } const data = this.propValue; // 公共配置信息 const overall_config = data.config?.overall_config || {}; @@ -151,6 +163,10 @@ export default { }) }, 500); }, + // 返回事件 + top_nav_left_back_event(e) { + app.globalData.page_back_prev_event(); + }, /* * 点击提交按钮触发方法 */ @@ -236,9 +252,9 @@ export default { width: 100%; border-top: 2rpx solid #eee; .save_draft_title { - min-width: 180rpx; + min-width: 120rpx; font-size: 24rpx; - margin: 0 20rpx 0 0; + // margin: 0 20rpx 0 0; } .submit_title { text-align: center; @@ -276,4 +292,8 @@ export default { background: transparent; z-index: 999; } +// 返回按钮的显示逻辑 +.bottom-line-back { + margin-right: 20rpx; +} \ No newline at end of file