127.0.
智能大石头 authored at 2024-11-20 00:19:29
580.00 B
Stardust
@model ValueTuple<IEntity, DataField>
@using NewLife;
@using NewLife.Cube
@using NewLife.Cube.ViewModels;
@using XCode;
@using XCode.Configuration;
@{
    var entity = Model.Item1;
    var field = Model.Item2;

    var value = entity[field.Name] as String;

    var accept = "application/zip,application/x-zip,application/x-zip-compressed";
}
@Html.TextBox(field.Name, entity[field.Name], new { @class = "form-control" })
@Html.TextBox(field.Name+"_attachment", entity[field.Name], new { type = "file", accept })
@if (!value.IsNullOrEmpty())
{
    <a href="@value">下载</a>
}