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> Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
类似的事情可以这样完成:
看看这个CodePen
许多样式都可以通过 props 在 vuetify 中自定义。但默认情况下,vuetify 受到 Material Design 的启发,与您的示例相反,自定义默认样式并不那么容易。对于您的情况,在使用此库之前应用一些 vuetify 主题可能会更好。
问题陈述:想要在 Vuetify 中创建带有按钮的文本字段。
解决方案:
HTML:
Vue.js:
new Vue({ el: "#app", vuetify: new Vuetify(), data: { input: '' }, methods: { show(){ alert(this.input) } } })输出: