function ReturnGoodsStatusTranslatetype string const ooid = ReturnGoodsStatusfindit = return itdictValue == type; ; if ooid return ooiddictLabel; else return type; 以上代码是什么意思?
这段代码定义了一个名为ReturnGoodsStatusTranslate的函数,其参数为一个字符串类型的变量type。函数内部使用find方法在ReturnGoodsStatus数组中查找满足条件的元素,条件是元素的dictValue属性等于type变量的值。如果找到了匹配的元素,则返回该元素的dictLabel属性;如果没有找到匹配的元素,则返回type变量的值。
原文地址: http://www.cveoy.top/t/topic/iJY5 著作权归作者所有。请勿转载和采集!