From 1e036e9de86a24a98743bd4e8fead90903037797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 6 Dec 2024 14:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/header.vue | 2 +- components/diy/search.vue | 61 ++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/components/diy/header.vue b/components/diy/header.vue index 8332d625..2a719549 100644 --- a/components/diy/header.vue +++ b/components/diy/header.vue @@ -56,7 +56,7 @@ diff --git a/components/diy/search.vue b/components/diy/search.vue index 6acf0c09..ee450921 100644 --- a/components/diy/search.vue +++ b/components/diy/search.vue @@ -4,22 +4,25 @@ - + - - - - + + + + + + + - + @@ -101,6 +104,14 @@ export default { type: String, default: '', }, + propIconLocationSize: { + type: String, + default: '', + }, + propIconArrowSize: { + type: String, + default: '', + }, }, data() { return { @@ -154,10 +165,10 @@ export default { // }, get_box_style(new_style, form) { let style = `background: ${ new_style?.search_bg_color || '' };border: 1px solid ${new_style.search_border}; ${radius_computer(new_style.search_border_radius)};box-sizing: border-box;`; - if (form.is_center == '1') { - style += `justify-content: center;`; - } else { - style += `padding-left: ${ new_style.search_padding_left ? new_style.search_padding_left : 15 }px;`; + if (form.positioning_name_float == '1' && this.propSearchType == 'header') { + style += `padding-left: ${ (new_style.search_padding_left? new_style.search_padding_left : 15) * 2 }rpx;`; + } else if (form.is_center != '1') { + style += `padding-left: ${ (new_style.search_padding_left ? new_style.search_padding_left : 15) * 2 }rpx;`; } return style; }, @@ -243,14 +254,18 @@ export default { .search-icon { position: relative; } - - .search-icon::before { - content: ''; + .search-icon-before { position: absolute; + z-index: 10; // 确保悬浮在内容上层 top: -10px; right: -10px; bottom: -10px; - left: -16px + left: -10px + } + .tips-float { + position: absolute; + left: 50%; + transform: translateX(-50%); } }