Yuebon.NetCore/Yuebon.Commons/Tree/TreeViewModel.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Yuebon.Commons.Tree
{
    /// <summary>
    /// 树形视图模型
    /// </summary>
    public class TreeViewModel
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public TreeViewModel()
        {
            this.nodes = new List<TreeViewModel>();
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="nodeId">j节点Id</param>
        /// <param name="pId">父节点Id</param>
        public TreeViewModel(string nodeId, string pId)
        {
            this.nodeId = nodeId;
            this.pid = pId;
            this.nodes = new List<TreeViewModel>();
        }
        /**
         * 生成一个节点
         * @param nodeId
         * @param pId
         * @param text
         * @param icon
         * @param href
         */
        public TreeViewModel(string nodeId, string pId, string text, string icon, string href)
        {
            this.nodeId = nodeId;
            this.pid = pId;
            this.text = text;
            this.icon = icon;
            this.href = href;
            this.nodes = new List<TreeViewModel>();
        }
        /// <summary>
        /// 树的节点Id,区别于数据库中保存的数据Id
        /// </summary>
        public string nodeId { get; set; }
        /// <summary>
        /// 树的父节点Id
        /// </summary>
        public string pid { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string text { get; set; }  
        /// <summary>
        /// 节点图标
        /// </summary>
        public string icon { get; set; }
        /// <summary>
        /// 点击节点触发的链接
后面还有 39 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。