Surrealism-All / SurrealismUI

A third-party UI library using Slint, I think it will give you an extraordinary experience
https://surrealism-all.github.io/SurrealismUI.github.io/
MIT License
197 stars 19 forks source link

提个小问题 #19

Closed Vjze closed 8 months ago

Vjze commented 8 months ago

sselect的下拉card宽度异常,设置的宽度只在点击card生效。 image

syf20020816 commented 8 months ago

请附带具体代码以供参考

Vjze commented 8 months ago

// btw-select := SSelect { // width: 380px; // options: btws; // placeholder: "选择标签模板"; // theme: Light; // changed(index,label) => { // btws-select-value = label; // btw-status = "已选择"; // self.close() // } // }

Vjze commented 8 months ago

其实我个人觉得这个self.close()应该添加在你的源代码里的,点击之后收起下拉选项,这才是最常用的模式吧

syf20020816 commented 8 months ago

请注意,设置宽度使用card-width当组件是继承SCard时

syf20020816 commented 8 months ago

另外close方法是一种可靠的关闭方式,或许用户并不希望选择结束后关闭选项,所以这是可自主控制的

syf20020816 commented 8 months ago

目前所有组件的文档已经更新,请查看wiki: https://github.com/Surrealism-All/SurrealismUI/wiki