分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-16 5884c9023393061afbe6d3d6e709e53e672ddde8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
  <div>
    <Select
      clearable
      v-if="singleSearch.type=='drop'||singleSearch.type=='dropList'||
              singleSearch.type=='select'||singleSearch.type=='selectList'"
      v-model="searchFormFileds[singleSearch.field]"
      :placeholder="'请选择'+singleSearch.title"
    >
      <Option
        v-for="(kv,kvIndex) in singleSearch.data"
        :key="kvIndex"
        :value="kv.key||''"
      >{{kv.value}}</Option>
    </Select>
 
    <DatePicker
      clearable
      v-else-if="singleSearch.type=='date'||singleSearch.type=='datetime'"
      :type="singleSearch.type+'range'"
      :format="singleSearch.type=='date'? 'yyyy-MM-dd':'yyyy-MM-dd HH:mm:ss'"
      :placeholder="singleSearch.title"
      v-model="searchFormFileds[singleSearch.field]"
    ></DatePicker>
 
    <Input
      clearable
      v-else
      v-model="searchFormFileds[singleSearch.field]"
      :placeholder="singleSearch.title"
      @on-keypress="tiggerPress"
    />
  </div>
</template>
<script>
export default {
  props: {
    singleSearch: {
      type: Object,
      default: {}
    },
    searchFormFileds: {
      type: Object,
      default: {}
    },
    tiggerPress: {
      type: Function,
      default: () => {}
    }
  }
};
</script>