ECMAScript.Vue 2.1.0-preview.6

This is a prerelease version of ECMAScript.Vue.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package ECMAScript.Vue --version 2.1.0-preview.6
                    
NuGet\Install-Package ECMAScript.Vue -Version 2.1.0-preview.6
                    
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.Vue" Version="2.1.0-preview.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ECMAScript.Vue" Version="2.1.0-preview.6" />
                    
Directory.Packages.props
<PackageReference Include="ECMAScript.Vue" />
                    
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.Vue --version 2.1.0-preview.6
                    
#r "nuget: ECMAScript.Vue, 2.1.0-preview.6"
                    
#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.Vue@2.1.0-preview.6
                    
#: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.Vue&version=2.1.0-preview.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ECMAScript.Vue&version=2.1.0-preview.6&prerelease
                    
Install as a Cake Tool

ECMAScript.Vue

定位:独立的 Vue 3 强类型 C# binding,也是框架无关 Jazor 核心上的第一个外部库映射样例。

该项目通过通用 C# 类型系统和 [ECMAScript]、[Description]、[ECMAScriptInline] 等映射表达 Vue 3 API,不在 compiler 中硬编码 ECMAScript.Vue 专用规则。

代码结构

  • Vue.cs:模块映射特性与顶层委托/handle 类型。
  • Api/Vue.Api.cs:App、component、custom element、VNode utility 等 API。
  • Api/Vue.Api.Render.cs:BindThis(...) 与 H(...) overload。
  • Api/Vue.Api.Reactivity.cs:reactive、ref、computed、watch 等响应式 API。
  • Api/Vue.Api.Composition.cs:composition API。
  • Api/Vue.Api.Lifecycle.cs:生命周期、scope 与 hook API。
  • Types/Vue.Types.*.cs:嵌套 runtime shape 与 options contract。

映射与 authoring 规则

  • 默认保留 Vue 官方 API 词根,只做 C# 命名投影;runtime ABI 差异通过显式 Description("@#...") 或 ECMAScriptName 声明。
  • props、emits、slots 和组件上下文必须以明确 C# contract 表示,避免 object / object? 兜底。
  • 类型擦除不是降低 authoring contract 的理由。已能由 assignment、implicit conversion、overload 或 native union 表达的场景,不新增弱 factory。
  • 组件/生命周期/响应式 API 只定义 host binding;Razor-to-Vue 的组件绑定与 render-function framing 不属于本项目。

交付边界

Vue browser runtime 由 manifest.json 记录的 vue npm package 提供。Emit 在 MSBuild 阶段生成 标准 jazor/package.json,pnpm API 将 Vue 恢复到 jazor/node_modules,项目配置的 JavaScript 构建工具再按 Vue 的 exports 与 sideEffects 解析实际入口。ECMAScript.Vue 是 Vue API 的 binding/resource package,不复制上游 runtime 文件。

@vue/devtools-api 是 Vue Router、Pinia 和可选 ECMAScript.Vue.Devtools 的本地 logical import。它与浏览器安装的 Vue Devtools 扩展通过官方插件桥接协作;仅在需要自定义 inspector、timeline、component hook、custom tab 或 command 时引用 ECMAScript.Vue.Devtools,普通应用和 Pinia 自动注册不需要直接调用它。

相关文档

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.
  • net11.0

    • Jazor (>= 2.1.0-preview.6)

NuGet packages (19)

Showing the top 5 NuGet packages that depend on ECMAScript.Vue:

Package Downloads
Jazor.Vue

Opt-in Razor-to-Vue SDK integration for official Razor Source Generator output. Generated components use Jazor.Generated.ModuleCatalog and Vue runtime resources use package metadata, restored npm/JSR packages, and explicitly declared embedded bridge packages.

ECMAScript.VueRoute

Vue Router 5 C# bindings backed by package metadata and the restored npm package.

ECMAScript.Pinia

Pinia 4 C# host bindings backed by package metadata and the restored npm package for Jazor applications.

ECMAScript.TDesign

TDesign Vue Next C# bindings and RazorVue contracts backed by package metadata and the restored npm package.

ECMAScript.Vuetify

Vuetify C# bindings and RazorVue component contracts backed by package metadata and the restored npm package.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0-preview.1 0 11/19/2026
2.1.0-preview.6 0 11/19/2026