格式包裹器-基于框架格式更好的参数传入模式 #26
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目前有个缺点,在使用长串的带图标的格式时,定义语句难以化简。
···

<line-height=10><sprite="circularChain" index=0>探测范围:DK150+300.32~
<pos=33>DK150+400.32<line-height=0>
<sprite="radar" index=0>探测方法:水平声波剖面
<sprite="ruler" index=0>探测长度:100m
<sprite="callipers" index=0>剩余已探测长度:20m<line-height=4> <size=14><sprite="LrcSaWarn" index=0>
<sprite="warnLight" index=0><size=22>无预警<line-height=16>
<sprite="clock" index=0><size=18>预报时间:-
···
目前的框架语法还无法直接控制是否传参,导致需要拆分语法,实际上可能还不如直接写原始格式。
喵~ 我理解您遇到的问题了!当前框架在处理带图标的复杂格式时确实存在语法冗长的问题。让我们一起来分析并改进这个情况吧~
问题分析:
改进建议方案:
行动计划:
TextBlockBuilder基础类,添加流畅API支持需要我帮您起草具体的实现方案吗?或者您希望先讨论哪个部分的改进细节呢?喵~
(另外注意到您使用了混合的代码格式标记,建议统一使用```包裹代码块哦~)