|
@ -386,12 +386,14 @@ export function removeClass(ele, cls) { |
|
|
|
|
|
|
|
|
//返回
|
|
|
//返回
|
|
|
export function Enum(status, index, prop) { |
|
|
export function Enum(status, index, prop) { |
|
|
|
|
|
let _no_text = '无' |
|
|
|
|
|
if(!status)return _no_text |
|
|
if (index != undefined) { //如果传入的是index
|
|
|
if (index != undefined) { //如果传入的是index
|
|
|
if (prop === 'color') { |
|
|
if (prop === 'color') { |
|
|
const domColor = status[index] ? status[index][prop] : "" |
|
|
const domColor = status[index] ? status[index][prop] : "" |
|
|
return 'color:' + domColor |
|
|
return 'color:' + domColor |
|
|
} else { |
|
|
} else { |
|
|
const dom = status[index] ? status[index][prop] : "无" |
|
|
const dom = status[index] ? status[index][prop] : _no_text |
|
|
return dom |
|
|
return dom |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|