更新时间:2022-05-01 10:20:17浏览次数:430+次
以下介绍鸿蒙 ARK UI技术之HarmonyOS search组件怎么使用的方法,可先到鸿蒙文档中看search的介绍,api讲解如下截图:
代码运行
1、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>
2、css代码
/* xxx.css */
.container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
运行效果
以上是动画效果。
相关资讯