{
    "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
    "data": {
        "properties": {
            "showScrollbar": {
                "title": "滚动条显隐控制",
                "type": "boolean",
                "default": true,
                "x-platforms": ["MP"],
                "x-category": "基础属性",
                "x-index": 1,
                "description": "控制滚动条是否显示/隐藏"
            },
            "scrollX": {
                "title": "允许横向滚动",
                "type": "boolean",
                "default": false,
                "x-linkages": [
                    {
                        "type": "value:visible",
                        "target": "*(scrollLeft)",
                        "condition": "{{ $self.value }}"
                    }
                ],
                "x-category": "基础属性",
                "x-index": 2,
                "description": "开启后，将开启横向滚动条，组件支持左右滚动"
            },
            "scrollY": {
                "title": "允许纵向滚动",
                "type": "boolean",
                "default": true,
                "x-linkages": [
                    {
                        "type": "value:visible",
                        "target": "*(scrollTop)",
                        "condition": "{{ $self.value }}"
                    }
                ],
                "x-category": "基础属性",
                "x-index": 3,
                "description": "开启后，将开启纵向滚动条，组件支持上下滚动"
            },
            "scrollIntoView": {
                "title": "滚到的元素ID",
                "type": "string",
                "x-category": "高级属性",
                "x-index": 4,
                "description": "将当前的元素滚动到浏览器窗口的可视区域内",
                "x-platforms": ["WEB"],
                "x-helper-text": "小程序暂时不支持此特性"
            },
            "scrollLeft": {
                "title": "横向滚动条位置",
                "type": "number",
                "x-category": "高级属性",
                "x-index": 5,
                "description": "输入默认值，横向滚动条将默认移动到该位置"
            },
            "scrollTop": {
                "title": "竖向滚动条位置",
                "type": "number",
                "x-category": "高级属性",
                "x-index": 6,
                "description": "输入默认值，竖向滚动条将默认移动到该位置"
            },
            "lowerThreshold": {
                "title": "距底部/右边多远时，触发scrolltolower事件",
                "type": "number",
                "default": 50,
                "x-index": 7,
                "x-category": "高级属性"
            },
            "upperThreshold": {
                "title": "距顶部/左边多远时，触发scrolltoupper事件",
                "type": "number",
                "default": 50,
                "x-index": 8,
                "x-category": "高级属性"
            },
            "enhanced": {
                "title": "启用 scroll-view 增强特性",
                "type": "boolean",
                "default": false,
                "x-linkages": [
                    {
                        "type": "value:visible",
                        "target": "*(bounces,showScrollbar,pagingEnabled,fastDeceleration)",
                        "condition": "{{ $self.value }}"
                    }
                ],
                "x-platforms": ["MP"],
                "x-category": "高级属性",
                "x-index": 90,
                "description": "开启scroll-view增强特性 "
            },
            "bounces": {
                "title": "iOS 下 scroll-view 边界弹性控制",
                "type": "boolean",
                "default": true,
                "x-platforms": ["MP"],
                "x-index": 91,
                "x-category": "高级属性"
            },
            "pagingEnabled": {
                "title": "分页滑动效果",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-index": 93,
                "x-category": "高级属性"
            },
            "fastDeceleration": {
                "title": "滑动减速速率控制",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-index": 94,
                "x-category": "高级属性"
            },
            "refresherEnabled": {
                "title": "开启自定义下拉刷新",
                "type": "boolean",
                "default": false,
                "x-linkages": [
                    {
                        "type": "value:visible",
                        "target": "*(refresherThreshold,refresherDefaultStyle,refresherBackground,refresherTriggered)",
                        "condition": "{{ $self.value }}"
                    }
                ],
                "x-platforms": ["MP"],
                "x-category": "高级属性",
                "x-index": 100,
                "description": "开启后可自定义对下拉刷新进行相关配置"
            },
            "refresherThreshold": {
                "title": "设置自定义下拉刷新阈值",
                "type": "number",
                "default": 50,
                "x-index": 101,
                "x-platforms": ["MP"],
                "x-category": "高级属性"
            },
            "refresherDefaultStyle": {
                "title": "设置自定义下拉刷新默认样式",
                "type": "string",
                "default": "block",
                "x-component": "radio",
                "enum": [
                    {
                        "label": "black",
                        "value": "black"
                    },
                    {
                        "label": "white",
                        "value": "white"
                    },
                    {
                        "label": "none",
                        "value": "none"
                    }
                ],
                "x-platforms": ["MP"],
                "x-index": 102,
                "x-category": "高级属性"
            },
            "refresherBackground": {
                "title": "设置自定义下拉刷新区域背景颜色",
                "type": "string",
                "x-component": "color",
                "default": "#fff",
                "x-platforms": ["MP"],
                "x-index": 103,
                "x-category": "高级属性"
            },
            "refresherTriggered": {
                "title": "设置当前下拉刷新状态",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-index": 104,
                "x-category": "高级属性"
            },
            "scrollAnchoring": {
                "title": "开启 scroll anchoring 特性",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-category": "高级属性",
                "x-index": 110,
                "description": "开启scroll-anchoring特性"
            },
            "enableFlex": {
                "title": "启用 flexbox 布局",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-category": "高级属性",
                "x-index": 120,
                "description": "开启flexbox布局"
            },
            "enableBackToTop": {
                "title": "iOS点击顶部状态栏、安卓双击标题栏时，滚动条返回顶部，只支持竖向",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-category": "高级属性",
                "x-index": 130,
                "description": "开启后当执行对应操作后滚动条将自动返回顶部"
            },
            "scrollWithAnimation": {
                "title": "在设置滚动条位置时使用动画过渡",
                "type": "boolean",
                "default": false,
                "x-platforms": ["MP"],
                "x-index": 140,
                "x-category": "高级属性",
                "description": "开启滚动条动画"
            }
        }
    },
    "events": [
        {
            "name": "scroll",
            "title": "滚动时触发"
        },
        {
            "name": "scrolltolower",
            "title": "滚动到底部/右边时触发"
        },
        {
            "name": "scrolltoupper",
            "title": "滚动到顶部/左边时触发"
        },
        {
            "name": "dragstart",
            "title": "滑动开始事件(同时开启 enhanced 属性后生效)"
        },
        {
            "name": "dragging",
            "title": "滑动事件(同时开启 enhanced 属性后生效)"
        },
        {
            "name": "dragend",
            "title": "滑动结束事件(同时开启 enhanced 属性后生效)"
        },
        {
            "name": "refresherpulling",
            "title": "自定义下拉刷新控件被下拉"
        },
        {
            "name": "refresherrefresh",
            "title": "自定义下拉刷新被触发"
        },
        {
            "name": "refresherrestore",
            "title": "自定义下拉刷新被复位"
        },
        {
            "name": "refresherabort",
            "title": "自定义下拉刷新被中止"
        }
    ],
    "meta": {
        "title": "滚动容器",
        "description": "当组件元素内容长度大于滚动容器时，滚动容器会出滚动条用来对页面内容进行滑动展示。",
        "category": "布局",
        "categoryOrder": 200,
        "componentOrder": 110,
        "icon": "../icons/ScrollView.svg"
    },
    "configMeta": {
        "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/ScrollView",
        "shortcut": {
            "props": ["scrollX", "scrollY"],
            "extra": {
                "container": {
                    "x-component": "container",
                    "x-component-props": [
                        "gsd-h5-react:Text",
                        "CLOUDBASE_STANDARD:Button",
                        "gsd-h5-react:Image",
                        "CLOUDBASE_STANDARD:FormInput"
                    ],
                    "x-index": 1
                }
            }
        }
    },
    "isContainer": true,
    "mpOrigin": "scroll-view"
}
