feat:Add 'module_assetlist' cbs (#786)
# PR Checklist - [ ] Have you checked if it works normally in all models? *Ignore this if it doesn't use models.* - [ ] Have you checked if it works normally in all web, local, and node hosted versions? If it doesn't, have you blocked it in those versions? - [ ] Have you added type definitions? # Description It would be convenient if there was a cbs like this when handling module assets. Thanks for your time.
This commit is contained in:
@@ -1544,6 +1544,17 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string
|
||||
}
|
||||
return '0'
|
||||
}
|
||||
case 'module_assetlist':{
|
||||
const module = getModules()?.find((f) => {
|
||||
return f.namespace === arra[1]
|
||||
})
|
||||
if(!module){
|
||||
return ''
|
||||
}
|
||||
return makeArray(module.assets?.map((f) => {
|
||||
return f[0]
|
||||
}))
|
||||
}
|
||||
case 'filter':{
|
||||
const array = parseArray(arra[1])
|
||||
const filterTypes = [
|
||||
|
||||
Reference in New Issue
Block a user