Browse Source

Merge branch 'cpq-dev' of wangfan/adweb3-web into master

chenpeiqing 2 months ago
parent
commit
e043fda462
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/views/adweb/theme/components/AdwebCreateSite.vue

+ 4 - 5
src/views/adweb/theme/components/AdwebCreateSite.vue

@@ -22,7 +22,7 @@
           </a-form-item>
           <a-form-item name="uid" label="用户名称">
             <a-select v-model:value="createSiteForm.uid" show-search :filter-option="filterOption" placeholder="请选择用户名称">
-              <a-select-option v-for="item in userList" :key="item.id" :value="item.realname"
+              <a-select-option v-for="item in userList" :key="item.id" :realname="item.realname"
                 >{{ item.realname }} => {{ item.username }}</a-select-option
               >
             </a-select>
@@ -122,13 +122,12 @@
   const ins = ref(0);
   // 用户搜索
   const filterOption = (input: string, option: any) => {
-    console.log(option, 'option ');
-    if (option.value == null) {
+    if (option.realname == null) {
       return false;
     }
 
-    console.log(input, option.value);
-    return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+    console.log(input, option.realname);
+    return option.realname.toLowerCase().indexOf(input.toLowerCase()) >= 0;
   };
 
   const { createMessage } = useMessage();