src/SSCMS.Core/StlParser/StlElement/StlImage.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Collections.Specialized;
using System.Threading.Tasks;
using SSCMS.Core.StlParser.Attributes;
using SSCMS.Parse;
using SSCMS.Core.StlParser.Utility;
using SSCMS.Core.Utils;
using SSCMS.Enums;
using SSCMS.Models;
using SSCMS.Services;
using SSCMS.Utils;
namespace SSCMS.Core.StlParser.StlElement
{
[StlElement(Title = "显示图片", Description = "通过 stl:image 标签在模板中显示栏目或内容的图片")]
public static class StlImage
{
public const string ElementName = "stl:image";
[StlAttribute(Title = "栏目索引")]
private const string ChannelIndex = nameof(ChannelIndex);
[StlAttribute(Title = "栏目索引")]
private const string Index = nameof(Index);
[StlAttribute(Title = "栏目名称")]
private const string ChannelName = nameof(ChannelName);
[StlAttribute(Title = "显示父栏目")]
private const string Parent = nameof(Parent);
[StlAttribute(Title = "上级栏目的级别")]
private const string UpLevel = nameof(UpLevel);
[StlAttribute(Title = "从首页向下的栏目级别")]
private const string TopLevel = nameof(TopLevel);
[StlAttribute(Title = "所处上下文")]
private const string Context = nameof(Context);
[StlAttribute(Title = "指定存储图片的字段")]
private const string Type = nameof(Type);
[StlAttribute(Title = "显示字段存储的第几幅图片,默认为 1")]
private const string No = nameof(No);
[StlAttribute(Title = "是否清除 HTML 标签")]
private const string IsClearTags = nameof(IsClearTags);
[StlAttribute(Title = "如果是引用内容,是否获取所引用内容的值")]
private const string IsOriginal = nameof(IsOriginal);
[StlAttribute(Title = "显示的图片地址")]
private const string Src = nameof(Src);
[StlAttribute(Title = "当指定的图片不存在时显示的图片地址")]
private const string AltSrc = nameof(AltSrc);
public static async Task<object> ParseAsync(IParseManager parseManager)
{
var isGetPicUrlFromAttribute = false;
后面还有 226 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
