Files
smart_storage_app/components/Search/index.vue

87 lines
1.6 KiB
Vue
Raw Permalink Normal View History

2025-06-30 10:21:25 +08:00
<template>
<view class="search">
<image src="/static/aidex/images/search.png" class="filterImg"></image>
2025-07-01 16:59:10 +08:00
<u-input v-model="dec" style="width: 100%" type="text" :placeholder="placeholder" :clearable="false" @blur="blur" />
2025-06-30 10:21:25 +08:00
<view class="shaixuan" @click="open" id="search">
2025-07-01 16:59:10 +08:00
<text style="white-space: nowrap">{{ $t('homePage.alarm.sift') }}</text>
<u-icon name="arrow-right" color="#009458!important" size="30"></u-icon>
2025-06-30 10:21:25 +08:00
</view>
</view>
</template>
<script>
export default {
props: {
placeholder: {
type: String,
default: "请输入告警内容筛选",
},
},
2025-07-01 16:59:10 +08:00
data () {
2025-06-30 10:21:25 +08:00
return {
dec: "",
value1: 1,
value2: 2,
show_: false,
};
},
methods: {
2025-07-01 16:59:10 +08:00
open () {
2025-06-30 10:21:25 +08:00
this.show_ = true;
this.$emit("custom");
},
2025-07-01 16:59:10 +08:00
blur () {
2025-06-30 10:21:25 +08:00
this.$emit("blur", this.dec);
},
},
};
</script>
<style lang="scss" scoped>
2025-07-01 16:59:10 +08:00
.filterImg {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
margin-bottom: 5rpx;
}
2025-06-30 10:21:25 +08:00
.search {
background-color: #ffffff;
width: 100%;
height: 80rpx;
border-radius: 10rpx;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 20rpx;
padding-right: 20rpx;
position: relative;
.shaixuan {
white-space: nowrap;
display: flex;
// float: right;
// display: flex;
// flex:1;
// justify-content:flex-end;
align-items: center;
2025-07-01 16:59:10 +08:00
color: #009458;
2025-06-30 10:21:25 +08:00
}
.proper {
position: absolute;
left: 0;
right: 0;
top: 80rpx;
height: 500rpx;
background-color: red;
}
}
::v-deep .u-dropdown__content {
position: fixed;
}
</style>