Open 12mubai opened 1 year ago
A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述
---textarea.tsx import { createElement } from 'react'; import { Input } from '@alifd/next';
import './index.scss';
export interface TextAreaProps { onChange: Function; title: string; value: string; placeholder: string; minRows: number; maxRows: number; defaultValue: string; minLength: number; maxLength: number; rows: number;
}
const TextAreaSetter: React.FC = (props: TextAreaProps) => { const { title, placeholder, value, minRows, maxRows, minLength, maxLength } = props;
function mixRows() { if (this.minRows <= maxRows) { return true } else { return false } }
return (
); };
---meta.js import { ComponentMetadata, Snippet } from '@alilc/lowcode-types'; export { default as BraftEditorSetter } from '../../src/components/textarea-setter/braft-editor';
const TextAreaSetterMeta: ComponentMetadata = { "componentName": "TextAreaSetter", "title": "TextAreaSetter", "docUrl": "", "screenshot": "", "devMode": "proCode", "npm": { "package": "lowcode-material-setter", "version": "0.1.0", "exportName": "TextAreaSetter", "main": "src\index.tsx", "destructuring": true, "subName": "" }, "configure": { "props": [
// 最大行数 { "title": { "label": { "type": "i18n", "en-US": "maxRows", "zh-CN": "最大行数" } "supports": { "style": true }, "component": {}
} }; const snippets: Snippet[] = [ { "title": "TextAreaSetter", "screenshot": "", "schema": { "componentName": "TextAreaSetter", "props": {} } } ];
Steps to reproduce the behavior: / 详细复现步骤:
English version example:
中文版示例:
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为
(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题
复现步骤太简略了,参考下这个https://lowcode-engine.cn/site/community/issue
你好 @12mubai,由于缺乏必要的信息(如 bug 重现步骤、引擎版本信息 等),无法定位问题,请按照 issue bug 模板 补全信息,也可以通过阅读引擎的 issue 说明 了解什么类型的 issue 可以获得更好、更快的支持。
Describe the bug (required) / 详细描述 bug(必填)
在meta.js里面设置自定义setter,然后在fusion design上面设置器不能使用
A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述
在meta.js里面设置自定义setter,然后在fusion design上面设置器不能使用
To Reproduce (required) / 如何复现 bug?(必填,非常重要)
---textarea.tsx import { createElement } from 'react'; import { Input } from '@alifd/next';
import './index.scss';
export interface TextAreaProps { onChange: Function; title: string; value: string; placeholder: string; minRows: number; maxRows: number; defaultValue: string; minLength: number; maxLength: number; rows: number;
}
const TextAreaSetter: React.FC = (props: TextAreaProps) => {
const { title, placeholder, value, minRows, maxRows, minLength, maxLength } = props;
function mixRows() { if (this.minRows <= maxRows) { return true } else { return false } }
return (
); };
export default TextAreaSetter
---meta.js import { ComponentMetadata, Snippet } from '@alilc/lowcode-types'; export { default as BraftEditorSetter } from '../../src/components/textarea-setter/braft-editor';
const TextAreaSetterMeta: ComponentMetadata = { "componentName": "TextAreaSetter", "title": "TextAreaSetter", "docUrl": "", "screenshot": "", "devMode": "proCode", "npm": { "package": "lowcode-material-setter", "version": "0.1.0", "exportName": "TextAreaSetter", "main": "src\index.tsx", "destructuring": true, "subName": "" }, "configure": { "props": [
} }; const snippets: Snippet[] = [ { "title": "TextAreaSetter", "screenshot": "", "schema": { "componentName": "TextAreaSetter", "props": {} } } ];
export default { ...TextAreaSetterMeta, snippets };
Steps to reproduce the behavior: / 详细复现步骤:
English version example:
中文版示例:
Expected behavior (required) / 预期行为(必填,非常重要)
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为
Screenshots (optional) / bug 截图(可选)
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题
Environments (please complete the following information) (required): / 请提供如下信息(必填)
Additional context (optional) / 更多额外信息(可选)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题