@ywfe/materials-design
Version:
YwDesign for lowcode
120 lines (118 loc) • 3.25 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _utils = require("../_utils");
var _props = _interopRequireDefault(require("./common/props"));
// import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
var snippets = [{
title: '通用表单',
svgId: 'toolbox-page-form',
screenshot: 'https://img.alicdn.com/imgextra/i2/O1CN016gn5DQ1FeXUNKdK22_!!6000000000512-55-tps-50-36.svg',
schema: {
componentName: 'YwJsonForm',
title: 'YwJsonForm',
props: {
style: {
width: '100%'
},
items: [{
component: 'Input',
primaryKey: "input_" + (0, _utils.uuid)(),
label: '表单项',
size: 'medium',
title: '表单项',
name: (0, _utils.uuid)()
}]
}
}
}];
var YwJsonFormMeta = [{
componentName: 'YwJsonForm',
title: 'YwJsonForm',
docUrl: '',
screenshot: '',
devMode: 'proCode',
group: '基础组件',
category: '表单',
npm: {
"package": '@ywfe/materials-design',
version: '0.0.1',
exportName: 'YwJsonForm',
main: 'src/index.tsx',
destructuring: true,
subName: ''
},
configure: {
component: {
isContainer: true,
isMinimalRenderUnit: true,
nestingRule: {
childWhitelist: new RegExp('form.*', 'i')
}
},
supports: {
style: true,
events: ['onCreate', 'onSubmit', 'onReset'],
loop: false
},
props: _props["default"]
},
snippets: snippets
}
// {
// componentName: 'ProFormItem',
// title: '表单项',
// docUrl: '',
// screenshot:
// 'https://img.alicdn.com/imgextra/i2/O1CN016gn5DQ1FeXUNKdK22_!!6000000000512-55-tps-50-36.svg',
// icon: 'https://img.alicdn.com/imgextra/i2/O1CN016gn5DQ1FeXUNKdK22_!!6000000000512-55-tps-50-36.svg',
// devMode: 'proCode',
// npm: {
// package: '@alifd/fusion-ui',
// version: '0.1.4',
// exportName: 'ProForm',
// main: 'lib/index.js',
// destructuring: true,
// subName: 'Item',
// },
// configure: {
// component: {
// disableBehaviors: ['copy'],
// nestingRule: {
// parentWhitelist: ['ProForm'],
// },
// },
// props: FormItemProps,
// supports: {
// style: true,
// events: ['onPressEnter', 'onClear', 'onChange', 'onKeyDown', 'onFocus', 'onBlur'],
// },
// advanced: {
// initialChildren: [
// {
// componentName: 'Input',
// props: {
// hasBorder: true,
// size: 'medium',
// autoComplete: 'off',
// },
// },
// ],
// callbacks: {
// onNodeRemove: (removedNode, currentNode) => {
// if (!removedNode || !currentNode) {
// return;
// }
// const { children } = currentNode;
// // 若无 children,则说明当前 P 组件内已为空,需要删除 FormItem 组件本身
// if (children && children.isEmptyNode) {
// currentNode.remove();
// }
// },
// },
// },
// },
// },
];
var _default = exports["default"] = [].concat(YwJsonFormMeta);