跳到正文
Skillpedia
网站与界面(前端)48k · #5177

markstream-vue2

它能做什么

这个工具可以帮你把 “markstream-vue2” 组件集成到使用 Vue 2 的项目中。它会确保组件与具体的 Vue 2 版本正常配合,并处理好其中的技术细节,让你省心。

适用场景

  • ✓当你使用 Vue 2.6 或 2.7,并且需要一个组件来显示带格式的文本(比如 Markdown)时。
  • ✓当你希望文字像聊天一样逐步出现在屏幕上时。
  • ✓如果你需要确保与较旧的 Vue 2 版本兼容时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-vue2/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-vue2/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我要怎样在 Vue 2 项目中设置 markstream-vue2?”

每周 5 个新技能,1 分钟读完。

工作原理

工具会检查你的 Vue 2 版本,并添加必要的依赖。它会配置组件来显示文本,并提供打字效果或逐步出现的动画选项。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Markstream Vue 2

Overview

Handle Vue 2.6/2.7 compatibility decisions that the generic installer cannot resolve safely.

When to Use

Use for Vue 2 integration when no bundler-specific edge case dominates. Use markstream-vue2-cli for Vue CLI/Webpack 4 and markstream-vue2-vite for Vite worker imports.

Workflow

Inspect the existing package manager, installed package version and project conventions. A requested scoped integration already authorizes routine source/dependency edits; seek approval only for a material scope expansion or unresolved beta/alpha adoption decision.

  1. Confirm Vue 2.6 or 2.7 and install markstream-vue2.
  2. Add @vue/composition-api only for Vue 2.6 code that uses Composition API patterns; Vue 2.7 has built-in support.
  3. Import markstream-vue2/index.css after resets.
  4. Start with <MarkdownRender :content="markdown" /> and smooth streaming auto.
  5. For live chat disable fade and opt into the cursor; on completion set final, disable pacing/cursor, and enable fade only if desired.
  6. Use nodes only when another layer owns parsing. Use scoped mappings for overrides.
  7. Keep HTML safe and Mermaid strict; validate with the smallest build or dev command.

Example

<script>
import MarkdownRender from 'markstream-vue2'
import 'markstream-vue2/index.css'

export default {
  components: { MarkdownRender },
  props: { content: String, done: Boolean },
}
</script>

<template>
  <MarkdownRender
    :content="content"
    :final="done"
    :fade="done"
    :typewriter="!done"
  />
</template>

Limitations

  • Vue 2.6 and 2.7 have different Composition API requirements.
  • Legacy bundlers require the dedicated specializations.
  • Optional modern peers may not support every Vue 2 toolchain.

Security & Safety Notes

Review dependency and compatibility changes. Do not relax rendering safety for untrusted content.

Verify props, export paths and peer ranges against the installed package, not a mutable upstream main. Test partial and completed streams, malformed/untrusted Markdown, links and image URLs, cancellation and reduced motion. Safe HTML and strict diagrams reduce exposure but do not alone enforce URL/network privacy or application component permissions.

Vue 2 is end-of-life; preserve a requested legacy integration and document its maintenance/support decision rather than silently upgrading the whole application. Prefer reviewed locally bundled workers over mutable CDN code where feasible.

常见问题

什么是 “Composition API”?

它是 Vue.js 中一种更现代的代码组织方式。在 Vue 2.6 中,你可能需要额外安装一个包才能使用;Vue 2.7 则内置了支持。

“streaming state” 是什么意思?

意思是文本可以一小块一小块地显示,就像正在被打字或实时加载一样,而不是一次全部出现。

这个工具能用于任何 Vue 版本吗?

不能。这个工具专门针对 Vue 2.6 和 2.7。对于其他版本或构建工具(比如 Vite),这个工具有对应的其他版本。

详情

作者的原始描述

Integrate markstream-vue2 into Vue 2.6 or 2.7 with correct Composition API decisions, CSS, streaming state, optional peers, and scoped overrides.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5177
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能