diff --git a/src/components/XTable/src/XTable.vue b/src/components/XTable/src/XTable.vue index e5c503ec..1f9ba4f2 100644 --- a/src/components/XTable/src/XTable.vue +++ b/src/components/XTable/src/XTable.vue @@ -26,12 +26,12 @@ const prefixCls = getPrefixCls('x-vxe-table') const attrs = useAttrs() const emit = defineEmits(['register']) const removeStyles = () => { - var filename = 'cssTheme' + const filename = 'cssTheme' //移除引入的文件名 - var targetelement = 'style' - var targetattr = 'id' - var allsuspects = document.getElementsByTagName(targetelement) - for (var i = allsuspects.length; i >= 0; i--) { + const targetelement = 'style' + const targetattr = 'id' + let allsuspects = document.getElementsByTagName(targetelement) + for (let i = allsuspects.length; i >= 0; i--) { if ( allsuspects[i] && allsuspects[i].getAttribute(targetattr) != null && @@ -43,8 +43,8 @@ const removeStyles = () => { } } const reImport = () => { - var head = document.getElementsByTagName('head')[0] - var style = document.createElement('style') + let head = document.getElementsByTagName('head')[0] + let style = document.createElement('style') style.innerText = styleCss style.id = 'cssTheme' head.appendChild(style) diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 97993f5f..da4b8389 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -111,16 +111,21 @@ > { -// treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : []) -// } +const handleCheckedTreeNodeAll = () => { + treeRef.value!.setCheckedNodes(treeNodeAll.value ? treeOptions.value : []) +} // 权限操作 const handleScope = async (type: string, row: RoleApi.RoleVO) => { dataScopeForm.id = row.id