把本工程的标签排版能力改造成 FunjiaUI 远端插件,放进 plugin/ 子目录, 与原独立 Web 版并存(两者功能一致,模板/版面/打印行为逐项对齐)。 - 入口从 createApp().mount() 改为 activate(ctx) + ctx.addRoute,注册 1 菜单 / 1 路由 / 2 命令 - 11 个模板的渲染收敛成 SpecTag,差异集中到 templates/registry.ts(字段/选项/默认值原样保留) - 店铺名 / 电话从写死改为可配置,记忆在插件私有存储 - 内置二维码图片改为打包 data URL —— 远端插件没有自己的 public/ - 去掉 @headlessui/vue(换原生 select)与 Tailwind,样式类名统一 pt- 前缀避免污染宿主 - 可选接入宿主 api::sn-code:按 SN 生成真 Code 128 条码与可扫二维码; 关闭时(默认)完全保持原静态二维码行为。领码优先贴到已排版的格子,不够才新建 - 新增 commands: print-tag:issue-sn / print-tag:render-svg(后者纯本地出图,供其它插件复用) - code128.ts 实现真 Code 128 Set B(含校验位);二维码走 qrcode-generator(真 QR) - 自带本地预览器(preview/mock-api.ts 补了 /api/sn-codes mock)与 deploy / verify 脚本 - verify.mjs 修掉一处误报:源码边界判据改为「解析后是否逃出工程根」, 而不是「说明符是否以 .. 开头」(后者会把 src/components/X.vue → ../codes 误判为越界) 已发布到插件仓库:funjia.print-tag@1.0.0
26 lines
590 B
JSON
26 lines
590 B
JSON
{
|
||
"compilerOptions": {
|
||
"target": "es2015",
|
||
"module": "esnext",
|
||
"moduleResolution": "node",
|
||
"strict": true,
|
||
"jsx": "preserve",
|
||
"lib": ["es2015", "dom"],
|
||
"skipLibCheck": true,
|
||
"esModuleInterop": true,
|
||
"isolatedModules": true,
|
||
"noEmit": true,
|
||
"types": ["node"],
|
||
"baseUrl": ".",
|
||
// 预览页要 import ../plugin.config.json(Vite 本来就能处理,是 tsc 需要这个开关)
|
||
"resolveJsonModule": true
|
||
},
|
||
"include": [
|
||
"src/**/*.ts",
|
||
"src/**/*.vue",
|
||
"preview/**/*.ts",
|
||
"preview/**/*.vue",
|
||
"env.d.ts"
|
||
]
|
||
}
|