Vue.js Vue单击两个输入一个按钮
我想在单击按钮时选择一个新值,但我不能Vue.js Vue单击两个输入一个按钮,vue.js,Vue.js,我想在单击按钮时选择一个新值,但我不能 <div class="col-lg-12 col-sm-6 col-4" style="margin-top:5px;"> <p style="margin-bottom:0rem;" > Цена</p> <label> <input id
<div class="col-lg-12 col-sm-6 col-4" style="margin-top:5px;">
<p style="margin-bottom:0rem;" > Цена</p>
<label>
<input id="PriceRangeMin" type="number" :value='text' >
-
<input id="PriceRangeMax" placeholder="до" type="number" :value='text1'>
</label>
<button id="PriceRangeMin" type="submit" style="margin-left:30px;" @click='textcon()'>Применить</button>
</div>
ааа
-
Применить
我的剧本
<script>
export default {
name: 'Applesmartphone',
data () {
return {
text:[],
text1:[]
}
},
methods: {
textcon(){
console.log(text)
console.log(text1)
}
}
}
导出默认值{
名称:'Applesmartphone',
数据(){
返回{
案文:[],
正文1:[]
}
},
方法:{
textcon(){
console.log(文本)
console.log(text1)
}
}
}
您好,我想在单击按钮时选择一个新值,但我无法。使用v-model将输入绑定到属性,如:
input id="PriceRangeMin" type="number" v-model='text' >
然后使用此
访问方法内的属性:
textcon(){
console.log(this.text)
console.log(this.text1)
}