📄 原始资料 (已截断) | 展开查看原始 JSON(rating.json)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bricks://elements/rating",
"schemaVersion": "2.3",
"type": "object",
"title": "Rating",
"description": "Schema for Bricks Rating element",
"metadata": {
"name": "rating",
"category": "general",
"tag": "div",
"nestable": false
},
"settings": {
"rating": {
"label": "Rating",
"default": "3.5",
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "评分"
},
"maxRating": {
"label": "Max. rating",
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "最高评分"
},
"gap": {
"label": "Gap",
"units": true,
"css": [
{
"property": "gap"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "间距"
},
"icon": {
"label": "Icon",
"valueSchema": {
"type": "object",
"description": "Icon settings",
"properties": {
"library": {
"type": "string"
},
"icon": {
"type": "string"
},
"svg": {
"type": "object"
}
},
"descriptionZh": "图标设置。"
},
"controlType": "icon",
"labelZh": "图标"
},
"iconColorFull": {
"label": "Icon color",
"css": [
{
"property": "color",
"selector": ".icon.full-color"
}
],
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "图标颜色"
},
"iconColorEmpty": {
"label": "Icon color",
"css": [
{
"property": "color",
"selector": ".icon.empty-color"
}
],
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "图标颜色"
},
"iconSize": {
"label": "Icon size",
"units": true,
"css": [
{
"property": "font-size",
"selector": ".icon"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "图标尺寸"
},
"schema": {
"label": "Generate review schema",
"valueSchema": {
"type": "boolean"
},
"controlType": "checkbox",
"labelZh": "生成评论结构化数据"
},
"schemaType": {
"label": "Required",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "必填"
},
"schemaName": {
"label": "Required",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "必填"
},
"reviewAuthor": {
"label": "Optional",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "可选"
},
"schemaProperties": {
"label": "Additional item reviewed properties",
"options": {
"Text": "Text",
"Number": "Number",
"Object": "Nested object",
"TextZh": "文本",
"NumberZh": "数字",
"ObjectZh": "嵌套对象"
},
"hasRequired": true,
"valueSchema": {
"type": "array",
"items": {
"type": "object"
}
},
"controlType": "repeater",
"labelZh": "附加审查项属性"
},
"schemaReviewProperties": {
"label": "Additional review properties",
"options": {
"Text": "Text",
"Number": "Number",
"Object": "Nested object",
"TextZh": "文本",
"NumberZh": "数字",
"ObjectZh": "嵌套对象"
},
"hasRequired": true,
"valueSchema": {
"type": "array",
"items": {
"type": "object"
}
},
"controlType": "repeater",
"labelZh": "附加评论属性"
},
"_content": {
"label": "Content",
"css": [
{
"property": "content",
"value": "%s"
}
],
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "内容"
},
"_margin": {
"label": "Margin",
"valueSchema": {
"type": "object",
"description": "Spacing value with directional properties",
"properties": {
"top": {
"type": "string",
... (内容过长已截断,完整 JSON 见原始文件)