Bricks Schema 中文文档:滑块(可嵌套)

标签TAGS: 

📄 原始资料 (已截断)  |  展开查看原始 JSON(slider-nested.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://elements/slider-nested”, “schemaVersion”: “2.3”, “type”: “object”, “title”: “Slider (Nestable)”, “description”: “Schema for Bricks Slider (Nestable) element”, “meta…

📄 原始资料 (已截断)  |  展开查看原始 JSON(slider-nested.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://elements/slider-nested",
  "schemaVersion": "2.3",
  "type": "object",
  "title": "Slider (Nestable)",
  "description": "Schema for Bricks Slider (Nestable) element",
  "metadata": {
    "name": "slider-nested",
    "category": "media",
    "tag": "div",
    "nestable": true
  },
  "settings": {
    "optionsType": {
      "label": "Options type",
      "default": "Default",
      "options": {
        "default": "Default",
        "custom": "Custom",
        "defaultZh": "默认",
        "customZh": "自定义"
      },
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Single selection",
            "descriptionZh": "单选。"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Multiple selection",
            "descriptionZh": "多选。"
          }
        ]
      },
      "controlType": "select",
      "labelZh": "选项类型"
    },
    "options": {
      "label": "Custom options",
      "hasRequired": true,
      "valueSchema": {
        "type": "string"
      },
      "controlType": "code",
      "labelZh": "自定义选项"
    },
    "type": {
      "label": "Type",
      "options": {
        "loop": "Loop",
        "slide": "Slide",
        "fade": "Fade",
        "loopZh": "循环",
        "slideZh": "滑动",
        "fadeZh": "淡入"
      },
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Single selection",
            "descriptionZh": "单选。"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Multiple selection",
            "descriptionZh": "多选。"
          }
        ]
      },
      "controlType": "select",
      "labelZh": "类型"
    },
    "direction": {
      "label": "Direction",
      "options": {
        "ltr": "Left to right",
        "rtl": "Right to left",
        "ttb": "Vertical",
        "ltrZh": "从左到右",
        "rtlZh": "从右到左",
        "ttbZh": "垂直"
      },
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Single selection",
            "descriptionZh": "单选。"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Multiple selection",
            "descriptionZh": "多选。"
          }
        ]
      },
      "controlType": "select",
      "labelZh": "方向"
    },
    "keyboard": {
      "label": "Keyboard",
      "options": {
        "false": "Off",
        "focused": "Focused",
        "global": "Global",
        "falseZh": "关闭",
        "focusedZh": "聚焦时",
        "globalZh": "全局"
      },
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Single selection",
            "descriptionZh": "单选。"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Multiple selection",
            "descriptionZh": "多选。"
          }
        ]
      },
      "controlType": "select",
      "labelZh": "键盘控制"
    },
    "autoHeight": {
      "label": "Auto height",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "自动高度"
    },
    "height": {
      "label": "Height",
      "units": true,
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "高度"
    },
    "gap": {
      "label": "Spacing",
      "units": true,
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "间距"
    },
    "start": {
      "label": "Start index",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "起始索引"
    },
    "perPage": {
      "label": "Items to show",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "显示项数"
    },
    "perMove": {
      "label": "Items to scroll",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "滚动项数"
    },
    "speed": {
      "label": "Speed in ms",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "速度(毫秒)"
    },
    "focus": {
      "label": "Focus",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "聚焦"
    },
    "autoplay": {
      "label": "Autoplay",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "自动播放"
    },
    "pauseOnHover": {
      "label": "Pause on hover",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "悬停暂停"
    },
    "pauseOnFocus": {
      "label": "Pause on focus",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "聚焦暂停"
    },
    "interval": {
      "label": "Interval in ms",
      "hasRequired": true,
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Value with unit (e.g., \"10px\", \"50%\")",
            "descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
          },
          {
            "type": "number"
          }
        ]
      },
      "controlType": "number",
      "labelZh": "间隔(毫秒)"
    },
    "rewind": {
      "label": "Rewind",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "倒带"
    },
    "rewindByDrag": {
      "label": "Rewind by drag",
      "hasRequired": true,
 

... (内容过长已截断,完整 JSON 见原始文件)

前言

Bricks Slider (Nestable) 元素的 schema。

基本信息

  • 英文名称Slider (Nestable)
  • 中文名称:滑块(可嵌套)
  • Schema IDbricks://elements/slider-nested
  • Schema 版本2.3
  • 类型object
  • 分类media
  • Tagdiv
  • 内部名称slider-nested

设置项

  • optionsType — 选项类型 (select)
  • options — 自定义选项 (code)
  • type — 类型 (select)
  • direction — 方向 (select)
  • keyboard — 键盘控制 (select)
  • autoHeight — 自动高度 (checkbox)
  • height — 高度 (number)
  • gap — 间距 (number)
  • start — 起始索引 (number)
  • perPage — 显示项数 (number)
  • perMove — 滚动项数 (number)
  • speed — 速度(毫秒) (number)
  • focus — 聚焦 (number)
  • autoplay — 自动播放 (checkbox)
  • pauseOnHover — 悬停暂停 (checkbox)
  • pauseOnFocus — 聚焦暂停 (checkbox)
  • interval — 间隔(毫秒) (number)
  • rewind — 倒带 (checkbox)
  • rewindByDrag — 拖动倒带 (checkbox)
  • rewindSpeed — 速度(毫秒) (number)
  • slidePadding — 内边距 (spacing)
  • slideAlignHorizontal — 水平对齐 (align-items)
  • slideAlignVertical — 垂直对齐 (justify-content)
  • slideBackground — 背景 (background)
  • slideBorder — 边框 (border)
  • arrows — 显示 (checkbox)
  • arrowHeight — 高度 (number)
  • arrowWidth — 宽度 (number)
  • arrowBackground — 背景 (color)
  • arrowBorder — 边框 (border)
  • arrowColor — 颜色 (color)
  • arrowSize — 尺寸 (number)
  • arrowTextShadow — 文字阴影 (text-shadow)
  • arrowDisabledBackground — 背景 (color)
  • arrowDisabledBorder — 边框 (border)
  • arrowDisabledColor — 颜色 (color)
  • arrowDisabledOpacity — 不透明度 (number)
  • prevArrow — 上一页箭头 (icon)
  • prevArrowTop — 顶部 (number)
  • prevArrowRight — 右侧 (number)
  • prevArrowBottom — 底部 (number)
  • prevArrowLeft — 左侧 (number)
  • prevArrowTransform — 变换 (transform)
  • nextArrow — 下一页箭头 (icon)
  • nextArrowTop — 顶部 (number)
  • nextArrowRight — 右侧 (number)
  • nextArrowBottom — 底部 (number)
  • nextArrowLeft — 左侧 (number)
  • nextArrowTransform — 变换 (transform)
  • pagination — 显示 (checkbox)
  • paginationSpacing — 外边距 (spacing)
  • paginationHeight — 高度 (number)
  • paginationWidth — 宽度 (number)
  • paginationColor — 颜色 (color)
  • paginationBorder — 边框 (border)
  • paginationHeightActive — 高度 (number)
  • paginationWidthActive — 宽度 (number)
  • paginationColorActive — 颜色 (color)
  • paginationBorderActive — 边框 (border)
  • paginationTop — 顶部 (number)
  • paginationRight — 右侧 (number)
  • paginationBottom — 底部 (number)
  • paginationLeft — 左侧 (number)
  • _content — 内容 (text)
  • _margin — 外边距 (spacing)
  • _padding — 内边距 (spacing)
  • _width — 宽度 (number)
  • _widthMin — 最小宽度 (number)
  • _widthMax — 最大宽度 (number)
  • _height — 高度 (number)
  • _heightMin — 最小高度 (number)
  • _heightMax — 最大高度 (number)
  • _aspectRatio — 宽高比 (text)
  • _position — 位置 (select)
  • _top — 顶部 (number)
  • _right — 右侧 (number)
  • _bottom — 底部 (number)
  • _left — 左侧 (number)
  • _zIndex — Z 索引 (number)
  • _order — 顺序 (number)
  • _display — 显示 (select)
  • _visibility — 可见性 (select)
  • _overflow — 溢出 (text)
  • _opacity — 不透明度 (number)
  • _cursor — 光标 (select)
  • _isolation — 隔离 (select)
  • _mixBlendMode — 混合模式 (select)
  • _pointerEvents — 指针事件 (text)
  • _perspective — 透视 (number)
  • _perspectiveOrigin — 透视原点 (text)
  • _gridItemJustifySelf — 自身水平对齐 (align-items)
  • _flexDirection — 方向 (direction)
  • _alignSelf — 自身对齐 (align-items)
  • _justifyContent — 主轴对齐 (justify-content)
  • _alignItems — 交叉轴对齐 (align-items)
  • _gap — 间距 (number)
  • _flexGrow — 放大比例 (number)
  • _flexShrink — 缩小比例 (number)
  • _flexBasis — 伸缩基准 (text)
  • _useMasonry — %s 布局 (checkbox)
  • _masonryColumn — 列数 (number)
  • _masonryGutter — 间距 (number)
  • _masonryHorizontalOrder — 水平顺序 (checkbox)
  • _masonryTransitionDuration — 过渡 (number)
  • _masonryTransitionMode — 显现动画 (select)
  • _typography — _typography (typography)
  • _background — _background (background)
  • _shapeDividers — 自定义形状 (repeater)
  • _gradient — _gradient (gradient)
  • _border — 边框 (border)
  • _boxShadow — 盒子阴影 (box-shadow)
  • _transform — 变换 (transform)
  • _transformOrigin — 变换原点 (text)
  • _motionElementParallax — 元素视差 (checkbox)
  • _motionElementParallaxSpeedX — 水平速度 (number)
  • _motionElementParallaxSpeedY — 垂直速度 (number)
  • _motionBackgroundParallax — 背景视差 (checkbox)
  • _motionBackgroundParallaxSpeed — 背景速度 (number)
  • _motionStartVisiblePercent — 视差起点 (number)
  • _cssCustom — 自定义 CSS (code)
  • _cssClasses — CSS 类 (text)
  • _cssId — CSS ID (text)
  • _cssFilters — CSS 滤镜 (filters)
  • _cssTransition — 过渡 (text)
  • _attributes — 姓名 (repeater)
  • _scrollSnapType — 类型 (select)
  • _scrollSnapAlign — 对齐 (select)
  • _scrollSnapStop — 停止 (select)

补充说明

更多细节可参考 Bricks 官方 Academy 文档