QColor 组件提供了输入颜色的方法。
¥The QColor component provides a method to input colors.
用法(Usage)
¥Usage
基本(Basic)
¥Basic
使用 QInput(With QInput)
¥With QInput
QInput rules
属性有辅助函数:完整列表。你可以使用它们来方便使用,也可以编写指定 自定义需求 的字符串。
¥There are helpers for QInput rules
prop: full list. You can use these for convenience or write the string specifying your custom needs.
示例:“hexColor”, “rgbOrRgbaColor”, “anyColor”.
¥Examples: “hexColor”, “rgbOrRgbaColor”, “anyColor”.
更多信息:QInput。
¥More info: QInput.
无页眉或页脚(No header or footer)
¥No header or footer
你可以选择是否不渲染页眉和/或页脚,如下例所示:
¥You can choose if you don’t want to render the header and/or footer, like in example below:
自定义默认视图(Custom default view)
¥Custom default view
你也可以选择默认视图,如下例所示,我们指定不渲染页眉和页脚。最终结果会生成一个漂亮的调色板供用户选择:
¥You can also pick the default view, like in example below, where we also specify we don’t want to render the header and footer. The end result generates a nice color palette that the user can pick from:
自定义调色板(Custom palette)
¥Custom palette
强制暗黑模式(Force dark mode)
¥Force dark mode
默认值(Default value)
¥Default value
延迟更新(Lazy update)
¥Lazy update
禁用并只读(Disable and readonly)
¥Disable and readonly
原生表单提交(Native form submit)
¥Native form submit
处理具有 action
和 method
的原生表单时(例如,将 Quasar 与 ASP.NET 控制器结合使用时),你需要在 QColor 上指定 name
属性,否则 formData 将不会包含该属性(如果应该包含的话):
¥When dealing with a native form which has an action
and a method
(eg. when using Quasar with ASP.NET controllers), you need to specify the name
property on QColor, otherwise formData will not contain it (if it should):