1.1K Star 6.1K Fork 5K

OpenHarmony / docs

 / 详情

[问题咨询]: 咱能不能设计一些现代的语法?

待办的
创建于  
2024-04-24 17:27

问题描述

  • 1.你比如扩展组件,只是举个例子不代表这是最好的设计
@Component
export struct FlatTextInput extends TextInput{
 
    @Style
    withFlat(){ .borderRadius(0)}

    build(props?:TextInputProps){
        super(props).withFlat()
    } 
}

...
// 我能不能不做任何操作直接把TextInput的onChange调出来,而不是用什么attributeModifier这种API污染了内部实现
FlatTextInput().onChange()

  • 2.你在比如状态传递,定了这么多种类型,两两组合?一个Props和onChange搭配就能解决的问题?
    • State
    • OB
    • Link

评论 (3)

sajdflizxcv 创建了任务
sajdflizxcv 添加了
 
question
标签
展开全部操作日志

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 @NEEN @zengyawen @时睿 @Peter_1988 。如果需要调整订阅PR、Issue的变更状态,请访问链接

Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer @NEEN @zengyawen @时睿 @Peter_1988 for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

openharmony_ci 添加了
 
waiting_for_assign
标签

就是咱们能不能不堆这种API了,好好设计语法和写法一步到位

Mei 负责人设置为张译心
openharmony_ci 移除了
 
waiting_for_assign
标签

您好, @张译心 ,issue已经分配给您,请及时处理。

@张译心 , the issue has been assigned to you. Please handle it in time.

openharmony_ci 添加了
 
waiting_for_fix
标签

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
7387629 openharmony ci 1656582662 5208265 devcui 1616340460
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs

搜索帮助