小编3nt*_*nt3的帖子

将鼠标悬停在 elm (elm-ui) 中时如何使文本删除线?

基本上我想在悬停时使文本删除线。这不容易与

el [ mouseOver [Font.strike] ] (text "some text")
Run Code Online (Sandbox Code Playgroud)

就像它会

el [ mouseOver [Background.color someColor] ] (text "some other text")
Run Code Online (Sandbox Code Playgroud)

因为Font.strikeAttribute msgwhileBackground.color是类型Attr decorative msg

有没有人知道如何用类似的东西来实现描述的行为Font.strike

elm-ui如果不可能,我也会接受非解决方案。

elm elm-ui

2
推荐指数
1
解决办法
173
查看次数

计算项目的实例

例如输入

["a", "b", "b", "c", "a"]
Run Code Online (Sandbox Code Playgroud)

会导致输出

[("a", 2), ("b", 2), ("c", 1)]
Run Code Online (Sandbox Code Playgroud)

我真的想不出一种在榆树中做到这一点的实用方法

elm

1
推荐指数
1
解决办法
72
查看次数

标签 统计

elm ×2

elm-ui ×1