Commit c8dcdd17 authored by 田翔's avatar 田翔

fix: 表单样式更新

parent 636aaa5a
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.9.15", "version": "6.9.16",
"description": "6.9.15 台账选择器映射数值对值进行形态解析", "description": "6.9.16 关联表单小数点处理",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -281,6 +281,9 @@ const TablePack = (props, ref) => { ...@@ -281,6 +281,9 @@ const TablePack = (props, ref) => {
if (['DateTime'].includes(widget)) { if (['DateTime'].includes(widget)) {
return <DateView {...props} /> return <DateView {...props} />
} }
if (['NumberInput'].includes(widget)) {
return <NumberView {...props} />
}
return <Text text={value} /> return <Text text={value} />
} }
}, },
......
...@@ -11,16 +11,19 @@ const Header = (props) => { ...@@ -11,16 +11,19 @@ const Header = (props) => {
return ( return (
<div className={styles.object}> <div className={styles.object}>
<div {
className={styles.title} title ? (
> <div className={styles.title}>
{title ? <i className={styles.bg}></i> : null} <i className={styles.bg}></i>
{title} <span style={{ fontWeight: 'bold', fontSize: '15px' }}>{title}</span>
</div> </div>
{title ? <Divider /> : ''} ) : null
}
{props.children} {props.children}
{title && props.children ? <div className={styles.line}></div> : null}
</div> </div>
) )
} }
export default Header export default Header
\ No newline at end of file
@import '~antd/es/style/themes/default.less'; @import '~antd/es/style/themes/default.less';
// @pandaXform: ~'@{ant-prefix}-pandaXform';
// .@{pandaXform} {
// .@{pandaXform}-title {
// display: flex;
// align-items: center;
// justify-content: center;
// font-size: 16px;
// }
// .@{pandaXform}-bg {
// width: 3px;
// height: 16px;
// margin-right: 10px;
// background-color: #337ab7;
// }
// // .fr-label-object {
// // .fr-label-title {
// // padding: 10px 10px 0 0;
// // }
// // .fr-label-title::after {
// // content: '';
// // }
// // }
// // .b--black-20 {
// // border-color: rgba(232, 240, 237, 1);
// // }
// }
.object { .object {
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: left; justify-content: left;
font-size: 16px; font-size: 15px;
padding-bottom: 10px;
padding-top: 15px;
} }
.bg { .bg {
border-radius: 3px;
width: 3px; width: 3px;
height: 16px; height: 13px;
margin-right: 10px; margin-right: 7px;
background-color: #337ab7; background-color: #337ab7;
} }
.line {
width: 100%;
height: 1px;
background: #E8EBEE;
}
} }
\ No newline at end of file
@import '~antd/es/style/themes/default.less'; @import '~antd/es/style/themes/default.less';
@disabledBgColor: rgb(248, 250, 252); @disabledBgColor: rgb(248, 250, 252);
@disabledColor: rgba(0, 0, 0, 0.7); @disabledColor: rgba(0, 0, 0, 0.7);
body #app { body #app {
background: transparent; background: transparent;
width: 100%; width: 100%;
height: 100%; height: 100%;
.pg-viewer-wrapper { .pg-viewer-wrapper {
overflow-y: auto; overflow-y: auto;
} }
...@@ -15,7 +17,8 @@ body #app { ...@@ -15,7 +17,8 @@ body #app {
.fr-field.w-100.flex-column { .fr-field.w-100.flex-column {
padding-left: 10px; padding-left: 10px;
} }
.fr-field.w-100.flex {
.fr-field.w-100.flex {
.fr-label { .fr-label {
padding-left: 12px; padding-left: 12px;
} }
...@@ -28,105 +31,142 @@ body #app { ...@@ -28,105 +31,142 @@ body #app {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
background: white; background: white;
padding-top: 0;
.fr-generator-container .left-layout { .fr-generator-container .left-layout {
padding: 10px 0 0 0; padding: 10px 0 0 0;
.left-item { .left-item {
justify-content: left; justify-content: left;
padding-left: 10px; padding-left: 10px;
&:hover { &:hover {
svg { svg {
fill: #409eff; fill: #409eff;
} }
} }
.anticon { .anticon {
margin-right: 5px; margin-right: 5px;
} }
} }
} }
.@{ant-prefix}-spin-nested-loading { .@{ant-prefix}-spin-nested-loading {
height: 100%; height: 100%;
.@{ant-prefix}-spin-container { .@{ant-prefix}-spin-container {
height: 100%; height: 100%;
} }
} }
.@{ant-prefix}-spin-spinning { .@{ant-prefix}-spin-spinning {
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
max-height: none !important; max-height: none !important;
} }
.@{ant-prefix}-tabs-content-holder { .@{ant-prefix}-tabs-content-holder {
height: 664px; height: 664px;
overflow: auto; overflow: auto;
} }
.fr-generator-container .right-layout { .fr-generator-container .right-layout {
width: 21rem; width: 21rem;
} }
.fr-container .fr-label-required { .fr-container .fr-label-required {
margin: 0; margin: 0;
} //表单组横线样式 }
//表单组横线样式
.@{ant-prefix}-divider-horizontal { .@{ant-prefix}-divider-horizontal {
margin: 15px 0; margin: 15px 0;
} //提示语样式 }
//提示语样式
input::-webkit-input-placeholder, input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder, textarea::-webkit-input-placeholder,
.@{ant-prefix}-select-selection-placeholder { .@{ant-prefix}-select-selection-placeholder {
color: #8a8282; color: #8a8282;
} // 单行文本框 }
// 单行文本框
input[disabled] { input[disabled] {
color: @disabledColor; color: @disabledColor;
cursor: default; cursor: default;
background: @disabledBgColor; background: @disabledBgColor;
border: none; border: none;
} // 多行文本框 }
// 多行文本框
.@{ant-prefix}-input[disabled] { .@{ant-prefix}-input[disabled] {
color: @disabledColor; color: @disabledColor;
box-shadow: none; box-shadow: none;
cursor: default; cursor: default;
background: @disabledBgColor; background: @disabledBgColor;
border: none; border: none;
} //数值输入框样式修改 }
//数值输入框样式修改
.@{ant-prefix}-input-number-handler-wrap { .@{ant-prefix}-input-number-handler-wrap {
opacity: 1; opacity: 1;
} }
.@{ant-prefix}-input-number-disabled { .@{ant-prefix}-input-number-disabled {
border: none; border: none;
} // 时间选择器的disabled样式 }
// 时间选择器的disabled样式
.@{ant-prefix}-picker-disabled { .@{ant-prefix}-picker-disabled {
cursor: default; cursor: default;
color: @disabledColor; color: @disabledColor;
background-color: rgb(250, 250, 250); background-color: rgb(250, 250, 250);
&+span { &+span {
cursor: default; cursor: default;
} }
} // radio的disabled样式 }
// radio的disabled样式
.@{ant-prefix}-radio-disabled { .@{ant-prefix}-radio-disabled {
cursor: default; cursor: default;
&+span { &+span {
cursor: default; cursor: default;
color: @disabledColor; color: @disabledColor;
} }
.@{ant-prefix}-radio-inner { .@{ant-prefix}-radio-inner {
cursor: default; cursor: default;
&:after { &:after {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
} }
} }
.@{ant-prefix}-checkbox-wrapper { .@{ant-prefix}-checkbox-wrapper {
margin-top: 10px; margin-top: 10px;
margin-left: 5px; margin-left: 5px;
} //复选框disabled的样式 }
//复选框disabled的样式
.@{ant-prefix}-checkbox-disabled { .@{ant-prefix}-checkbox-disabled {
&+span { &+span {
cursor: default; cursor: default;
color: @disabledColor; color: @disabledColor;
} }
.@{ant-prefix}-checkbox-inner { .@{ant-prefix}-checkbox-inner {
cursor: default; cursor: default;
&:after { &:after {
border-color: rgba(0, 0, 0, 0.5); border-color: rgba(0, 0, 0, 0.5);
} }
} }
} // 下拉选未选的disabled样式 }
// 下拉选未选的disabled样式
.@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) { .@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) {
.@{ant-prefix}-select-selector { .@{ant-prefix}-select-selector {
color: @disabledColor; color: @disabledColor;
...@@ -134,13 +174,17 @@ body #app { ...@@ -134,13 +174,17 @@ body #app {
border: none; border: none;
background: @disabledBgColor; background: @disabledBgColor;
} }
} // 下拉选已选的disabled样式 }
// 下拉选已选的disabled样式
.@{ant-prefix}-cascader-picker-disabled { .@{ant-prefix}-cascader-picker-disabled {
color: @disabledColor; color: @disabledColor;
background-color: rgb(250, 250, 250); background-color: rgb(250, 250, 250);
cursor: default; cursor: default;
border: none; border: none;
} // 多选下的tag的disabled样式 }
// 多选下的tag的disabled样式
.@{ant-prefix}-select-disabled.@{ant-prefix}-select-multiple { .@{ant-prefix}-select-disabled.@{ant-prefix}-select-multiple {
.@{ant-prefix}-select-selection-item { .@{ant-prefix}-select-selection-item {
color: @disabledColor; color: @disabledColor;
...@@ -149,26 +193,33 @@ body #app { ...@@ -149,26 +193,33 @@ body #app {
border: none; border: none;
} }
} }
.@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) { .@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) {
.@{ant-prefix}-select-selector input { .@{ant-prefix}-select-selector input {
cursor: default; cursor: default;
} }
} // 时间选择框 }
// 时间选择框
.@{ant-prefix}-picker-input>input[disabled] { .@{ant-prefix}-picker-input>input[disabled] {
color: @disabledColor; color: @disabledColor;
} }
.@{ant-prefix}-picker-disabled { .@{ant-prefix}-picker-disabled {
border: none; border: none;
.@{ant-prefix}-picker-suffix { .@{ant-prefix}-picker-suffix {
display: none; display: none;
} }
} }
&-operate-group { &-operate-group {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
justify-content: flex-end; justify-content: flex-end;
padding: 10px 10px; padding: 10px 10px;
} }
&-group { &-group {
i { i {
width: 3px; width: 3px;
...@@ -176,33 +227,40 @@ body #app { ...@@ -176,33 +227,40 @@ body #app {
margin-right: 10px; margin-right: 10px;
background-color: #337ab7; background-color: #337ab7;
} }
.fr-label-object { .fr-label-object {
.fr-label-title { .fr-label-title {
padding: 10px 10px 0 0; padding: 10px 10px 0 0;
} }
.fr-label-title::after { .fr-label-title::after {
content: ''; content: '';
} }
} }
.b--black-20 { .b--black-20 {
border-color: rgba(232, 240, 237, 1); border-color: rgba(232, 240, 237, 1);
} }
} }
.emphasis { .emphasis {
input { input {
font-weight: bold; font-weight: bold;
} }
} }
.notEditable { .notEditable {
input { input {
cursor: default; cursor: default;
} }
} }
/** @Tips: 在原有框架下,表单渲染后,使用的是flex自动布局,与calc来计算组件宽度,未设置固定宽度,导致页面布局错乱 */ /** @Tips: 在原有框架下,表单渲染后,使用的是flex自动布局,与calc来计算组件宽度,未设置固定宽度,导致页面布局错乱 */
.fr-content, .fr-content,
.fr-content .fr-item-wrapper>div { .fr-content .fr-item-wrapper>div {
width: 100%; width: 100%;
} }
.pdf-canvas { .pdf-canvas {
width: 100%; width: 100%;
display: flex; display: flex;
......
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