We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前 ui 配置除了主题包自带的以外,用户新增 ui prop 或者 ui value 都比较麻烦,需要考虑新增一些接口方便用户添加自己的配置。
考虑新增 managers/ui,提供如下接口:
managers/ui
// 为已有的 ui prop 新增 value addPropValue: (component: string, prop: string, value: string) => void // 设置 prop 的默认值 interface SetDefaultFunc { (component: string, prop: string, value: string): void (prop: string, value: string): void } setPropDefault: SetDefaultFunc // 添加新的 ui prop addProp: (component: string, prop: string, propDef: Object) => void // 替换已有的 icon 配置 setIcon: (component: string, icon: string, name: string | Function) => void // 替换已有的 part 配置 setPart: (component: string, part: string, ui: string | Function) => void // 修改 ui data setData: (component: string, ui: string, key: string, value: any) => void
使用时可能是:
import ui from 'veui/managers/ui' ui.addPropValue('button', 'size', 'xxl') ui.setPropDefault('button', 'size', 's') ui.setPropDefault('size', 's') ui.addProp('button', 'fancy', { boolean: true }) ui.setIcon('button', 'loading', 'spinner') ui.setPart('dialog', 'ok', 'fancy') ui.setData('progress', 'm', 'strokeWidth', 12)
The text was updated successfully, but these errors were encountered:
See also: #378
Sorry, something went wrong.
feat: enhance ui manager, implements #565
a1fd456
c0152a0
Implemented in #1164.
No branches or pull requests
目前 ui 配置除了主题包自带的以外,用户新增 ui prop 或者 ui value 都比较麻烦,需要考虑新增一些接口方便用户添加自己的配置。
考虑新增
managers/ui
,提供如下接口:使用时可能是:
The text was updated successfully, but these errors were encountered: