【问题标题】:SearchBar component borderRadius doesn't workSearchBar 组件borderRadius 不起作用
【发布时间】:2019-05-25 16:15:43
【问题描述】:

我已经尝试在 SearchBar 组件上使用borderRadius 属性,但它不起作用

已尝试使用borderWidth 和borderRadius 属性,但仍然无法使用。另外我已经尝试过使用 CSS 边框半径,但仍然无法正常工作。我正在使用 Nativescript 5.4.0 版

<SearchBar hint="Insert Keyword" borderWidth="2" borderRadius="20" @submit="onSearchSubmit"/>

和

<SearchBar hint="Insert Keyword" borderTopWidth="2" borderTopLeftRadius="20" borderTopRightRadius="20" />

预期结果是带有borderRadius 的SearchBar 工作

【问题讨论】:

  • 您至少可以提供一个 CodePen 或一些示例代码吗?帮助别人帮助你...
  • 您是使用 Android 还是 iOS 进行测试?
  • 请添加沙箱,或者代码示例
  • 对不起,我已经编辑了帖子
  • 我尝试了很多方法,即使在 CSS 中使用剪辑路径也无济于事。 play.nativescript.org/?template=play-vue&id=36fP8N

标签: nativescript nativescript-vue


【解决方案1】:

另一种方法是使用 Textfield 并将其设置为圆角。然后像这样添加搜索方法。

<TextField backgroundColor="white" paddingLeft="20" borderRadius="20" borderWith="3" class="input-search" [(ngModel)]="searchValue" width="80%" (submit)="onSubmit($event)" (textChange)="onTextChanged($event)" height="40" fontSize="14" hint="Search">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多