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

64 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></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: "",
};
2 years ago
},
props: {
placeholder: {
type: String,
default: "请输入关键字",
},
},
methods: {
inputValue() {
this.$emit("clickSearch", this.input);
2 years ago
},
},
};
2 years ago
</script>
<style lang="scss" scoped>
.my-inputs {
display: flex;
height: 35px;
margin-bottom: 15px;
2 years ago
::v-deep .el-input {
width: 515px;
height: 100%;
2 years ago
.el-input__inner {
width: 100%;
height: 100%;
border-right: none;
border-radius: 4px 0 0 4px;
2 years ago
// border: 1px solid #dbd7d7;
2 years ago
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 52px;
height: 100%;
2 years ago
border-radius: 0 4px 4px 0;
background-color: #f8414d;
2 years ago
cursor: pointer;
color: #fff;
}
}
</style>