Known是基于C#和Blazor开发的前后端分离快速开发框架,开箱即用,跨平台,一处代码,多处运行。
如果对您有帮助,点击⭐Star⭐关注 ,感谢支持开源!
1. 用户管理
2. Server模式
PostWithFileAsync
//上传附件
public Task<Result> UploadFilesAsync(object data) => Context.PostWithFileAsync("File/UploadFiles", data);
3. Picker
table.Field<Picker>("选择", "Picker1")
.Set(f => f.TextField, "PickerName1")
.Set(f => f.Pick, new XXXPicker())
.Build();
4. Toolbar
//示例1
private void OnAction(ButtonInfo info)
{
if (info.Id == "Open")
{
toolbar?.SetItemName("Open", info.Name == "打开" ? "关闭" : "打开");
}
}
//示例2
public void Enable()
{
var item = Tools?.FirstOrDefault(t => t.Id == "Enable");
if (item != null)
{
var name = item.Name == "启用" ? "禁用" : "启用";
var icon = item.Name == "启用" ? "fa fa-times-circle-o" : "fa fa-check-circle-o";
toolbar?.SetItemName(item.Id, name, icon);
}
}
5. Database
db.SaveDatas(new List<TbTest> { test1, test2 });