修复页面横向滑动bug
This commit is contained in:
parent
b0ab8a76a7
commit
2e35fead78
22
SVG资源/star-struck face.svg
Normal file
22
SVG资源/star-struck face.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="color">
|
||||
<circle cx="36.0001" cy="36" r="24" fill="#FCEA2B"/>
|
||||
<polygon fill="#F1B31C" points="25.0424,21.2371 33.0285,20.0364 29.1238,27.1056 32.7335,34.3298 24.8037,32.8007 19.0485,38.4662 18.0524,30.452 10.8857,26.7292 18.1999,23.3052 19.5258,15.3389"/>
|
||||
<polygon fill="#F1B31C" points="46.8821,21.2371 38.896,20.0364 42.8007,27.1056 39.191,34.3298 47.1208,32.8007 52.876,38.4662 53.8721,30.452 61.0388,26.7292 53.7246,23.3052 52.3987,15.3389"/>
|
||||
<path fill="#EA5A47" d="M49.7371,46.356c-1.79,4.27-6.35,7.23-13.7,7.23c-7.41,0-12.03-3.03-13.8-7.36 C24.2671,46.686,37.2171,49.3959,49.7371,46.356z"/>
|
||||
<path fill="#FFFFFF" d="M50.6071,41.866c0,1.6-0.29,3.11-0.87,4.49c-12.52,3.04-25.47,0.33-27.5-0.13 c-0.55-1.35-0.83-2.82-0.83-4.36h0.11c0,0,14.81,3.59,28.89,0.07L50.6071,41.866z"/>
|
||||
</g>
|
||||
<g id="hair"/>
|
||||
<g id="skin"/>
|
||||
<g id="skin-shadow"/>
|
||||
<g id="line">
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M50.6071,41.866c0,1.6-0.29,3.11-0.87,4.49c-12.52,3.04-25.47,0.33-27.5-0.13c-0.55-1.35-0.83-2.82-0.83-4.36h0.11 c0,0,14.81,3.59,28.89,0.07L50.6071,41.866z"/>
|
||||
<path fill="none" stroke="#000000" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M49.7371,46.356 c-1.79,4.27-6.35,7.23-13.7,7.23c-7.41,0-12.03-3.03-13.8-7.36C24.2671,46.686,37.2171,49.3959,49.7371,46.356z"/>
|
||||
<path fill="none" stroke="#000000" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M50.2271,46.236 c-0.16,0.04-0.33,0.08-0.49,0.12"/>
|
||||
<path fill="none" stroke="#000000" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M22.2371,46.226 c-0.19-0.05-0.28-0.07-0.28-0.07"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M46.5542,15.5591C43.3932,13.9237,39.8045,13,36,13c-3.9546,0-7.676,0.9979-10.9261,2.7556 c-0.0502,0.0271-0.1002,0.0544-0.1501,0.0819"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M13.1945,32.9954c-0.1283,0.9833-0.1944,1.9862-0.1944,3.0046c0,12.7022,10.2969,23,23,23c12.7022,0,23-10.2978,23-23 c0-1.0073-0.0648-1.9995-0.1903-2.9726"/>
|
||||
<polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="25.1179,21.2371 33.104,20.0364 29.1993,27.1056 32.809,34.3298 24.8792,32.8007 19.124,38.4662 18.1279,30.452 10.9612,26.7292 18.2754,23.3052 19.6013,15.3389"/>
|
||||
<polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="46.8821,21.2371 38.896,20.0364 42.8007,27.1056 39.191,34.3298 47.1208,32.8007 52.876,38.4662 53.8721,30.452 61.0388,26.7292 53.7246,23.3052 52.3987,15.3389"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
52
页面横向滑动.js
52
页面横向滑动.js
@ -40,10 +40,22 @@ els为其他需要在方法中将display属性还原的单元格class
|
||||
position: sticky !important;
|
||||
top: 0px !important;
|
||||
}
|
||||
(3)结合以下CSS样式,以解决提交按钮闪烁问题,前提是要把提交按钮放在快捷按钮的第一位
|
||||
.ant-col-xs-18>div>span:nth-of-type(1):not(.wea-new-top-req-drop-btn) {
|
||||
display: none !important;
|
||||
}
|
||||
*/
|
||||
function pageLateralSlider(sld_obj) {
|
||||
document.getElementsByClassName("wf-req-top-button")[0].parentNode.parentNode.id = "submitBtn";
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
Object.assign(sld_obj, {
|
||||
currentnode: true,
|
||||
});
|
||||
if (WfForm.getGlobalStore().commonParam.currentnodeid != WfForm.getGlobalStore().commonParam.nodeid) {
|
||||
sld_obj.currentnode = false;
|
||||
}
|
||||
if (sld_obj.currentnode == true) {
|
||||
document.getElementsByClassName("wf-req-top-button")[0].parentNode.parentNode.id = "submitBtn";
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
var steps = sld_obj.vars.length;
|
||||
let myIntv1 = setInterval(() => {
|
||||
//页面元素加载判断
|
||||
@ -69,7 +81,7 @@ function pageLateralSlider(sld_obj) {
|
||||
if ($(".wf-req-form").length === 0) {
|
||||
return;
|
||||
}
|
||||
if ($(".wf-req-top-button").length === 0) {
|
||||
if ($(".wf-req-top-button").length === 0 && sld_obj.currentnode == true) {
|
||||
return;
|
||||
}
|
||||
clearInterval(myIntv1);
|
||||
@ -106,7 +118,9 @@ function pageLateralSlider(sld_obj) {
|
||||
$(".preStep").css({ "display": "none" });
|
||||
$(".step-blank").css({ "display": "none" });
|
||||
$(".nexStep").css({ "display": "inline" });
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
if (sld_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
if (curStepVar > 0) {
|
||||
for (let i = 0; i < curStepVar; i++) {
|
||||
if (i === 0) {
|
||||
@ -120,7 +134,6 @@ function pageLateralSlider(sld_obj) {
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function initialization(init_obj) {
|
||||
//设置列宽
|
||||
let useful_cols = [];
|
||||
@ -141,7 +154,6 @@ function initialization(init_obj) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function pageLateralSliderClick(clc_obj) {
|
||||
var clc_content_width = clc_obj.content_width;
|
||||
$(".nexStep").off("click");
|
||||
@ -187,17 +199,23 @@ function pageLateralSliderClick(clc_obj) {
|
||||
$(".preStep").css({ "display": "none" });
|
||||
$(".step-blank").css({ "display": "none" });
|
||||
$(".nexStep").css({ "display": "inline" });
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
} else if (clc_obj.curStep === clc_obj.vars.length - 1) {
|
||||
$(".preStep").css({ "display": "inline" });
|
||||
$(".step-blank").css({ "display": "none" });
|
||||
$(".nexStep").css({ "display": "none" });
|
||||
$("#submitBtn").css("cssText", "display:inline-block !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:inline-block !important;");
|
||||
}
|
||||
} else {
|
||||
$(".preStep").css({ "display": "inline" });
|
||||
$(".step-blank").css({ "display": "inline" });
|
||||
$(".nexStep").css({ "display": "inline" });
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
}
|
||||
WfForm.changeFieldValue(clc_obj.curStepFieldId, { value: clc_obj.curStep });
|
||||
click_judg--;
|
||||
@ -240,24 +258,29 @@ function pageLateralSliderClick(clc_obj) {
|
||||
$(".preStep").css({ "display": "none" });
|
||||
$(".step-blank").css({ "display": "none" });
|
||||
$(".nexStep").css({ "display": "inline" });
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
} else if (clc_obj.curStep === clc_obj.vars.length - 1) {
|
||||
$(".preStep").css({ "display": "inline" });
|
||||
$(".step-blank").css({ "display": "none" });
|
||||
$(".nexStep").css({ "display": "none" });
|
||||
$("#submitBtn").css("cssText", "display:inline-block !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:inline-block !important;");
|
||||
}
|
||||
} else {
|
||||
$(".preStep").css({ "display": "inline" });
|
||||
$(".step-blank").css({ "display": "inline" });
|
||||
$(".nexStep").css({ "display": "inline" });
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
if (clc_obj.currentnode == true) {
|
||||
$("#submitBtn").css("cssText", "display:none !important;");
|
||||
}
|
||||
}
|
||||
WfForm.changeFieldValue(clc_obj.curStepFieldId, { value: clc_obj.curStep });
|
||||
click_judg--;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showEmptyRequiredField(serf_obj) {
|
||||
let serf_arr = serf_obj.vars[serf_obj.curStep].tab_required_info;
|
||||
for (let e of serf_arr) {
|
||||
@ -307,7 +330,6 @@ function showEmptyRequiredField(serf_obj) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function showPrompt(SP_fieldid, SP_content, SP_tabid, SP_rowIndex) {//添加提示,SP_rowIndex选填;如要填SP_rowIndex,SP_tabid必填,可填null
|
||||
if (SP_rowIndex === null || SP_rowIndex === undefined) {
|
||||
$(`.myprom_${SP_fieldid}`).remove();
|
||||
@ -321,7 +343,6 @@ function showPrompt(SP_fieldid, SP_content, SP_tabid, SP_rowIndex) {//添加提
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function eraseFieldPrompt(EFP_fieldid, EFP_rowIndex) {//移除提示,SP_rowIndex选填
|
||||
if (EFP_rowIndex === null || EFP_rowIndex === undefined) {
|
||||
$(`.myprom_${EFP_fieldid}`).remove();
|
||||
@ -329,7 +350,6 @@ function eraseFieldPrompt(EFP_fieldid, EFP_rowIndex) {//移除提示,SP_rowIndex
|
||||
$(`.myprom_${EFP_fieldid}_${EFP_rowIndex}`).remove();
|
||||
}
|
||||
}
|
||||
|
||||
function checkPrompt() {//提交前判断,先做一次if ($(".myprom").length > 0) {}判断,true则触发该方法,并禁断提交,false不执行
|
||||
let tab_id = $(".myprom")[0].getAttribute("data_tab_id");
|
||||
if (tab_id === "null" || tab_id === "undefined") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user