xiaoyi
2026-10-30 ae3ab0d376959cd8560e45dce24b6a8b1b39d162
src/components/form-create/components/use-api-select.tsx
@@ -2,8 +2,8 @@
import { defineComponent, onMounted, ref, useAttrs } from 'vue';
import { useUserStore } from '..\..\..\packages\stores\src';
import { isEmpty } from '..\..\..\packages\utils\src';
import { useUserStore } from '../../../packages/stores/src';
import { isEmpty } from '../../../packages/utils/src';
import {
  Checkbox,
@@ -161,9 +161,9 @@
          parseOptions0(data);
          return;
        }
        // 情况三:不是 yudao-vue-pro 标准返回
        // 情况三:不是标准返回
        console.warn(
          `接口[${props.url}] 返回结果不是 yudao-vue-pro 标准返回建议采用自定义解析函数处理`,
          `接口[${props.url}] 返回结果不是标准返回建议采用自定义解析函数处理`,
        );
      }
@@ -246,6 +246,19 @@
          ...restAttrs
        } = attrs;
        // 人员选择器(UserSelect)默认开启模糊搜索:支持按姓名输入过滤
        const searchProps =
          option.name === 'UserSelect'
            ? {
                showSearch: true,
                optionFilterProp: 'label',
                filterOption: (input: string, opt: any) =>
                  String(opt?.label ?? '')
                    .toLowerCase()
                    .includes(String(input).toLowerCase()),
              }
            : {};
        if (props.multiple) {
          // fix:多写此步是为了解决 multiple 属性问题
          return (
@@ -255,6 +268,7 @@
              mode="multiple"
              onUpdate:value={onUpdateModelValue as any}
              value={modelValue as any}
              {...searchProps}
              {...restAttrs}
              // TODO @xingyu remote 对等实现, 还是说没作用
              // remote={props.remote}
@@ -276,6 +290,7 @@
            loading={loading.value}
            onUpdate:value={onUpdateModelValue as any}
            value={modelValue as any}
            {...searchProps}
            {...restAttrs}
            // TODO: @xingyu remote 对等实现, 还是说没作用
            // remote={props.remote}