You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
volunteer-pc/src/views/components/myInput/index.vue

65 lines
1.2 KiB

<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-20 11:28:27
* @LastEditors: JC9527
* @LastEditTime: 2023-09-22 14:12:58
-->
2 years ago
<template>
<div class="my-inputs">
<el-input v-model="input" :placeholder="placeholder" clearable @change="changeValue"></el-input>
2 years ago
<div class="btn" @click="inputValue"><i class="el-icon-search"></i></div>
</div>
</template>
<script>
export default {
data() {
return {
input:'',
}
},
props:{
placeholder:{
type:String,
default:'请输入内容'
}
},
2 years ago
methods:{
inputValue(){
this.$emit('changeInput',this.input)
},
changeValue(){
this.$emit('changeValue',this.input)
}
2 years ago
},
}
</script>
<style lang="scss" scoped>
.my-inputs {
display: flex;
::v-deep .el-input {
width: 515px;
height: 40px;
2 years ago
.el-input__inner {
width: 100%;
height: 100%;
border-right: none;
border-radius: 4px 0 0 4px;
border: 1px solid #DBD7D7;
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 52px;
height: 40px;
2 years ago
border-radius: 0 4px 4px 0;
background-color: #F8414D;
cursor: pointer;
color: #fff;
}
}
</style>