ECMAScript.VueDraggable 1.0.0-preview.9

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

ECMAScript.VueDraggable

vue-draggable-plus 的 C# 绑定,作为 Jazor 的 JS resource library 交付:包内锁定上游版本, manifest.json(schema 2)和 inventory.json 记录 npm package、入口、完整性与许可证元数据。

Strongly typed C# bindings for vue-draggable-plus, shipped as a Jazor JS resource library with a locked upstream npm version. Runtime files remain in npm; metadata describes the shared component and composable entry for the generated jazor project.

上游锁定 Upstream lock

项 值
npm 包 vue-draggable-plus
版本 见 manifest.json / inventory.json
许可证 MIT(licenses/vue-draggable-plus-LICENSE)
入口 vue-draggable-plus(组件、composable、指令和 Sortable 生命周期共享一个 ESM 运行时)
peer 依赖 vue(由 ECMAScript.Vue 资源库提供)

首期范围 First slice

  • 组合式函数:useDraggable(element, list, options),返回 start/pause/resume/destroy
  • 组件代理:VueDraggableList(ModelValue、Tag、Options、默认插槽与透传属性)
  • 选项:SortableJS 常用集(Animation、ChosenClass、GhostClass、Group、Handle、Filter、Direction、Disabled、Sort 等)与 12 个 on* 事件回调

VueDraggableList<TItem> 按 Transform.Component 封装上游 VueDraggable 组件,VueDraggable.UseDraggable 映射上游 useDraggable composable。两者使用同一个 vue-draggable-plus 入口;该库的拖拽核心、组件生命周期、指令和 composable 共享状态,因此完整运行时闭包是组件绑定的稳定交付单元。

未绑定:vDraggable 指令(Razor 指令编排尚未建模)、closest/save/toArray/option 等 Sortable 实例方法。需要时按需扩充。

SSR 边界 SSR boundary

拖拽依赖真实 DOM 与指针事件。useDraggable、VueDraggableList 与全部事件回调必须在浏览器生命周期内使用;SSR 期间不得创建 Sortable 实例,也不提供服务器端等价实现。

使用示例 Authoring

<VueDraggableList ModelValue="@items" Options="@new VueDraggableOptions { Animation = 150 }">
    <div data-key="@context">@context</div>
</VueDraggableList>

再生成 Regeneration

dotnet run --file scripts/csharp/generate-vue-draggable.cs -- --version <upstream-version>
dotnet run --file scripts/csharp/generate-vue-draggable.cs -- --source .tmp/p3c --version <upstream-version>

生成器在 vendor 时执行浏览器安全闸门:任何在模块顶层引用 process.env 的产物都会导致生成失败(这类 bundler 变体在浏览器导入即崩溃)。

测试 Tests

src/ECMAScript.VueDraggable.Test 覆盖 manifest/inventory 元数据、npm integrity、上游导出 drift、组件代理契约与编译器 emission。

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
1.0.0-preview.9 49 10/10/2026
1.0.0-preview.8 46 10/9/2026
1.0.0-preview.7 59 9/29/2026
1.0.0-preview.6 52 9/28/2026
1.0.0-preview.5 55 9/28/2026