Pre Merge pull request !24 from 二次元虎哥/master
commit
2acf4f4fdc
|
@ -42,3 +42,27 @@ svg,
|
||||||
span {
|
span {
|
||||||
outline: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -25,30 +25,18 @@ export function getDictDatas(dictType: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDictOpts(dictType: string) {
|
export function getDictOpts(dictType: string) {
|
||||||
const dictOption: DictDataType[] = []
|
/**
|
||||||
const dictOptions: DictDataType[] = getDictDatas(dictType)
|
* 这里原来是转换类型 转换类型后反而显示不出来正确的Tag
|
||||||
if (dictOptions && dictOptions.length > 0) {
|
* 实际类型转换交给下面的getDictOptions来处理
|
||||||
dictOptions.forEach((dict: DictDataType) => {
|
*
|
||||||
if (typeof dict.value === 'number') {
|
* bugfix:
|
||||||
dictOption.push({
|
* dictOption.push({
|
||||||
...dict,
|
...dict,
|
||||||
value: parseInt(dict.value + '')
|
value: parseInt(dict.value + '')
|
||||||
})
|
})
|
||||||
} else if (typeof dict.value === 'string') {
|
原来的这种写法是造成页面卡死的原因
|
||||||
dictOption.push({
|
*/
|
||||||
...dict,
|
return getDictDatas(dictType)
|
||||||
value: dict.value + ''
|
|
||||||
})
|
|
||||||
} else if (typeof dict.value === 'boolean') {
|
|
||||||
dictOption.push({
|
|
||||||
...dict,
|
|
||||||
value: dict.value + '' === 'true' ? true : false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return dictOption
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') {
|
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') {
|
||||||
|
|
Loading…
Reference in New Issue