zl程序教程

您现在的位置是:首页 >  工具

当前栏目

【鸿蒙】【ARK UI】HarmonyOS search组件怎么使用

组件鸿蒙UI 怎么 search HarmonyOS 使用 ARK
2023-09-11 14:20:22 时间

 参考资料

search

api 讲解

cke_532.png

代码运行

hml代码

<div class="container">
    <search hint="请输入搜索内容" searchbutton="搜索"              value="11111111111">
    </search>
    <text style="font-size: 30px; color: black; width: 100%; height: 100px;">
      搜索的值:  {{this.searchValue}}
    </text>

    <text style="background-color: red; font-size: 30px; color: black; width: 100%; height: 100px;">
        翻译的值:  {{this.translateValue}}
    </text>
</div>

css代码

/* xxx.css */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

运行效果

8d73a8b002327daf5d48bfdfe2b1b301_739x985.gif%40900-0-90-f.gif

 

 欲了解更多更全技术文章,欢迎访问https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh