src/ZKEACMS.Article/Models/ArticleListWidget.cs
(完整代码) 1KB/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using Easy;
using Easy.Constant;
using Easy.Extend;
using Easy.MetaData;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.IO;
using System.Linq;
using ZKEACMS.Article.Service;
using ZKEACMS.MetaData;
using ZKEACMS.Widget;
using ZKEACMS.Extend;
using Easy.RepositoryPattern;
namespace ZKEACMS.Article.Models
{
[DataTable("ArticleListWidget")]
public class ArticleListWidget : BasicWidget
{
public int ArticleTypeID { get; set; }
public string DetailPageUrl { get; set; }
public bool IsPageable { get; set; }
public int? PageSize { get; set; }
}
class ArticleListWidgetMeta : WidgetMetaData<ArticleListWidget>
{
protected override void ViewConfigure()
{
base.ViewConfigure();
ViewConfig(m => m.ArticleTypeID).AsDropDownList().Order(NextOrder()).SetTemplate("ArticleTypeTree").Required();
ViewConfig(m => m.DetailPageUrl).AsTextBox().Order(NextOrder()).PageSelector().InnerUrl();
ViewConfig(m => m.IsPageable).AsCheckBox().Order(NextOrder());
ViewConfig(m => m.PageSize).AsTextBox().Order(NextOrder()).Range(1, 50);
ViewConfig(m => m.PartialView).AsDropDownList().Order(NextOrder()).DataSource(SourceType.Dictionary).AsWidgetTemplateChooser();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。