Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-22 19:54:12 +08:00
parent e2d0a0051d
commit 6e9d474bbe
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 18 additions and 3 deletions

View file

@ -287,9 +287,15 @@ func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, itemID s
for _, asset := range value.MAsset {
switch asset.Type {
case AssetTypeFile:
if filterTextContent(filter.Operator, asset.Name, filter.Value.MAsset[0].Content) ||
filterTextContent(filter.Operator, asset.Content, filter.Value.MAsset[0].Content) {
return false
if "" != strings.TrimSpace(asset.Name) {
if filterTextContent(filter.Operator, asset.Name, filter.Value.MAsset[0].Content) {
return false
}
}
if "" != strings.TrimSpace(asset.Content) {
if filterTextContent(filter.Operator, asset.Content, filter.Value.MAsset[0].Content) {
return false
}
}
case AssetTypeImage:
if filterTextContent(filter.Operator, asset.Content, filter.Value.MAsset[0].Content) {