Browse Source

fix(bugs): filterOption添加

tangning 3 years ago
parent
commit
686b8419cf
1 changed files with 10 additions and 2 deletions
  1. 10 2
      src/views/scenes/liveDrawer.vue

+ 10 - 2
src/views/scenes/liveDrawer.vue

@@ -42,7 +42,8 @@
             @search="handleSearch"
             showSearch
             placeholder="请选择场景链接"
-            :options="sceneNumOption.list"
+            :options="getOptions"
+            :filterOption="filterOption"
           />
         </template>
       </BasicForm>
@@ -95,6 +96,9 @@
         list: [],
         allList: [],
       });
+      const getOptions = computed(() => {
+        return sceneNumOption.list;
+      });
       interface AddressComponentType {
         city: string;
         district: string;
@@ -126,7 +130,9 @@
         id: '',
         introduceVideoCover: '',
       });
-
+      const filterOption = (input, option) => {
+        return option.sceneName.includes(input.toLowerCase());
+      };
       const defaultAddress = reactive({
         address: '山阴路688号恒隆广场B座1217',
         // address: '权晖花园21栋',
@@ -680,6 +686,8 @@
         isUpdate,
         handleChange,
         handleSearch,
+        getOptions,
+        filterOption,
       };
     },
   });