mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
support modelsParams
This commit is contained in:
parent
d02bd49231
commit
617393de78
@ -152,9 +152,13 @@ export default (props) => {
|
|||||||
let result = null
|
let result = null
|
||||||
|
|
||||||
if (typeof props.model === "function") {
|
if (typeof props.model === "function") {
|
||||||
result = await props.model(value)
|
result = await props.model(value, {
|
||||||
|
...props.modelParams,
|
||||||
|
limit_per_section: app.isMobile ? 3 : 5
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
result = await SearchModel.search(value, {
|
result = await SearchModel.search(value, {
|
||||||
|
...props.modelParams,
|
||||||
limit_per_section: app.isMobile ? 3 : 5
|
limit_per_section: app.isMobile ? 3 : 5
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user