简体   繁体   English

覆盖 base less 属性 UI5

[英]Override base less property UI5

Is there a way to override somehow base property that comes from有没有办法以某种方式覆盖来自

https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/themes/base/Token.less https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/themes/base/Token.less

I need to change我需要改变

@_sap_m_Token_Sys_Cancel_Icon: true;

to false, but of course not in the UI5 library itself.为假,但当然不在 UI5 库本身中。

you can override it this way你可以这样覆盖它

  var parameters_get = Parameters.get;

  Parameters.get = function(N, k) {
    if (N === "_sap_m_Token_Sys_Cancel_Icon") {
      return false;
    }
    return parameters_get(N, k);
  }

sample: https://jsbin.com/bomosaz/edit?js,output示例: https://jsbin.com/bomosaz/edit?js,output

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM