西门子EBR修改PI样式-ebr二次开发

node安装

官网:Node.js (nodejs.org)

下载安装;

安装lesss

npm install -g less

vscode进行编辑

vscode打开目录:C:\OpcenterEXPH\SIMATICIT_eBR_6240\Ressourc\OperatingText

具体根据自身情况,这样打开方便后续编译直接到目标位置!!

以设计PI 设计为例

//OTDesigner.less 文件
@import "_OTVariables";
@import "_OTSplitter";
@import "_OTSplitterTagProperties";
@import "_OTToolbar";
@import "_OperatingText";
@import "_OperatingTextTitle";
@import "_OTSection";
@import "_OTVisibility";
@import "_OTSectionCondition";
@import "_OTDesignerCommon.less";

上面可以看到,引入很多文件,分别找到对应修改!!

这里需要less基础!!!修改后打包:

lessc Less\OTDesigner.less CSS\OTDesigner.css   //打包设计时样式

其他客户端需要拷贝css目录过去:
在这里插入图片描述

修改前标题样式:
在这里插入图片描述

修改的内容:

 ///_OperatingTextTitle.less w文件
    a[marqtype="12"][level="1"],
    a[marqtype="12"][level="2"],
    a[marqtype="12"][level="3"],
    a[marqtype="12"][level="4"] {
        background: none;
        outline: none;
        padding: 0;
        margin: 0;
        border: none;
        display: block;
        text-align: center;
    }

    a[marqtype="12"][level="1"] {
        color: @title-1-font-color; 
        background-color: @title-1-font-bg;
        font-size: @title-1-font-size;
        font-style: @title-1-font-style;
        font-family: @title-1-font-family;
        font-weight: @title-1-font-weight;
    }

修改后:
在这里插入图片描述

包括按钮啥的按需修改,非常的方便!!!

在这里插入图片描述

样式列表

不明白不清楚的请联系我:

wx:dengchunyi2
tel:15071747425

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值