12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view class="tmp-box">
- <view class='filterBox'>
- <view class='filter-input'>
- <text style="color: #b8b8b8;" class="iconfont icon-sousuo filterImg"/>
- <input class="text" type='text' v-model="inputVal" confirm-type="搜索" placeholder='搜索'></input>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- inputVal: "",
- };
- },
- watch:{
- inputVal:{
- handler(newVal, objVal) {
- this.handleFllter(newVal);
- },
- }
- },
- methods: {
- handleFllter(e) {
- //console.log(e)
- this.$emit("confirm", e)
- },
- clears(){
- console.log(this.inputVal)
- this.inputVal=""
- console.log('清除了内容')
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .filterBox {
- padding: 15rpx 32rpx;
- background-color: #fff;
- .filter-input {
- height: 80rpx;
- background-color: #eeeff0;
- border-radius: 40rpx;
- display: flex;
- align-items: center;
-
- padding-left: 40rpx;
- .filterImg {
- width: 32rpx;
- height: 32rpx;
- margin-right: 20rpx;
- margin-bottom: 5rpx;
- }
- .filterImgs {
- width: 32rpx;
- height: 32rpx;
-
- }
- .text {
- width: 84%;
- background-color: #eeeff0;
- font-size: 32rpx;
- color: #000;
- }
- }
- }
- @import url("../css/icon.css");
- </style>
|