Skip to content

feat(vue): add v-model usage example - #360

Open
axiaowei wants to merge 1 commit into
floatboatai:mainfrom
axiaowei:feat/docs/vue3-v-model-example
Open

axiaowei wants to merge 1 commit into
floatboatai:mainfrom
axiaowei:feat/docs/vue3-v-model-example

Conversation

@axiaowei

Copy link
Copy Markdown

Summary / 摘要

为 @floatboat/nexus-vue 补充 v-model 双向绑定的使用示例,展示 <Editor /> 组件如何与外部状态同步 Markdown 内容。

Motivation / 背景与动机

  • Issue: N/A
  • Roadmap (docs/ROADMAP.md): P0 — Core API completeness
  • OpenSpec change: N/A

当前 README 的 Vue 3 示例仅展示了单向的 initial-value 用法,未体现 v-model 双向绑定能力。而 packages/vue/src/editor.ts 已实现 modelValue prop 与 update:modelValue 事件,缺少对应的使用示例。补充此示例有助于使用者理解受控模式的用法。

Changes / 变更内容

  • packages/vue:无代码改动
  • docs/examples/vue3-demo/App.vue:新增,Vue 3 v-model 完整示例
  • docs/examples/vue3-demo/README.md:新增,示例说明文档

Testing / 测试

  • 纯文档示例,不影响构建与测试
  • 已确认示例代码与 packages/vue/src/types.ts 中 EditorProps 的 modelValue / onChange 定义一致
  • 已在本地运行 pnpm dev:electron-demo,确认 <Editor /> 组件可用

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


P6018169 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants