svelte - 为什么它不知道相同的内容?
问题描述
我已经用相同的 ui 用 svelte 和 sapper 构建了一个示例应用程序,并发现内容看起来不同:
我检查了css,但应该没有任何区别。
来自https://gitlab.com/oceanstack/ui5-sapper和https://gitlab.com/oceanstack/ui5-svelte的代码
解决方案
问题是你的 HTML 不一样。
苗条:
<ui5-label id="myLabel" for="myInput" required show-colon="">First name</ui5-label>
工兵:
<ui5-label id="myLabel" for="myInput" show-colon="">First name</ui5-label>
请注意,Svelte 具有该required
属性,而 Sapper 则没有。
If you go into the browser development tools on the Sapper page and add the required
attribute to the label, you'll notice that all of a sudden, the ellipsis is removed and that your labels will match.
推荐阅读
- java - 如何为从未发生的捕获的 CloneNotSupportedException 编写测试?
- python - 无法让python将变量转换为字符串
- javascript - ajax回调函数后,Javascript专注于文本区域
- linux - 如何使用配置文件在 Linux 上作为服务启动
- django - 从 1.8 升级到 2.2.4 后,Django 无法创建用于单元测试的表
- r - 用 gsub() 和 Regex 替换字符串中的特定字符
- python - 如何使窗口中的滚动条起作用?
- numpy - 如何在 Blender 中使用 Python Anaconda numpy?
- flutter - 检查 dart sdk 版本
- angular - 父子数据结构类型中的递归搜索