Eslint:sap-no-ui5-prop-warning [英] Eslint : sap-no-ui5-prop-warning
本文介绍了Eslint:sap-no-ui5-prop-warning的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想删除ESLint警告。
我得到了 sap-no-ui5-prop-warning
,因为我使用了 this.getModel()。oData [ ProductSet(' + sId +')]。矩阵
。但是当我使用函数 getData()
时,它返回null。
I want to remove the ESLint warnings.
I got sap-no-ui5-prop-warning
because I used this.getModel().oData["ProductSet('" + sId+ "')"].Matricule
. But when I use the function getData()
, it returns null.
您对如何解决有何建议
推荐答案
查看文档。很简单。
/* eslint-disable sap-no-ui5base-prop */
...some code false positives
/* eslint-enable sap-no-ui5base-prop */
Btw getData()
。
可以使用 getProperty( /)
代替。它将为您提供数据的根级别。
Btw getData()
for ODataModel is deprecated.
You can use getProperty("/")
instead. It'll give you the root level of your data.
这篇关于Eslint:sap-no-ui5-prop-warning的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文