lowcode-plugin-code-generator-ccs
v0.0.17
Published
集团低代码引擎 - 浏览器出码插件
Downloads
6
Readme
插件使用说明
1. 发布为nexus raw仓库来使用
上传
standalone-worker.min.js
到/[email protected]/dist/
路径打开nexus域名跨域
annotations:
nginx.ingress.kubernetes.io/enable-cors: 'true'
nginx.ingress.kubernetes.io/ingress.class: nginx
- 使用地址 workerJsUrl =>
nexus.xxx/repository/unpkg/[email protected]/dist/standalone-worker.min.js
2. 本地使用
拷贝
scripts\[email protected]\dist\standalone-worker.min.js
到public/[email protected]\dist\standalone-worker.min.js
使用地址 workerJsUrl =>
[email protected]/dist/standalone-worker.min.js
给插件和按钮增加属性 workerJsUrl
export type CodeGenPluginOptions = {
/** 是否要禁用出码的动作按钮(默认: 否) */
disableCodeGenActionBtn?: boolean;
/**'http://nexus.c7n.gzinfo/repository/unpkg/[email protected]/dist/standalone-worker.min.js' */
workerJsUrl?: string;
};
... 通过插件给按钮透传属性
content: CodeGenActionBtn,
contentProps: { ctx, workerJsUrl: options.workerJsUrl },
... 直接给按钮传属性
<CodeGenActionBtn ctx={ctx} workerJsUrl={workerJsUrl}/>