add third part lib

This commit is contained in:
金禅 2020-07-16 20:40:54 +08:00
parent 7ecf137800
commit 6ca9eb167c
6 changed files with 116 additions and 9 deletions

View File

@ -12,6 +12,13 @@
"version": "1.19.18",
"urls": ["https://unpkg.antfin-inc.com/@alife/next@1.19.18/dist/next.js", "https://unpkg.antfin-inc.com/@alife/next@1.19.18/dist/next.css"],
"library": "Next"
},
{
"title": "MCBreadcrumb",
"package": "mc-breadcrumb",
"version": "1.0.0",
"urls": ["https://unpkg.alibaba-inc.com/mc-breadcrumb@1.0.0/dist/MCBreadcrumb.js", "https://unpkg.alibaba-inc.com/mc-breadcrumb@1.0.0/dist/MCBreadcrumb.css"],
"library": "MCBreadcrumb"
}
],
"components": [
@ -649,6 +656,87 @@
}
]
},
{
"componentName": "MCBreadcrumb",
"title": "MCBreadcrumb",
"docUrl": "",
"screenshot": "",
"npm": {
"package": "mc-breadcrumb",
"version": "1.0.0",
"exportName": "MCBreadcrumb",
"main": "lib/index.js",
"destructuring": false,
"subName": ""
},
"props": [
{
"name": "prefix",
"propType": "string",
"description": "样式类名的品牌前缀",
"defaultValue": "next-"
},
{
"name": "title",
"propType": "string",
"description": "标题",
"defaultValue": "next-"
},
{
"name": "rtl",
"propType": "bool"
},
{
"name": "children",
"propType": {
"type": "instanceOf",
"value": "custom"
},
"description": "面包屑子节点,需传入 Breadcrumb.Item"
},
{
"name": "maxNode",
"propType": {
"type": "oneOfType",
"value": [
"number",
{
"type": "oneOf",
"value": [
"auto"
]
}
]
},
"description": "面包屑最多显示个数,超出部分会被隐藏, 设置为 auto 会自动根据父元素的宽度适配。",
"defaultValue": 100
},
{
"name": "separator",
"propType": {
"type": "instanceOf",
"value": "node"
},
"description": "分隔符,可以是文本或 Icon"
},
{
"name": "component",
"propType": {
"type": "oneOfType",
"value": [
"string",
"func"
]
},
"description": "设置标签类型",
"defaultValue": "nav"
},
{
"name": "className",
"propType": "any"
}
]
},
{
"componentName": "Breadcrumb.Item",
"title": "@alifd/next",
@ -856,7 +944,7 @@
},
{
"componentName": "Button.Group",
"title": "@alifd/next",
"title": "Button.Group",
"docUrl": "",
"screenshot": "",
"npm": {
@ -4079,7 +4167,7 @@
},
{
"componentName": "Form",
"title": "@alifd/next",
"title": "Form",
"docUrl": "",
"screenshot": "",
"npm": {
@ -4241,7 +4329,7 @@
},
{
"componentName": "Form.Item",
"title": "@alifd/next",
"title": "Form.Item",
"docUrl": "",
"screenshot": "",
"npm": {
@ -12189,6 +12277,27 @@
}
]
},
{
"componentName": "MCBreadcrumb",
"title": "MC面包屑",
"icon": "",
"package": "mc-breadcrumb",
"library": "MCBreadcrumb",
"snippets": [
{
"title": "面包屑",
"screenshot": "https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_breadcrumb.png",
"schema": {
"componentName": "MCBreadcrumb",
"props": {
"title": "物料中心",
"prefix": "next-",
"maxNode": 100
}
}
}
]
},
{
"componentName": "Nav",
"title": "导航",

View File

@ -69,7 +69,5 @@
<body>
<!-- lowcode engine globals -->
<div id="lce-container"></div>
<script src="/js/editor-preset-vision.js"></script>
<script src="https://dev.g.alicdn.com/vision/visualengine-utils/5.0.0/engine-utils.js"></script>
</body>
</html>

View File

@ -94,7 +94,7 @@
}
}]
}, {
"componentName": "Div",
"componentName": "Box",
"props": {
"style": {
"textAlign": "center"

View File

@ -826,7 +826,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
event: e,
};
if (e.dragObject && e.dragObject.nodes && e.dragObject.nodes.length && e.dragObject.nodes[0].getPrototype().isModal()) {
if (e.dragObject && e.dragObject.nodes && e.dragObject.nodes.length && e.dragObject.nodes[0].getPrototype()?.isModal()) {
return this.designer.createLocation({
target: this.document.rootNode,
detail,

View File

@ -161,7 +161,7 @@ class FormSetter extends Component<FormSetterProps> {
constructor(props: RowSetterProps) {
super(props);
const { config, field } = props;
this.items = (config.items || []).map((conf) => field.createField(conf));
this.items = (config?.items || []).map((conf) => field.createField(conf));
// TODO: extraConfig for custom fields
}

View File

@ -158,5 +158,5 @@ function hoverNode(node: Node, flag: boolean) {
node.hover(flag);
}
function selectNode(node: Node) {
node.select();
node?.select();
}