input组件与text组件要怎么占满一行?

小程序 文章 2020-09-04 10:01 644 0 全屏看文

AI助手支持GPT4.0

input组件与text组件要怎么占满一行?How do input components and text components occupy one line?

input组件与text组件要怎么占满一行?

text和input放在view里这样就能实现同行,在末尾还有一小段空白的没有占用到,可是我想让input长一点,能占满剩下的位置,要怎么办,求大神解答

view class="flex-wrpstyle="flex-direction:row;">

  <text style="background:#A1A1A1;">目 的 地: text> 

  <input type="textstyle="background:#A1A1A1;"  > input>

   view>

Text and input can be put in view so as to realize the same trade. There is a small blank at the end that is not occupied. However, I want to make the input longer and occupy the rest of the position. What should I do? I want to ask the big God to answer the question view class = "flex WRP" style = "flex"- direction:row; "> < text style = Background: #a1a1a1;" > destination: text > < input type: "text" style: "background:" a1a1a1a1; " >input> view>

回答:

Distance:

直接设置width

佐手写爱:

将 app.json 中的 "style": "v2" 去除,小程序的新版基础组件强行加上了许多样式,难以去除

微喵网络:

css

-EOF-

AI助手支持GPT4.0