石广澎
2023-11-27 75aaca3a95314be8c384df18dba23c661dea742c
admin-web/src/components/mySearch/SearchItem.vue
@@ -16,8 +16,9 @@
      v-model="val"
      v-if="item.type === 'cascader'"
      :options="item.options"
      :props="item.optionsConfig.props||{ checkStrictly: true,value: 'id' }"
      :clearable="true"
      :props="item.optionsConfig.props||{ checkStrictly: true,emitPath: false,value: 'id' }"
      :show-all-levels="false"
      filterable
      style="width: 150px"
      @change="(v) => this.$emit('change', v)"
    >
@@ -27,7 +28,7 @@
      v-if="item.type === 'select'"
      :placeholder="item.placeholder || ''"
      v-model="val"
      show-search
      filterable
      :multiple="item.multiple || false"
      :collapse-tags="item.collapseTags || false"
      :clearable="true"
@@ -66,6 +67,7 @@
      type="year"
      :clearable="true"
      style="width: 150px"
      :value-format="item.format?item.format:'yyyy'"
      @change="(v) => panelChange(v, 'yyyy')"
    />
    <!--月选择器-->
@@ -75,6 +77,7 @@
      type="month"
      :clearable="true"
      style="width: 150px"
      :value-format="item.format?item.format:'yyyyMM'"
      @change="(v) => panelChange(v, 'yyyy-MM')"
    />
    <!--日选择器-->
@@ -84,6 +87,7 @@
      type="date"
      :clearable="true"
      style="width: 150px"
      :value-format="item.format?item.format:'yyyyMMdd'"
      @change="(v) => panelChange(v, 'yyyy-MM-dd')"
    />
    <!--日期带时间选择器-->
@@ -242,14 +246,7 @@
      }
    },
    panelChange(v, type) {
      var info = null
      if (v && this.item.type !== 'date-time-picker') {
        info = formatDates(v, type)
      } else {
        info = v
      }
      this.val = info
      this.$emit('change', info)
      this.$emit('change', v)
    },
    filterOption(input, option) {
      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;