Repository navigation
Jazor 2.3.0
中文 | English
新增功能
- 在同一个 Vite 项目中双向引用
.vue和.jazor。jolt library可生成供 Vue SFC 和 TSX 应用安装的 ESM 组件包,包含 TypeScript 声明、组件子路径和 scoped CSS。by @devhxj - 用
jolt bundle --ssr <server-entry>构建混合应用的客户端与服务端资源。ASP.NET Core 按请求渲染,并把预取状态和 Teleport 内容交给客户端。.jazor支持Teleport、Transition、类型化动态组件和可选的 Vue Router@page/@layout。by @devhxj - 直接调用项目锁定的 npm 函数、读取标量常量,并在每个组件实例的
[Setup]中使用 Vue composable。编辑器支持参数检查、补全和到依赖声明的导航。by @devhxj - 原生表单和 npm 命名模型支持双向绑定。
.jazor支持@key、类型化 DOM 事件、事件修饰符,以及:get/:set和:after绑定。by @devhxj - 模板支持 Razor 局部声明、
@for、@switch、内联RenderFragment<T>、多个受约束的泛型参数、具名子内容和目录级_Imports.jazor。本地组件支持 Vue 命名模型、[Expose]、@attributes和单目标@ref。by @devhxj
体验优化
- 混合项目修改本地 TypeScript 声明时,
jolt dev会重新检查调用方。编辑器诊断跟踪 Vue 组件引用的未保存.jazor参数类型,关闭缓冲区时恢复磁盘版本。仅修改 SFC 模板文字且公开契约与定义位置未变时,连续保存的热更新更快。by @devhxj
迁移说明
jolt dev默认端口从5173改为15658。更新固定使用旧地址的代理、测试或启动配置,或传入--port 5173保持原地址。by @devhxj- 未支持的 Razor 指令现在产生源码诊断。已有
@page的项目可在package.json启用jolt.router并将生成的路由记录传给 Vue Router,也可以移除指令并在应用中声明路由。by @devhxj
New Features
- Import
.vueand.jazorcomponents from each other in a Vite project.jolt librarybuilds an installable ESM component package with TypeScript declarations, component subpaths and scoped CSS for Vue SFC and TSX consumers. by @devhxj - Build client and server assets for mixed apps with
jolt bundle --ssr <server-entry>. ASP.NET Core renders each request and passes prefetched state and teleports to the client. Jolt components supportTeleport,Transition, typed dynamic components and opt-in Vue Router@pageand@layoutdirectives. by @devhxj - Call functions and read scalar constants from the npm dependencies locked by your project. Use Vue composables in per-instance
[Setup]methods. The editor checks arguments, offers completions and navigates to dependency declarations. by @devhxj - Bind native form controls and named npm models in both directions. Jolt supports
@key, typed DOM events, event modifiers, and:get/:setand:afterbindings. by @devhxj - Templates support Razor locals,
@for,@switch, inlineRenderFragment<T>, multiple constrained generic parameters, named child content and directory-level_Imports.jazor. Local components support Vue named models,[Expose],@attributesand single-target@ref. by @devhxj
Improvements
jolt devrechecks callers when local TypeScript declarations change. Editor diagnostics follow unsaved Jolt prop types referenced by Vue components and revert to disk when the buffer closes. Consecutive saves update faster when SFC template text edits preserve the public contract and definition locations. by @devhxj
Migration
jolt devnow defaults to port15658, previously5173. Update proxies, tests or launch configurations tied to the old address, or pass--port 5173to retain it. by @devhxj- Unsupported Razor directives now report a source diagnostic. For existing
@pagedirectives, enablejolt.routerinpackage.jsonand pass the generated route records to Vue Router, or remove the directives and declare routes in the app. by @devhxj