如何隐藏审批框中的提交按钮?
const ctx = exports.ctx;
const utils = exports.utils;
const http = utils.getHttp()
const isMobile = utils.getDevice() === 'mobile'
export function onload (payload) {
function hideDecisionSubmitButton(wctype) {
const decision = document.querySelector(wctype)
if (decision !== null) {
const button = decision.shadowRoot.querySelector("[data-command-id='submit_1']")
if(decision && button){
button.setAttribute('style', 'background: #ccc!important');
button.setAttribute('style', 'display: none !important');
button.disabled = true;
}
}
}
function hideDecision(wctype) {
hideDecisionSubmitButton(wctype)
document.addEventListener(wctype + '-result', () => {
setTimeout(() => {
hideDecisionSubmitButton(wctype)
})
})
}
//获取到隐藏 老组件wfc-decision,新组件wfc-decision
hideDecision('wfc-decision')
hideDecision('bla-decision')
}
-
如何隐藏审批框中的提交按钮?
-
最近的话题