Browse Source

添加功能

xiaohaizhao 1 năm trước cách đây
mục cha
commit
890cdde8f5
1 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 10 5
      components/My_search.vue

+ 10 - 5
components/My_search.vue

@@ -1,12 +1,12 @@
 <template>
-    <view class="My_search">
+    <view class="My_search" :style="{ background: bgColor }">
         <slot name="left" />
-        <u-search v-model="value" :showAction="false" @search="onSearch" @custom="onSearch" @clear="onSearch"
+        <u-search v-model="value" :focus="focus" :showAction="false" @search="onSearch" @custom="onSearch" @clear="onSearch"
             :placeholder="placeholder" />
         <view v-if="isFilter" @click="startFilter" class="filtrate" hover-class="navigator-hover">
             <text class="iconfont icon-shaixuan" />筛选
         </view>
-        <My_filter ref="filter" :filter1="filter" @onConfirm="onConfirm" />
+        <My_filter ref="filter" :filter1="filter" :dateRange="dateRange" @onConfirm="onConfirm" />
     </view>
 </template>
 
@@ -34,10 +34,16 @@ export default {
             type: Array,
             default: () => []
         },
+        dateRange: Boolean,
         heightReduction: {
             type: Number,
             default: 0
-        }
+        },
+        bgColor: {
+            type: String,
+            default: '#052E5D'
+        },
+        focus: Boolean
     },
     data() {
         return {
@@ -69,7 +75,6 @@ export default {
     width: 100vw;
     height: 45px;
     padding: 8px 10px;
-    background: #052E5D;
     box-sizing: border-box;
 
     .filtrate {