摘要: 场景:根据后端返回的数据进行多条件渲染,三元表达式已不能满足条件。 代码: <span> {(() => { switch (record.generalRuleInfos[0]?.factors[0]?.baseDataKey) { case 'poiType': return '门店类型' ca 阅读全文
posted @ 2020-11-20 16:09 liaoing 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 原代码: record.modifiedTime? 修改后代码:typeof record.modifiedTime !== 'undefined' ? (isAddType true ? '新增' : '修改') + '审批规则' 出现场景:主要是if判断中和三双表达式中出现。 解决方式:直接比较 阅读全文
posted @ 2020-11-20 14:04 liaoing 阅读(1016) 评论(0) 推荐(0) 编辑