ECMAScript.TDesign 0.28.0

dotnet add package ECMAScript.TDesign --version 0.28.0
                    
NuGet\Install-Package ECMAScript.TDesign -Version 0.28.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ECMAScript.TDesign" Version="0.28.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ECMAScript.TDesign" Version="0.28.0" />
                    
Directory.Packages.props
<PackageReference Include="ECMAScript.TDesign" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ECMAScript.TDesign --version 0.28.0
                    
#r "nuget: ECMAScript.TDesign, 0.28.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ECMAScript.TDesign@0.28.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ECMAScript.TDesign&version=0.28.0
                    
Install as a Cake Addin
#tool nuget:?package=ECMAScript.TDesign&version=0.28.0
                    
Install as a Cake Tool

ECMAScript.TDesign

定位:TDesign Vue Next 的强类型 C# host binding 与 Razor-to-Vue authoring 接口。

本包属于 JS resource library。发布包携带 tdesign-vue-next 1.20.5 的 manifest.json + dist/** 浏览器 ESM 和 CSS,许可证等附属文件由 manifest 显式声明;C# 程序 集只提供映射和 authoring contract。应用只需还原 NuGet 包;Jazor 会从本地包资源按 manifest 依赖物化 TDesign 与 Vue,不要求 node_modules、CDN 或额外的 Node.js 安装。消费方编写的 RazorVue 组件生成到消费程序集的 Jazor.Generated.ModuleCatalog

维护输入

绑定输入固定在 ../ECMAScript.Vue.Generator/upstream/tdesign-vue-next/1.20.5components.jsonbindings.jsoncontracts.json 分别记录可导出的组件、实际模块/export 与强类型 props 契约。没有当前 runtime export 的文档标签不是 binding 输入。

维护命令

以下命令只供包维护者更新锁定上游快照和验证生成结果;应用构建与发布不会执行它们:

dotnet run --project src/ECMAScript.Vue.Generator -- tdesign snapshot
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign bindings
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign components
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign snapshot --check
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign bindings --check
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign components --report
dotnet run --project src/ECMAScript.Vue.Generator -- tdesign components --check

tdesign components 是全覆盖门禁:只有每个已声明 props 都具备具体 C# 类型时才生成当前 118 个 runtime 组件。不能为了通过生成而使用 objectVueValue 或占位契约。

类型与产物边界

公开 authoring 类型使用 T* 命名,例如 TMenuValueTButtonThemeValueTComponents;根 host 保留 TDesign。字符串域使用 [String] enum,因此 TButtonThemeValue.Primary 会发射为 "primary",不会变成数值序号。

带类型参数的组件(例如 TInput<T>TForm<T>TTable<T>TPrimaryTable<T>)只公开泛型组件本身。生成器仍保留同名的默认闭式别名供程序集内部元数据使用, 但该别名是 internal,不会进入消费方 official Razor Source Generator 的组件发现范围;否则同名泛型 与非泛型组件会触发 Razor SDK 的歧义诊断。Razor 页面直接写显式类型参数(例如 <TInput T="string" ... />),C# 代码使用 TInput<string>,无需桥接组件或 object 转换。

已验证的 Razor 写法

以下语法已通过作者源码、official Razor Source Generator、render module、Deno runtime、隔离 Release NuGet consumer 和真实 Edge browser smoke。它证明的是 TDesign typed authoring 这一条 能力,不会扩大 Microsoft/Blazor 内置 UI、IJSRuntime 或 server-only service 的明确 Reject 边界。

<TForm FormData="EditorModel" Data="@FormData" OnSubmit="@Submit">
    <TFormItem LabelValue="Name" Name="name">
        <TInput T="string" @bind-Value="Name" @bind-Value:event="OnChange" />
    </TFormItem>
</TForm>

<TRadioGroup T="string" @bind-Value="Stage" @bind-Value:event="OnChange">
    <TRadioButton T="string" Value="@("draft")">Draft</TRadioButton>
</TRadioGroup>

TForm 使用上游实际的泛型参数名 FormData,而不是统一的 T。当泛型参数的值是静态字符串时, 使用带类型上下文的 Razor 表达式,例如 Value="@("draft")";不需要 cast 或 From(...)

同一个 Vue prop 同时有值分支和 slot 分支时,binding 以稳定后缀区分,二者不能在同一组件实例上 同时设置:

<TDialog ConfirmBtnValue="@("Publish")" OnConfirm="@Confirm">
    <BodyContent>Review release</BodyContent>
</TDialog>

<TDialog ConfirmBtnValue="@ConfirmButton" />

<TDialog>
    <ConfirmBtnContent>Publish</ConfirmBtnContent>
</TDialog>

<TTable T="Row" Data="@Rows" RowKey="Id" LoadingValue="@IsLoading">
    <LoadingContent>Loading</LoadingContent>
    <EmptyContent>No rows</EmptyContent>
</TTable>

常见命名为 XxxValue(JS prop 的非 fragment 分支)和 XxxContent(同一 prop 的 named slot)。 TTable<T>TPrimaryTable<T>RowKey[EditorRequired];省略它会由 official Razor Source Generator 报告 RZ2012,不会等到 RazorVue runtime 才失败。

Razor Source Generator 集成、render-function lowering 和产物物化分别属于 Jazor.VueJazor.RazorVueJazor.Emit。本包只定义 host binding 与组件契约。

相关文档

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.28.0 0 9/2/2026
0.27.0 0 9/2/2026
0.26.3 57 8/31/2026
0.26.1 62 8/31/2026
0.26.0 50 8/31/2026
0.25.0 60 8/28/2026
0.24.0 65 8/27/2026
0.23.0 58 8/26/2026
0.22.0 77 8/25/2026
0.21.0 88 8/25/2026
0.20.0 86 8/24/2026
0.17.0 79 8/19/2026
0.16.3 90 8/18/2026
0.16.2 99 8/17/2026
0.16.1 95 8/17/2026
0.16.0 88 8/16/2026
0.15.0 92 8/15/2026
0.14.0 93 8/14/2026
0.13.0 92 8/12/2026
Loading failed