From f15104d054ae129bdf14b152cc189be2cae0fa67 Mon Sep 17 00:00:00 2001 From: sunjie Date: Tue, 15 Jul 2025 23:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20form=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=9A=84=20=E5=8F=AA=E8=AF=BB=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=20=E7=8A=B6=E6=80=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form_element_style.scss | 138 +++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) diff --git a/sh_backmate_theme_adv_enterprise/static/src/scss/form_element_style/form_element_style.scss b/sh_backmate_theme_adv_enterprise/static/src/scss/form_element_style/form_element_style.scss index 5090d8e0a..8f5cb29f1 100644 --- a/sh_backmate_theme_adv_enterprise/static/src/scss/form_element_style/form_element_style.scss +++ b/sh_backmate_theme_adv_enterprise/static/src/scss/form_element_style/form_element_style.scss @@ -23,6 +23,23 @@ .o_input { background: transparent !important;font-size: 14px !important;border-bottom: 2px solid $primaryColor; } + } + + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } } } @if $form_element_style == 'style_2'{ @@ -70,6 +87,23 @@ --o-input-border-color: #dc3545 !important;--o-caret-color: #dc3545 !important; } } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } @if $form_element_style == 'style_3'{ @@ -135,6 +169,23 @@ --o-input-border-color: #dc3545 !important;--o-caret-color: #dc3545 !important; } } + + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } } @if $form_element_style == 'style_4'{ .o_input { @@ -173,6 +224,23 @@ } } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } @if $form_element_style == 'style_5'{ .o_input { @@ -211,6 +279,23 @@ border-radius: 0px 15px 0px 15px !important; } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } @if $form_element_style == 'style_6'{ .o_input { @@ -249,10 +334,27 @@ } } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } @if $form_element_style == 'style_7'{ .o_input { - line-height: 34px;background-color: #fff;-webkit-border-radius: 0px;-moz-border-radius: 0px;border-radius: 0px;padding: 0 20px;color: #666;-webkit-transition: all .7s ease;-o-transition: all .7s ease;-moz-transition: all .7s ease;transition: all .7s ease;margin-bottom: 5px !important;border: 1px solid #ccc;border-top: 2px solid #ccc;align-items: center !important; + line-height: 34px;background-color: #fff;-webkit-border-radius: 0px;-moz-border-radius: 0px;border-radius: 0px;padding: 0 20px;color: #666;-webkit-transition: all .7s ease;-o-transition: all .7s ease;-moz-transition: all .7s ease;transition: all .7s ease;margin-bottom: 5px !important;border: 2px solid #ccc;border-top: 2px solid #ccc;align-items: center !important; &:focus { border-top: 2px solid $primaryColor !important; } @@ -287,6 +389,23 @@ } } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } @if $form_element_style == 'style_8'{ .o_input { @@ -363,4 +482,21 @@ border-radius: 20px !important; } + /** 只读模式下的数据 **/ + .o_form_readonly { + .o_field_widget { + + &:not(.o_field_boolean){ + border: 1.5px solid rgba(0, 0, 0, .15);transition: all .7s ease;box-shadow: 0 1px 15px 1px rgba(69 ,65, 78 , 0.08);outline: none;background-color: #fff;padding: 6px 10px;border-radius: 5px;position: relative;margin-bottom: 5px !important; + + } + } + .o_field_empty{ + span{ + height: 20px; + display: block; + } + } + } + } \ No newline at end of file