| | |
| | | |
| | | 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, |
| | |
| | | parseOptions0(data); |
| | | return; |
| | | } |
| | | // 情况三:不是 yudao-vue-pro 标准返回 |
| | | // 情况三:不是标准返回 |
| | | console.warn( |
| | | `接口[${props.url}] 返回结果不是 yudao-vue-pro 标准返回建议采用自定义解析函数处理`, |
| | | `接口[${props.url}] 返回结果不是标准返回建议采用自定义解析函数处理`, |
| | | ); |
| | | } |
| | | |
| | |
| | | ...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 ( |
| | |
| | | mode="multiple" |
| | | onUpdate:value={onUpdateModelValue as any} |
| | | value={modelValue as any} |
| | | {...searchProps} |
| | | {...restAttrs} |
| | | // TODO @xingyu remote 对等实现, 还是说没作用 |
| | | // remote={props.remote} |
| | |
| | | loading={loading.value} |
| | | onUpdate:value={onUpdateModelValue as any} |
| | | value={modelValue as any} |
| | | {...searchProps} |
| | | {...restAttrs} |
| | | // TODO: @xingyu remote 对等实现, 还是说没作用 |
| | | // remote={props.remote} |