riku
2025-09-18 c1d2051abc8ca88cd07f0d7c56c0dbf8165d5c33
src/views/fysp/config/components/CompInfoSearch.vue
ÎļþÃû´Ó src/views/fysp/config/device/CompInfoSearch.vue ÐÞ¸Ä
@@ -15,7 +15,7 @@
        label=""
        :placeholder="placeholder"
        v-model:value="searchText"
        width="200px"
        :width="searchTextWidth"
      ></FYOptionText>
    </template>
  </FYSearchBar>
@@ -27,6 +27,7 @@
        </div>
      </el-space>
    </el-scrollbar>
    <el-empty v-else description="无记录" />
  </div>
  <el-pagination
    v-if="pageShow && dataList.length > 0"
@@ -64,6 +65,10 @@
      type: String,
      default: '输入关键字检索'
    },
    searchTextWidth: {
      type: String,
      default: '200px'
    },
    // æ˜¯å¦æ˜¾ç¤ºåˆ†é¡µ
    pageShow: {
      type: Boolean,
@@ -75,7 +80,9 @@
      default: () => {
        return [10, 20, 50, 100];
      }
    }
    },
    // é»˜è®¤æœç´¢æ–‡æœ¬
    defaultText: String
  },
  emits: ['search', 'update:modelValue'],
  data() {
@@ -86,7 +93,19 @@
      loading: false
    };
  },
  watch: {},
  watch: {
    defaultText: {
      handler(newVal) {
        if (newVal) {
          this.searchText = newVal;
          setTimeout(() => {
            this.search();
          }, 500);
        }
      },
      immediate: true
    }
  },
  methods: {
    search() {
      this.loading = true;