vue动态路由测试

This commit is contained in:
陈淳
2022-09-08 18:18:34 +08:00
parent 49330536c7
commit 23dc82f042
5 changed files with 65 additions and 15 deletions

View File

@@ -8,10 +8,10 @@ namespace Yi.Framework.Common.Models
{
public interface ITreeModel<T>
{
public int id { get; set; }
public int parentId { get; set; }
public int sort { get; set; }
public int Id { get; set; }
public int ParentId { get; set; }
public int Sort { get; set; }
public IList<T> children { get; set; }
public IList<T> Children { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
public class VueRouterModel : ITreeModel<VueRouterModel>
{
public int Id { get; set; }
public int ParentId { get; set; }
public int Sort { get; set; }
public string Name { get; set; }
public string Path { get; set; }
public bool Hidden { get; set; }
public string Redirect { get; set; }
public string Component { get; set; }
public bool AlwaysShow { get; set; }
public Meta Meta { get; set; }
public IList<VueRouterModel> Children { get; set; }
}
public class Meta
{
public string Title { get; set; }
public string Icon { get; set; }
public string NoCache { get; set; }
public string link { get; set; }
}
}