我想在 vuetify 中创建一个文本字段
P粉323224129
P粉323224129 2024-02-26 11:45:08
0
2
418

https://i.stack.imgur.com/zbCfI.png

我想在vuetify中创建一个文本字段,但是按钮不能这样制作?还有高度,但它不能改变吗?我尝试了多次改变高度但不起作用

我已经有了 css,但很难在 vuetify 上使用

.parent-box{
  width:fit-content;
  background:#26376B;
}
.text-box{
  border:1px solid #CACACA;
  padding:5px 10px;
  min-width:300px;
}
.btn{
  padding:5px 20px;
  width:100px;
  color:#fff;
  border:none;
  background-color:#26376B;
  cursor:pointer;
}
.common{
  outline:none;
  border-radius:50px;
}

<div class="parent-box common">
  <input class="text-box common" type="text" placeholder="Chassis Number">
  <button class="btn common">Check</button>
</div>

P粉323224129
P粉323224129

全部回复(2)
P粉482108310

类似的事情可以这样完成:

...

  
    
    
  


...

看看这个CodePen

许多样式都可以通过 props 在 vuetify 中自定义。但默认情况下,vuetify 受到 Material Design 的启发,与您的示例相反,自定义默认样式并不那么容易。对于您的情况,在使用此库之前应用一些 vuetify 主题可能会更好。

P粉819937486

问题陈述:想要在 Vuetify 中创建带有按钮的文本字段。

解决方案:

HTML:



  
  
    
  
       
        
    
      
  
  

Vue.js:

new Vue({
  el: "#app",
    vuetify: new Vuetify(),
  data: {
    input: ''
  },
  methods: {
    show(){
      alert(this.input)
    }
  }
})

输出:

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!