mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: fix user_select_multi
This commit is contained in:
1 parent
8f4a63006a
commit
43c4866eb2
2 files changed
+4
-6
No files matched your search
@@ -32,7 +32,7 @@ export default class UserSelectAutoComplete<Multi extends boolean> extends AutoC
|
||||
}
|
||||
|
||||
value(): Multi extends true ? number[] : string {
|
||||
if (this.options.multi) return this.ref?.getSelectedItems().map((item) => item._id) ?? this.$dom.val();
|
||||
if (this.options.multi) return this.ref?.getSelectedItemKeys().map((i) => +i) ?? this.$dom.val();
|
||||
return this.ref?.getSelectedItems()[0] ?? null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user