Add plugin 快速处理数据 v1.0.0#279
Conversation
- init - 更新命令为“fast-data”
There was a problem hiding this comment.
Code Review
This pull request implements the 'fast-data' (快速处理数据) ZTools plugin, adding configuration files, a main Vue application, and text transformation utilities. However, several issues were identified in the review: the getProcessedLines function in index.vue automatically trims all lines, making the trimEdges option redundant and stripping original indentation; the initial route state in App.vue is incorrectly set to 'fast' instead of 'fast-data', which breaks local browser development; and index.vue duplicates text processing logic rather than importing and reusing the pure functions defined in transformers.ts.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| let lines = splitLines(text) | ||
| .map((line) => line.trim()) | ||
| .filter((line) => line.length > 0) |
There was a problem hiding this comment.
| import { onMounted, ref } from 'vue' | ||
| import Fast from './Fast/index.vue' | ||
|
|
||
| const route = ref('fast') |
There was a problem hiding this comment.
在 App.vue 中,route 的初始值被设置为 'fast',但在 plugin.json 中,插件的 feature code 已被更新为 'fast-data',且模板中使用的判断条件是 route === 'fast-data'。\n\n这会导致两个问题:\n1. 初始状态不一致:在 ZTools 客户端加载插件时,初始渲染会因为路由不匹配而跳过,直到 onPluginEnter 事件触发后才重新渲染。\n2. 本地浏览器开发失效:在本地浏览器中进行开发调试时(此时没有 window.ztools 环境,不会触发 onPluginEnter),页面将完全空白,无法进行任何 UI 预览和调试。\n\n建议将 route 的初始值修改为 'fast-data'。
const route = ref('fast-data')
| <script setup lang="ts"> | ||
| import { ref, watch } from 'vue' |
插件信息
本次变更
截图 / 演示
自检清单
plugins/fast-data/目录此 PR 由 ztools-plugin-cli 自动管理:每次
ztools publish在分支上追加一个 commit,PR 链接保持不变。