Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

type:object 问题 #40

Closed
liweitao92 opened this issue Mar 15, 2018 · 2 comments
Closed

type:object 问题 #40

liweitao92 opened this issue Mar 15, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@liweitao92
Copy link

liweitao92 commented Mar 15, 2018

Bug Report or Feature Request (mark with an x)


[ ] Bug report -> please search issues before submitting
[ X] Feature request
[ ] Documentation issue or request

Reproduction link

image

Steps to reproduce

type:object时 ,表单样式显示异常

"menu": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "title": "菜单"
                }
            }
        },

What is expected?

希望能跟上面的表单布局保持一致

What is actually happening?

显示错位

Environment


ng-alain version: X.Y.Z
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
@cipchk
Copy link
Owner

cipchk commented Mar 15, 2018

麻烦提供完整的 Schema。

@liweitao92
Copy link
Author

{
    "span_label": 4,
    "span": 8,
    "properties": {
        "email": {
            "type": "string",
            "title": "邮箱",
            "format": "email",
            "placeholder": "请输入邮箱,最多20个字符",
            "maxLength": 20,
            "debug": true
        },
        "name": {
            "type": "string",
            "title": "姓名",
            "placeholder": "请输入姓名",
            "description": "必须大写开头且3个字以上",
            "minLength": 3,
            "debug": true
        },
        "age": {
            "type": "number",
            "title": "年龄"
        },
        "remark": {
            "type": "string",
            "title": "描述"
        },
        "menu": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "title": "菜单"
                }
            }
        },
        "products": {
            "type": "array",
            "title": "产品清单",
            "maxItems": 2,
            "items": {
                "type": "object",
                "properties": {
                    "pn": {
                        "title": "产品名称",
                        "type": "string"
                    },
                    "num": {
                        "title": "件数",
                        "type": "number",
                        "minimum": 1,
                        "maximum": 1000
                    },
                    "price": {
                        "title": "金额",
                        "type": "number"
                    }
                },
                "required": ["pn", "num", "price"]
            }
        }
    },
    "button": {
        "style": { "text-align": "center" },
        "items": [
            {
                "label": "Send",
                "id": "send",
                "submit": true,
                "offset": 4
            },
            {
                "label": "Reset",
                "id": "reset"
            }
        ]
    }
}

@cipchk cipchk added the bug Something isn't working label Mar 15, 2018
@cipchk cipchk closed this as completed in 4b98b62 Mar 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants