diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index f70d52bf..15b5f12a 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -33,12 +33,15 @@ export default defineComponent({ if (!props.type) { return null } - if (!props.value) { + // 解决自定义字典标签值为零时标签不渲染的问题 + if (!props.value && props.value !== 0) { return null } getDictObj(props.type, props.value.toString()) + // 添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题 return ( { //移除引入的文件名 const targetelement = 'style' const targetattr = 'id' - let allsuspects = document.getElementsByTagName(targetelement) + const allsuspects = document.getElementsByTagName(targetelement) for (let i = allsuspects.length; i >= 0; i--) { if ( allsuspects[i] && @@ -43,8 +43,8 @@ const removeStyles = () => { } } const reImport = () => { - let head = document.getElementsByTagName('head')[0] - let style = document.createElement('style') + const head = document.getElementsByTagName('head')[0] + const style = document.createElement('style') style.innerText = styleCss style.id = 'cssTheme' head.appendChild(style) @@ -52,10 +52,10 @@ const reImport = () => { watch( () => appStore.getIsDark, () => { - if (appStore.getIsDark == true) { + if (appStore.getIsDark) { reImport() } - if (appStore.getIsDark == false) { + if (!appStore.getIsDark) { removeStyles() } }, diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue index 2ec10c63..ef2ba0b9 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue @@ -11,10 +11,10 @@ > { (...arg: T[]): T