sn-text
旧版组件:sn-text.md 旧版状态:文本组件,通过
mode提供 date / price / phone 等多种文本模式,属性较多(font、size、align、overflow、lineHeight 等)。 差异明细:
- 移除属性:
mode(date / date-cn / price / price-upper / name / phone / phone-direct 等文本模式全部移除)、font、align、overflow、decorationLine、space、decode、lineHeight、aniTime、encrypt。 - 更名:
size→fontSize;customTextStyle→textClass(并改为外部样式类,另有 externalStyle 风格的customStyle)。 - 类型或默认值变化:
type默认值info→text,可选值改为title|text|text-light|primary|info|success|warning|error(新增title、text-light,移除纯色系中与正文重复的默认语义);lines默认值-1→0(0表示不限制);customStyle类型 UTSJSONObject → UTSJSONObject | String。
- 行为变化:新增默认插槽且优先于
text属性;fontSize、color支持$简写与乘数;多行截断在蒸汽模式下通过max-lines实现;加粗固定为font-weight: 600。 - 新增事件、方法、插槽:新增 default 插槽;无事件、无方法。
