form-driver
Version:
An efficient framework for creating forms.
466 lines (452 loc) • 10.1 kB
CSS
.MEditor {
/* max-width:900px; */
/* margin:auto; */
--MViewerBorder: 1px solid #d9d9d9;
/** TODO 在这里扩展吧 */
}
.MEditor .submitBar {
background: white;
box-shadow: 0 0 10px #d0cfcf;
padding: 25px;
margin: 25px 0 25px 0;
text-align: center;
}
.MEditor .AForm_removeBtn:focus,
.MEditor .AForm_removeBtn:hover {
color: #40a9ff;
}
.MEditor .AForm_removeBtn_disabled {
color: lightgray;
}
.MEditor_p {
max-width: 900px;
margin: auto;
--MViewerBorder: 1px solid #d9d9d9;
/** TODO 在这里扩展吧 */
}
.MEditor_p .submitBar {
background: white;
box-shadow: 0 0 10px #d0cfcf;
padding: 15px;
margin: 25px 0 25px 0;
text-align: center;
}
.MEditor_p .AForm_removeBtn:focus,
.MEditor .AForm_removeBtn:hover {
color: #40a9ff;
}
.MEditor_p .AForm_removeBtn_disabled {
color: lightgray;
}
/** 回填字段的样式,例如日期选择/gb2260选项下,带下划线的,显示被选中值的一行字 */
.MEditor_p .backfill {
border-bottom: 1px solid #d9d9d9;
}
.MEditor_p .backfill_empty {
border-bottom: 1px solid #d9d9d9;
color: gray;
}
.MEditor_p input,
.MEditor_p textarea {
font-size: 16px;
/** ios上,字小于16px的输入框,输入时页面会放大,这个体验及其糟糕,只能通过改大字体解决 */
}
table.M3_table {
border: var(--MViewerBorder);
border-spacing: 0;
}
table.M3_table tr,
table.M3_table th {
border-bottom: var(--MViewerBorder);
}
table.M3_table td,
table.M3_table th {
border-right: var(--MViewerBorder);
border-bottom: var(--MViewerBorder);
padding: 5px 0 5px 0;
}
table.M3_table td .ant-select-selector,
table.M3_table th .ant-select-selector {
border: none ;
}
table.M3_table th {
font-weight: normal;
text-align: center;
}
table.M3_table tr td:last-child {
border-right: 0;
}
table.M3_table tr:last-child td {
border-bottom: 0;
}
/** antd 样式调整 */
.MEditor {
/** 减少字段之间的垂直距离,表单紧凑些 */
/** ant表单项的间距太大了,浪费空间 */
}
.MEditor .ant-row {
margin-bottom: 10px;
}
.MEditor .ant-form-item,
.MEditor .ant-form-item- {
margin-bottom: 0px ;
}
.MEditor_p,
.MEditor {
/** 选项文字折行展示 */
}
.MEditor_p .wrap,
.MEditor .wrap {
word-break: break-all;
white-space: pre-line;
}
.MEditor_p .ant-radio-wrapper,
.MEditor .ant-radio-wrapper,
.MEditor_p .ant-checkbox-wrapper,
.MEditor .ant-checkbox-wrapper {
white-space: normal;
}
.MEditor_p .ant-radio-wrapper span,
.MEditor .ant-radio-wrapper span,
.MEditor_p .ant-checkbox-wrapper span,
.MEditor .ant-checkbox-wrapper span {
word-break: break-all;
white-space: pre-line;
}
.MEditor_p .am-calendar .content,
.MEditor .am-calendar .content {
/** TODO:antd mobile的日历缩回去的时候有bug,动画不正常,这里把动画禁掉,以后如果升级antd mobile了可以试试去掉 */
animation-duration: 0s;
-webkit-animation-duration: 0s;
}
/** antd的Tabs不能100%高,加上FullHeightTab这个class就可以了 */
.FullHeightTab .ant-tabs-content {
height: 100%;
}
.FullHeightTab .ant-tabs {
height: 100%;
}
.ant-rate {
/* 自定义Rate组件未选中星星的颜色 */
display: flex ;
width: 100%;
}
.ant-rate .ant-rate-star-zero .ant-rate-star-first,
.ant-rate .ant-rate-star-zero .ant-rate-star-second {
color: #a2a2a2;
}
.ant-rate .ant-rate-star {
flex: 1;
}
.m3-nps-wrapper .m3-nps-tip {
overflow: hidden;
text-align: center;
padding-left: 15px;
padding-right: 15px;
display: flex;
}
.m3-nps-wrapper .m3-nps-tip .m3-nps-tip-left {
flex: 1;
text-align: left;
}
.m3-nps-wrapper .m3-nps-tip .m3-nps-tip-center {
flex: 1;
padding: 0 10px;
text-align: center;
}
.m3-nps-wrapper .m3-nps-tip .m3-nps-tip-right {
flex: 1;
text-align: right;
}
.m3-nps-wrapper .m3-nps-remark {
font-size: 13px;
color: #666;
padding-left: 15px;
padding-right: 15px;
}
.m3-nps-wrapper .ant-rate {
display: flex ;
width: 100%;
}
.m3-nps-wrapper .ant-rate .ant-rate-star > div {
text-align: center;
}
.AMatrixOpenTd {
word-break: keep-all;
white-space: nowrap;
}
.AMatrix_DropdownList_sameLine {
display: flex;
}
.AMatrix_DropdownList_sameLine div {
flex: 1;
}
.paperInputBox {
border-style: none none solid none;
border-bottom: 1px solid #d9d9d9;
background: white;
border-radius: 0;
font-size: 16px;
}
.paperInputBox:disabled {
border-bottom: 1px dotted #f0f0f0;
color: #d9d9d9;
background: white;
}
.antMiddleInputBox {
font-size: 16px;
/** 以下都是ant的 */
border: 1px solid #d9d9d9;
border-radius: 2px;
background-color: #fff;
box-sizing: border-box;
margin: 0;
padding: 0;
font-variant: tabular-nums;
list-style: none;
font-feature-settings: 'tnum', "tnum", "tnum";
position: relative;
display: inline-block;
padding: 4px 11px;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
line-height: 1.5715;
transition: all 0.3s;
}
.antMiddleInputBox:disabled {
border: 1px dotted #f0f0f0;
color: #d9d9d9;
background: white;
}
.antMiddleInputBox::-moz-placeholder {
color: #d9d9d9;
}
.antMiddleInputBox:-ms-input-placeholder {
color: #d9d9d9;
}
.antMiddleInputBox::placeholder {
color: #d9d9d9;
}
/* 背景 */
/* .AForm::after{
content: "";
background: url(//hupan-web.oss-cn-hangzhou.aliyuncs.com/static/image/headImg.jpg);
opacity: 0.2;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
} */
.AForm .AForm {
/** 嵌套的子表单 */
/* box-shadow: 0 0 10px #d0cfcf; */
border: 1px solid #d9d9d9;
padding: 15px;
}
.AForm .ItemLabel {
font-weight: bold;
margin-bottom: 5px;
}
.AForm .Item {
margin-bottom: 20px;
}
.MEditor .ant-form-item-explain.ant-form-item-explain-error,
.MEditor_p .ant-form-item-explain.ant-form-item-explain-error {
color: #ff4d4f;
}
.AForm_segment {
background: white;
box-shadow: 0 0 10px #d0cfcf;
padding: 30px;
}
/* 只有第一个segment需要留上边距 */
* .AForm_segment:not(:first-child) {
margin: 25px 0 25px 0;
}
* .AForm_segment:first-child {
margin: 0px 0 25px 0;
}
.AForm_segmentTitleBar {
border-bottom: 1px solid #d9d9d9;
padding: 0 0 10px;
margin: 0 0 15px;
}
.AForm_segmentMainTitle {
font-size: 19px;
font-weight: bold;
margin-right: 15px;
}
.AForm_segmentSubTitle {
font-size: 10px;
display: block;
}
.AForm_segmentTopRight {
margin-left: 10px;
float: right;
display: inline;
}
.MEditor_p .AForm_segment {
padding: 20px;
}
.ACnAddress_p div {
width: 50%;
}
.ACnAddress_p .backfill {
width: 100%;
}
.ACnAddress .AInputBox {
width: 50% ;
}
.ACnAddress .AGB2260 {
width: 50% ;
}
.AArray_addBtn {
margin-top: 10px;
text-align: center;
}
.AArray_item {
flex: 1;
margin-bottom: 5px;
}
.diy-checkbox-wrapper:hover .diy-checkbox-icon {
transform: scale(1.1);
}
.diy-checkbox-wrapper .diy-checkbox-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
border: 1px solid #d9d9d9;
border-radius: 2px;
transition: all 0.3s;
}
.diy-checkbox-wrapper .diy-checkbox-icon.checked {
background-color: #1890ff;
border-color: #1890ff;
color: white;
}
.diy-checkbox-wrapper .diy-checkbox-icon.indeterminate {
background-color: #1890ff;
border-color: #1890ff;
color: white;
}
.diy-checkbox-wrapper .diy-checkbox-icon:hover {
border-color: #40a9ff;
}
.diy-checkbox-wrapper .diy-checkbox-label {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sortDrag .dragItem {
display: flex;
justify-content: space-between;
padding: 4px 8px;
background: #fff;
font-size: 14px;
transition: background 0.2s, box-shadow 0.2s;
cursor: -webkit-grab;
cursor: grab;
}
.sortDrag .dragItem.dragging {
background: #bae7ff;
box-shadow: 0 2px 8px rgba(24,144,255,0.2);
}
.sortDrag .dragItem.dropping {
background: #f2f2f2;
}
.sortDrag .dragBody {
flex: 1;
}
.sortDrag .dragHandle {
width: 40px;
}
.form-driver-plugin-richtext-viewer-wrap .richtext-viewer-more {
text-align: center;
box-shadow: 0px -5px 5px rgba(232,232,232,0.38039);
}
.form-driver-plugin-richtext-viewer-wrap .richtext-viewer-more span {
cursor: pointer;
color: #1890ff;
font-weight: bold;
position: relative;
}
.form-driver-plugin-richtext-viewer-wrap .u-arrow {
display: inline-block;
width: 9px;
height: 9px;
border-top: 1px solid #1890ff;
border-right: 1px solid #1890ff;
position: absolute;
}
.form-driver-plugin-richtext-viewer-wrap .u-arrow-up {
transform: rotate(-45deg);
left: 32px;
top: 6px;
}
.form-driver-plugin-richtext-viewer-wrap .u-arrow-down {
transform: rotate(135deg);
left: 32px;
top: 1px;
position: absolute;
}
.ATable .ant-table {
background: none;
}
.MEditor .kvSet_v {
display: inline;
}
.MEditor .kvSet_h {
display: inline-block;
white-space: nowrap;
}
.m3-plugin-ossupload-progress-modal {
display: block;
position: fixed;
right: 30px;
bottom: 30px;
width: 400px;
padding: 14px 24px 24px 24px;
border-radius: 5px;
background-color: #fff;
box-shadow: 2px 2px 24px 2px rgba(0, 0, 0, 0.1);
}
.m3-plugin-ossupload-progress-modal .cancel-icon {
text-align: right;
}
.m3-plugin-ossupload-progress-modal .divider {
width: calc(100% + 48px);
margin: 4px -24px 12px -24px;
}
.m3-plugin-ossupload-progress-modal .link-text {
color: #1890ff;
cursor: pointer;
transition: color 0.3s;
pointer-events: auto;
}
.m3-plugin-ossupload-progress-modal .progress-list {
min-height: 30px;
max-height: 400px;
overflow-y: scroll;
}
.m3-plugin-ossupload-progress-modal .progress-list .upload-progress-box {
display: flex;
}
.m3-plugin-ossupload-progress-modal .progress-list .upload-progress-box .file-name {
cursor: default;
width: 110px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
}
.m3-plugin-ossupload-progress-modal .progress-list .none {
width: 100%;
height: 100%;
text-align: center;
line-height: 30px;
}