{ "$id": "https://houtai.baidu.com/v2/schemas/grid.json#", "$schema": "http://json-schema.org/draft-07/schema#", "allOf": [ { "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" }, { "additionalProperties": false, "dependencies": {}, "patternProperties": { "^(\\$ref|columns|className)$": {} }, "properties": { "$schema": { "format": "uri", "type": "string", "description": "绑定 JSON 格式说明,可忽略!" }, "type": { "const": "grid", "type": "string" } }, "required": ["type"] } ], "definitions": { "column": { "allOf": [ { "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" }, { "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn" } ], "description": "列" }, "columns": { "description": "列集合", "items": { "oneOf": [ { "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/column" }, { "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/columns", "description": "列集合, 不推荐,建议再包一个 grid 如果真有必要。" } ] }, "type": "array" }, "common": { "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", "properties": { "$ref": { "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", "description": "引用页面中的定义" }, "className": { "description": "外层 CSS 类名", "type": "string" }, "columns": { "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/columns" } }, "type": "object" }, "commonColumn": { "properties": { "columnClassName": { "description": "列类名" }, "lg": { "description": "大屏时(>=1200px)宽度占比", "maximum": 12, "minimum": 1, "type": "integer" }, "lgHidden": { "default": false, "description": "大屏时(>=1200px)是否隐藏该列", "type": "boolean" }, "lgOffset": { "description": "大屏时(>=1200px)宽度偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "lgPull": { "description": "大屏时(>=1200px)宽度右偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "lgPush": { "description": "大屏时(>=1200px)宽度左偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "md": { "description": "中屏时(>=992px)宽度占比", "maximum": 12, "minimum": 1, "type": "integer" }, "mdHidden": { "default": false, "description": "中屏时(>=992px)是否隐藏该列", "type": "boolean" }, "mdOffset": { "description": "中屏时(>=992px)宽度偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "mdPull": { "description": "中屏时(>=992px)宽度右偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "mdPush": { "description": "中屏时(>=992px)宽度左偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "sm": { "description": "小屏时(>=768px)宽度占比", "maximum": 12, "minimum": 1, "type": "integer" }, "smHidden": { "default": false, "description": "小屏时(>=768px)是否隐藏该列", "type": "boolean" }, "smOffset": { "description": "小屏时(>=768px)宽度偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "smPull": { "description": "小屏时(>=768px)宽度右偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "smPush": { "description": "小屏时(>=768px)宽度左偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "xs": { "description": "极小屏(<768px)时宽度占比", "maximum": 12, "minimum": 1, "type": "integer" }, "xsHidden": { "default": false, "description": "极小屏(<768px)时是否隐藏该列", "type": "boolean" }, "xsOffset": { "description": "极小屏(<768px)时宽度偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "xsPull": { "description": "极小屏(<768px)时宽度右偏移量", "maximum": 12, "minimum": 1, "type": "integer" }, "xsPush": { "description": "极小屏(<768px)时宽度左偏移量", "maximum": 12, "minimum": 1, "type": "integer" } }, "type": "object" }, "test": { "properties": { "type": { "const": "grid" } } } }, "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", "type": "object" }