mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-14 02:45:06 +08:00
租户和角色管理的菜单权限不能滚动
租户新增菜单权限校验不通过 角色管理详情页不展示对应的部门 XTable中主题颜色不跟随项目主体一起切换
This commit is contained in:
@ -12,7 +12,7 @@ import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { XTableProps } from './type'
|
||||
import { isBoolean, isFunction } from '@/utils/is'
|
||||
|
||||
import styleCss from './style/dark.scss'
|
||||
import download from '@/utils/download'
|
||||
|
||||
const { t } = useI18n()
|
||||
@ -25,15 +25,38 @@ const prefixCls = getPrefixCls('x-vxe-table')
|
||||
|
||||
const attrs = useAttrs()
|
||||
const emit = defineEmits(['register'])
|
||||
|
||||
const removeStyles = () => {
|
||||
var filename = 'cssTheme'
|
||||
//移除引入的文件名
|
||||
var targetelement = 'style'
|
||||
var targetattr = 'id'
|
||||
var allsuspects = document.getElementsByTagName(targetelement)
|
||||
for (var i = allsuspects.length; i >= 0; i--) {
|
||||
if (
|
||||
allsuspects[i] &&
|
||||
allsuspects[i].getAttribute(targetattr) != null &&
|
||||
allsuspects[i].getAttribute(targetattr)?.indexOf(filename) != -1
|
||||
) {
|
||||
console.log(allsuspects[i], 'node')
|
||||
allsuspects[i].parentNode?.removeChild(allsuspects[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
const reImport = () => {
|
||||
var head = document.getElementsByTagName('head')[0]
|
||||
var style = document.createElement('style')
|
||||
style.innerText = styleCss
|
||||
style.id = 'cssTheme'
|
||||
head.appendChild(style)
|
||||
}
|
||||
watch(
|
||||
() => appStore.getIsDark,
|
||||
() => {
|
||||
if (appStore.getIsDark == true) {
|
||||
import('./style/dark.scss')
|
||||
reImport()
|
||||
}
|
||||
if (appStore.getIsDark == false) {
|
||||
import('./style/light.scss')
|
||||
removeStyles()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
Reference in New Issue
Block a user