Browse Source

!24 fix: 打包后夜间模式样式问题

Merge pull request !24 from 二次元虎哥/master
main
xingyu 2 years ago committed by Gitee
parent
commit
0ce3729d0c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 24
      src/design/index.less
  2. 30
      src/utils/dict.ts

24
src/design/index.less

@ -42,3 +42,27 @@ svg,
span {
outline: none;
}
/** 打包后夜间模式样式有问题 在这里覆盖 */
html[data-theme='dark'] {
/** 菜单边框 */
ul li {
border: none;
}
ul li:hover {
color: inherit !important;
border: none;
box-shadow: none;
}
/** 日期输入框 */
.ant-picker-input > input {
border: none;
}
.ant-picker-input > input:focus {
color: inherit !important;
box-shadow: none;
}
}

30
src/utils/dict.ts

@ -25,30 +25,18 @@ export function getDictDatas(dictType: string) {
}
export function getDictOpts(dictType: string) {
const dictOption: DictDataType[] = []
const dictOptions: DictDataType[] = getDictDatas(dictType)
if (dictOptions && dictOptions.length > 0) {
dictOptions.forEach((dict: DictDataType) => {
if (typeof dict.value === 'number') {
dictOption.push({
/**
* Tag
* getDictOptions来处理
*
* bugfix:
* dictOption.push({
...dict,
value: parseInt(dict.value + '')
})
} else if (typeof dict.value === 'string') {
dictOption.push({
...dict,
value: dict.value + ''
})
} else if (typeof dict.value === 'boolean') {
dictOption.push({
...dict,
value: dict.value + '' === 'true' ? true : false
})
}
})
}
return dictOption
*/
return getDictDatas(dictType)
}
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') {

Loading…
Cancel
Save