UNPKG

@lcap/nasl

Version:

NetEase Application Specific Language

1,688 lines (1,687 loc) 518 kB
[ { "group": "Container", "show": true, "name": "VanRouterView", "alias": "子页面", "title": "子页面容器", "concept": "ViewComponentDeclaration", "kebabName": "van-router-view", "description": "放置子页面的容器。", "icon": "router-view", "tsTypeParams": "", "props": [], "readableProps": [], "events": [], "methods": [], "slots": [], "children": [], "blocks": [ { "concept": "ViewBlockWithImage", "title": "基本用法", "description": "", "code": "<template>\n<van-router-view></van-router-view>\n</template>", "screenshot": "", "drawing": "" } ], "themeVariables": [] }, { "group": "Container", "show": true, "name": "VanIframe", "alias": "Iframe", "vusion": true, "title": "Iframe", "concept": "ViewComponentDeclaration", "kebabName": "van-iframe", "description": "用于嵌入其他网页的容器。", "icon": "iframe", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "src", "title": "地址", "tsType": "nasl.core.String", "description": "需要嵌入的网页地址" } ], "readableProps": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "src", "title": "网页地址", "tsType": "VanIframeOptions['src']" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "loaded", "title": "加载完成", "tsType": "nasl.core.Boolean" } ], "events": [ { "concept": "EventDeclaration", "name": "load", "title": "加载完成", "tsType": "(event: nasl.ui.BaseEvent) => void", "description": "网页加载完成时触发。" } ], "methods": [], "slots": [], "children": [], "blocks": [ { "concept": "ViewBlockWithImage", "title": "基本用法", "description": "", "code": "<template>\n<van-iframe src=\"https://sf.163.com\" style=\"width: 100%; height: 400px;\"></van-iframe>\n</template>", "screenshot": "", "drawing": "" } ], "themeVariables": [] }, { "group": "Container", "show": true, "name": "VanCollapse", "alias": "折叠面板", "title": "折叠面板", "concept": "ViewComponentDeclaration", "kebabName": "van-collapse", "description": "将一组内容放置在多个折叠面板中,点击面板的标题可以展开或收缩其内容。", "icon": "collapse", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "数据属性", "sync": true, "tabKind": "property", "name": "value", "title": "值", "tsType": "nasl.core.String | nasl.core.Integer | nasl.collection.List<nasl.core.String | nasl.core.Integer>", "description": "用于标识折叠面板的值" }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "accordion", "title": "手风琴模式", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "false" }, "playground": [] }, "description": "是否开启手风琴模式" } ], "readableProps": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "value", "title": "值", "tsType": "VanCollapseOptions['value']" } ], "events": [ { "concept": "EventDeclaration", "name": "change", "title": "切换时", "tsType": "(event: nasl.core.String) => void", "description": "切换时" } ], "methods": [], "slots": [ { "concept": "SlotDeclaration", "snippets": [ { "title": "菜单项", "code": "<van-collapse-item><template #title>标签名称n</template></van-collapse-item>" } ], "name": "default", "title": "undefined", "tsType": "() => Array<VanCollapseItem>", "params": [], "description": "插入`<van-collapse-item>`子组件。", "emptyBackground": "add-sub-large" } ], "children": [ { "concept": "ViewComponentDeclaration", "group": "Container", "name": "VanCollapseItem", "kebabName": "van-collapse-item", "title": "面板项", "description": "", "icon": "", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "数据属性", "tabKind": "property", "name": "name", "title": "值", "tsType": "nasl.core.String | nasl.core.Integer", "description": "用于标识面板项的值" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "isLink", "title": "箭头图标", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] }, "description": "是否显示箭头图标" }, { "concept": "PropDeclaration", "group": "状态属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "disabled", "title": "禁用", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "false" }, "playground": [] }, "description": "置灰显示,且禁止任何交互(焦点、点击、选择、输入等)" } ], "readableProps": [], "events": [ { "concept": "EventDeclaration", "name": "open", "title": "展开", "tsType": "(event: nasl.ui.BaseEvent) => void", "description": "展开" }, { "concept": "EventDeclaration", "name": "close", "title": "收起", "tsType": "(event: nasl.ui.BaseEvent) => void", "description": "收起" } ], "methods": [ { "concept": "LogicDeclaration", "description": "切换展开状态,传 true 为展开,false 为收起,不传参为切换", "params": [ { "concept": "Param", "name": "expanded", "description": "'展开'" } ], "returns": [], "name": "toggle", "title": "切换展开状态,传 true 为展开,false 为收起,不传参为切换" } ], "slots": [ { "concept": "SlotDeclaration", "name": "title", "title": "", "tsType": "() => Array<ViewComponent>", "params": [], "description": "" }, { "concept": "SlotDeclaration", "name": "default", "title": "", "tsType": "() => Array<ViewComponent>", "params": [], "description": "" } ], "children": [], "blocks": [], "themeVariables": [] } ], "blocks": [ { "concept": "ViewBlockWithImage", "title": "基础用法", "description": "", "code": "<template>\n<van-collapse>\n<van-collapse-item><template #title>标题1</template>代码是写出来给人看的,附带能在机器上运行</van-collapse-item>\n<van-collapse-item><template #title>标题2</template>代码是写出来给人看的,附带能在机器上运行</van-collapse-item>\n<van-collapse-item><template #title>标题3</template>代码是写出来给人看的,附带能在机器上运行</van-collapse-item>\n</van-collapse>\n</template>", "screenshot": "", "drawing": "" } ], "themeVariables": [] }, { "group": "Container", "show": true, "name": "VanCardu", "alias": "卡片", "title": "卡片", "concept": "ViewComponentDeclaration", "kebabName": "van-cardu", "description": "用于快速布局", "icon": "card", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "页面跳转", "value": "destination" }, { "title": "下载链接", "value": "download" } ] }, "name": "linkType", "title": "链接类型", "tsType": "'destination' | 'download'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "destination" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "name": "hrefAndTo", "title": "链接地址", "tsType": "nasl.core.String" }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "新窗口", "value": "_blank" }, { "title": "当前窗口", "value": "_self" }, { "title": "父级窗口", "value": "_parent" }, { "title": "顶级窗口", "value": "_top" } ] }, "name": "target", "title": "打开方式", "tsType": "'_blank' | '_self' | '_parent' | '_top'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "_self" }, "playground": [] }, "description": "父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则打开方式同当前窗口。" }, { "concept": "PropDeclaration", "group": "样式属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "方角", "value": "s" }, { "title": "圆角", "value": "r" } ] }, "name": "sr", "title": "图片风格", "tsType": "'s' | 'r'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "r" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "样式属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "shadow", "title": "卡片阴影", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "样式属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "border", "title": "卡片边框", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "样式属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "split", "title": "分割线", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "false" }, "playground": [] } } ], "readableProps": [], "events": [ { "concept": "EventDeclaration", "name": "click", "title": "点击后", "tsType": "(event: {\n altKey: nasl.core.Boolean;\n button: nasl.core.Integer;\n clientX: nasl.core.Integer;\n clientY: nasl.core.Integer;\n ctrlKey: nasl.core.Boolean;\n metaKey: nasl.core.Boolean;\n movementX: nasl.core.Integer;\n movementY: nasl.core.Integer;\n offsetX: nasl.core.Integer;\n offsetY: nasl.core.Integer;\n pageX: nasl.core.Integer;\n pageY: nasl.core.Integer;\n screenX: nasl.core.Integer;\n screenY: nasl.core.Integer;\n which: nasl.core.Integer;\n}) => void", "description": "点击事件" } ], "methods": [], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入默认的元素" }, { "concept": "SlotDeclaration", "name": "cover", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入图片" }, { "concept": "SlotDeclaration", "name": "head", "title": "", "tsType": "() => Array<ViewComponent>", "params": [], "description": "" } ], "children": [ { "concept": "ViewComponentDeclaration", "group": "Container", "name": "VanCarduGroup", "kebabName": "van-cardu-group", "title": "卡片组", "description": "卡片组", "icon": "", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "title", "title": "标题", "tsType": "nasl.core.String", "description": "卡片组的标题", "implicitToString": true } ], "readableProps": [], "events": [], "methods": [], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入默认的元素" }, { "concept": "SlotDeclaration", "name": "cover", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入图片" } ], "children": [], "blocks": [], "themeVariables": [] } ], "blocks": [ { "concept": "ViewBlockWithImage", "title": "基本样式", "description": "", "code": "<template>\n<van-cardu>\n<template #head>\n<van-text text=\"标题\"></van-text>\n</template>\n卡片内容\n</van-cardu>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cardu/screenshots/0.png", "drawing": "" }, { "concept": "ViewBlockWithImage", "title": "带分割线样式", "description": "", "code": "<template>\n<van-cardu split>\n<template #head>\n<van-text text=\"标题\"></van-text>\n</template>\n卡片内容\n</van-cardu>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cardu/screenshots/1.png", "drawing": "" }, { "concept": "ViewBlockWithImage", "title": "带图片样式", "description": "", "code": "<template>\n<van-cardu title=\"卡片\" coverSlot>\n<template #cover>\n<van-image :preview=\"false\" src=\"https://static-vusion.163yun.com/assets/cloud-ui/1.jpg\"></van-image>\n</template>\n<template #head>\n<van-text text=\"标题\"></van-text>\n</template>\n卡片内容\n</van-cardu>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cardu/screenshots/2.png", "drawing": "" } ], "themeVariables": [] }, { "group": "Layout", "show": true, "name": "VanLinearLayout", "alias": "线性布局", "title": "线性布局", "concept": "ViewComponentDeclaration", "kebabName": "van-linear-layout", "description": "内部元素按照一定的规则布局", "icon": "linear-layout", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "style", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "收缩", "value": "shrink" }, { "title": "无", "value": "none" }, { "title": "小", "value": "mini" }, { "title": "正常", "value": "small" }, { "title": "大", "value": "large" }, { "title": "默认", "value": "normal" } ] }, "name": "gap", "title": "内容间隙", "tsType": "'shrink' | 'none' | 'mini' | 'small' | 'large' | 'normal'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "normal" }, "playground": [] }, "description": "内容块间隙大小", "if": "_ => _.justify !== 'space-between' && _.justify !== 'space-around'", "tsIf": "_ => _.justify !== 'space-between' && _.justify !== 'space-around'" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "style", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "子元素默认布局", "value": "none" }, { "title": "子元素行内布局", "value": "inline" }, { "title": "子元素块级布局", "value": "block" } ] }, "name": "layout", "title": "子元素展示方式", "tsType": "'none' | 'inline' | 'block'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "none" }, "playground": [] }, "description": "设置子元素行内展示或块级换行展示", "if": "_ => _.mode === 'inline' || _.mode === 'block'", "tsIf": "_ => _.mode === 'inline' || _.mode === 'block'" }, { "concept": "PropDeclaration", "group": "状态属性", "tabKind": "property", "setter": { "concept": "IconSetter" }, "name": "loadingIcon", "title": "加载中图标", "tsType": "nasl.core.String", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "loading" }, "playground": [] }, "description": "加载状态中显示的图标" }, { "concept": "PropDeclaration", "group": "状态属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "loadingIconRotate", "title": "加载中图标旋转", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] }, "description": "设置加载中图标是否旋转,默认开启。" }, { "concept": "PropDeclaration", "group": "状态属性", "tabKind": "property", "name": "loadingText", "title": "加载中文案", "tsType": "nasl.core.String", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "" }, "playground": [] }, "description": "加载状态中显示的文案", "implicitToString": true }, { "concept": "PropDeclaration", "group": "样式属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "行内", "icon": "layout-inline-block", "tooltip": "内联布局", "value": "inline" }, { "title": "块级", "icon": "layout-block", "tooltip": "块级布局", "value": "block" }, { "title": "弹性", "icon": "layout-flex", "tooltip": "弹性布局", "value": "flex" } ] }, "name": "mode", "title": "布局模式", "tsType": "'inline' | 'block' | 'flex'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "block" }, "playground": [] }, "description": "设置布局模式", "tooltipLink": "http://help.lcap.163yun.com/1.%E5%BC%80%E5%8F%91%E5%BA%94%E7%94%A8/2.%E9%A1%B5%E9%9D%A2/10.H5%E9%A1%B5%E9%9D%A2%E5%9F%BA%E7%A1%80%E7%BB%84%E4%BB%B6/01.%E5%B8%83%E5%B1%80/020.%E7%BA%BF%E6%80%A7%E5%B8%83%E5%B1%80.html", "onChange": [ { "clear": ["justify", "alignment", "wrap", "layout"] } ], "tsOnChange": "[{\"clear\":[\"justify\",\"alignment\",\"wrap\",\"layout\"]}]" }, { "concept": "PropDeclaration", "group": "样式属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "横向排列", "icon": "flex-horizontal", "tooltip": "横向", "value": "horizontal" }, { "title": "纵向排列", "icon": "flex-vertical", "tooltip": "纵向", "value": "vertical" } ] }, "name": "direction", "title": "主轴方向", "tsType": "'horizontal' | 'vertical'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "horizontal" }, "playground": [] }, "onChange": [ { "clear": ["justify", "alignment"] } ], "tsOnChange": "[{\"clear\":[\"justify\",\"alignment\"]}]" }, { "concept": "PropDeclaration", "group": "主要属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "左对齐", "icon": "horizontal-justify-start", "tooltip": "左对齐", "value": "start" }, { "title": "居中对齐", "icon": "horizontal-justify-center", "tooltip": "居中对齐", "value": "center" }, { "title": "右对齐", "icon": "horizontal-justify-end", "tooltip": "右对齐", "value": "end" }, { "title": "平均分布(两端不留空)", "icon": "horizontal-justify-space-between", "tooltip": "平均分布(两端不留空)", "if": "_ => _.mode === 'flex' || _.direction === 'horizontal'", "tsIf": "_ => _.mode === 'flex' || _.direction === 'horizontal'", "value": "space-between" }, { "title": "平均分布", "icon": "horizontal-justify-space-around", "tooltip": "平均分布", "if": "_ => _.mode === 'flex'", "tsIf": "_ => _.mode === 'flex'", "value": "space-around" } ] }, "name": "justify", "title": "横轴对齐", "tsType": "'start' | 'center' | 'end' | 'space-between' | 'space-around'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "start" }, "playground": [] }, "docDescription": "主轴方向为横向时:支持左对齐、居中对齐、右对齐、平均分布(两端不留空)、平均分布,其中平均分布仅在弹性布局模式下展示。\n主轴方向为纵向时:支持左对齐、居中对齐、右对齐、占满容器宽度,其中占满容器宽度仅在弹性布局模式下展示。", "if": "_ => _.direction === 'horizontal' || _.mode === 'inline' && _.direction === 'vertical' || _.mode === 'block' && _.direction === 'vertical'", "onChange": [ { "update": { "gap": "normal" }, "if": "_ => _ === 'space-between'" }, { "update": { "gap": "normal" }, "if": "_ => _ === 'space-around'" } ], "tsIf": "_ => _.direction === 'horizontal' || _.mode === 'inline' && _.direction === 'vertical' || _.mode === 'block' && _.direction === 'vertical'", "tsOnChange": "[{\"update\":{\"gap\":\"normal\"},\"if\":\"_ => _ === 'space-between'\"},{\"update\":{\"gap\":\"normal\"},\"if\":\"_ => _ === 'space-around'\"}]" }, { "concept": "PropDeclaration", "group": "主要属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "顶对齐", "icon": "horizontal-alignment-start", "tooltip": "顶对齐", "value": "start" }, { "title": "垂直居中", "icon": "horizontal-alignment-center", "tooltip": "垂直居中", "value": "center" }, { "title": "底对齐", "icon": "horizontal-alignment-end", "tooltip": "底对齐", "value": "end" }, { "title": "行内文字基线对齐", "icon": "horizontal-alignment-baseline", "tooltip": "行内文字基线对齐", "value": "baseline" }, { "title": "占满容器高度", "icon": "horizontal-alignment-stretch", "tooltip": "占满容器高度", "value": "stretch" } ] }, "name": "alignment", "title": "纵轴对齐", "tsType": "'start' | 'center' | 'end' | 'baseline' | 'stretch'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "stretch" }, "playground": [] }, "docDescription": "主轴方向为横向时:支持顶对齐、垂直居中、底对齐、行内文字基线对齐、占满容器高度。\n主轴方向为纵向时:支持顶对齐、垂直居中、底对齐、平均分布(两端不留空)、平均分布。", "if": "_ => _.mode === 'flex' && _.direction === 'horizontal'", "tsIf": "_ => _.mode === 'flex' && _.direction === 'horizontal'" }, { "concept": "PropDeclaration", "group": "主要属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "左对齐", "icon": "vertical-alignment-start", "tooltip": "左对齐", "value": "start" }, { "title": "居中对齐", "icon": "vertical-alignment-center", "tooltip": "居中对齐", "value": "center" }, { "title": "右对齐", "icon": "vertical-alignment-end", "tooltip": "右对齐", "value": "end" }, { "title": "拉伸子元素充满整个父元素空间", "icon": "vertical-alignment-stretch", "tooltip": "占满容器宽度", "value": "stretch" } ] }, "name": "alignment", "title": "纵轴对齐", "tsType": "'start' | 'center' | 'end' | 'stretch'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "stretch" }, "playground": [] }, "docDescription": "主轴方向为横向时:支持顶对齐、垂直居中、底对齐、行内文字基线对齐、占满容器高度。\n主轴方向为纵向时:支持顶对齐、垂直居中、底对齐、平均分布(两端不留空)、平均分布。", "if": "_ => _.mode === 'flex' && _.direction === 'vertical'", "tsIf": "_ => _.mode === 'flex' && _.direction === 'vertical'" }, { "concept": "PropDeclaration", "group": "主要属性", "bindHide": true, "tabKind": "style", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "顶对齐", "icon": "vertical-justify-start", "tooltip": "顶对齐", "value": "start" }, { "title": "垂直居中", "icon": "vertical-justify-center", "tooltip": "垂直居中", "value": "center" }, { "title": "底对齐", "icon": "vertical-justify-end", "tooltip": "底对齐", "value": "end" }, { "title": "平均分布(两端不留空)", "icon": "vertical-justify-space-between", "tooltip": "平均分布(两端不留空)", "value": "space-between" }, { "title": "平均分布", "icon": "vertical-justify-space-around", "tooltip": "平均分布", "value": "space-around" } ] }, "name": "justify", "title": "横轴对齐", "tsType": "'start' | 'center' | 'end' | 'space-between' | 'space-around'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "start" }, "playground": [] }, "docDescription": "主轴方向为横向时:支持左对齐、居中对齐、右对齐、平均分布(两端不留空)、平均分布,其中平均分布仅在弹性布局模式下展示。\n主轴方向为纵向时:支持左对齐、居中对齐、右对齐、占满容器宽度,其中占满容器宽度仅在弹性布局模式下展示。", "if": "_ => _.mode === 'flex' && _.direction === 'vertical'", "onChange": [ { "update": { "gap": "normal" }, "if": "_ => _ === 'space-between'" }, { "update": { "gap": "normal" }, "if": "_ => _ === 'space-around'" } ], "tsIf": "_ => _.mode === 'flex' && _.direction === 'vertical'", "tsOnChange": "[{\"update\":{\"gap\":\"normal\"},\"if\":\"_ => _ === 'space-between'\"},{\"update\":{\"gap\":\"normal\"},\"if\":\"_ => _ === 'space-around'\"}]" }, { "concept": "PropDeclaration", "group": "样式属性", "tabKind": "style", "setter": { "concept": "SwitchSetter" }, "name": "wrap", "title": "换行", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] }, "description": "弹性布局下子元素总宽度超出父级时子元素是否换行展示", "if": "_ => _.mode === 'flex'", "tsIf": "_ => _.mode === 'flex'" } ], "readableProps": [], "events": [ { "concept": "EventDeclaration", "name": "click", "title": "点击后", "tsType": "(event: nasl.ui.BaseEvent) => void", "description": "点击此项时触发" } ], "methods": [ { "concept": "LogicDeclaration", "description": "打开加载中", "params": [], "returns": [], "name": "openLoading", "title": "打开加载中" }, { "concept": "LogicDeclaration", "description": "关闭加载中", "params": [], "returns": [], "name": "closeLoading", "title": "关闭加载中" } ], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "内容" } ], "children": [], "blocks": [ { "concept": "ViewBlockWithImage", "title": "单行排布", "description": "", "code": "<template>\n<van-linear-layout direction=\"horizontal\" :wrap=\"true\">\n</van-linear-layout>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/screenshots/0.png", "drawing": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/drawings/0.svg" }, { "concept": "ViewBlockWithImage", "title": "多行排布", "description": "", "code": "<template>\n<van-linear-layout direction=\"vertical\" gap=\"none\">\n<van-linear-layout :wrap=\"true\">\n</van-linear-layout>\n<van-linear-layout :wrap=\"true\">\n</van-linear-layout>\n</van-linear-layout>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/screenshots/1.png", "drawing": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/drawings/1.svg" }, { "concept": "ViewBlockWithImage", "title": "两端排布", "description": "", "code": "<template>\n<van-linear-layout justify=\"space-between\" :wrap=\"true\">\n<van-linear-layout :wrap=\"true\">\n</van-linear-layout>\n<van-linear-layout :wrap=\"true\">\n</van-linear-layout>\n</van-linear-layout>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/screenshots/2.png", "drawing": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/linear-layout/drawings/2.svg" } ], "themeVariables": [] }, { "group": "Layout", "show": true, "name": "VanAbsoluteLayout", "alias": "自由布局", "vusion": true, "title": "自由布局", "concept": "ViewComponentDeclaration", "kebabName": "van-absolute-layout", "description": "拖拽内部元素到任意位置", "icon": "absolute-layout", "tsTypeParams": "", "props": [], "readableProps": [], "events": [ { "concept": "EventDeclaration", "name": "click", "title": "点击后", "tsType": "(event: {\n altKey: nasl.core.Boolean;\n button: nasl.core.Integer;\n clientX: nasl.core.Integer;\n clientY: nasl.core.Integer;\n ctrlKey: nasl.core.Boolean;\n metaKey: nasl.core.Boolean;\n movementX: nasl.core.Integer;\n movementY: nasl.core.Integer;\n offsetX: nasl.core.Integer;\n offsetY: nasl.core.Integer;\n pageX: nasl.core.Integer;\n pageY: nasl.core.Integer;\n screenX: nasl.core.Integer;\n screenY: nasl.core.Integer;\n which: nasl.core.Integer;\n}) => void", "description": "点击此项时触发" } ], "methods": [], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "内容" } ], "children": [], "blocks": [ { "concept": "ViewBlockWithImage", "title": "自由布局", "description": "", "code": "<template>\n<van-absolute-layout>\n</van-absolute-layout>\n</template>", "screenshot": "", "drawing": "" } ], "themeVariables": [] }, { "group": "Display", "show": true, "name": "VanDivider", "alias": "分割线", "title": "分隔线", "concept": "ViewComponentDeclaration", "kebabName": "van-divider", "description": "用于将内容分隔为多个区域", "icon": "divider", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "居中", "value": "center" }, { "title": "左", "value": "left" }, { "title": "右", "value": "right" } ] }, "name": "contentPosition", "title": "内容位置", "tsType": "'center' | 'left' | 'right'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "center" }, "playground": [] }, "description": "设置内容位置" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "虚线", "value": "b" }, { "title": "实线", "value": "a" } ] }, "name": "dashed", "title": "线条类型", "tsType": "'b' | 'a'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "a" }, "playground": [] } } ], "readableProps": [], "events": [], "methods": [], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "默认", "tsType": "() => Array<ViewComponent>", "params": [], "description": "显示的文本" } ], "children": [], "blocks": [ { "concept": "ViewBlockWithImage", "title": "实线", "description": "", "code": "<template>\n<van-divider dashed=\"a\"> 文本 </van-divider>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/divider/screenshots/0.png", "drawing": "" }, { "concept": "ViewBlockWithImage", "title": "虚线", "description": "", "code": "<template>\n<van-divider dashed=\"b\"> 文本 </van-divider>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/divider/screenshots/1.png", "drawing": "" } ], "themeVariables": [] }, { "group": "Display", "show": true, "name": "VanCellGroup", "alias": "单元格", "title": "单元格组", "concept": "ViewComponentDeclaration", "kebabName": "van-cell-group", "description": "单元格为列表中的单个展示项", "icon": "cell-group", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "inset", "title": "卡片风格", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "false" }, "playground": [] }, "description": "是否显示为卡片风格" } ], "readableProps": [], "events": [], "methods": [], "slots": [ { "concept": "SlotDeclaration", "snippets": [ { "title": "单元格", "code": "<van-cell isLink center><template #title>左侧文本</template><template>右侧文本</template></van-cell>" } ], "name": "default", "title": "undefined", "tsType": "() => Array<VanCell>", "params": [], "description": "插入`<van-cell>`子组件。", "emptyBackground": "add-sub-large" } ], "children": [ { "concept": "ViewComponentDeclaration", "group": "Display", "name": "VanCell", "kebabName": "van-cell", "title": "单元格", "description": "", "icon": "", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "数据属性", "tabKind": "property", "name": "value", "title": "值", "tsType": "nasl.core.String", "description": "用于标识单元格的值", "implicitToString": true }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "isLink", "title": "箭头图标", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] }, "description": "是否显示箭头图标" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "左", "value": "left" }, { "title": "上", "value": "up" }, { "title": "下", "value": "down" }, { "title": "右", "value": "right" } ] }, "name": "arrowDirection", "title": "箭头方向", "tsType": "'left' | 'up' | 'down' | 'right'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "right" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "SwitchSetter" }, "name": "center", "title": "垂直居中", "tsType": "nasl.core.Boolean", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "BooleanLiteral", "value": "true" }, "playground": [] }, "description": "是否垂直居中展示" }, { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "setter": { "concept": "IconSetter" }, "name": "icon", "title": "图标", "tsType": "nasl.core.String" }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "页面跳转", "value": "destination" }, { "title": "下载链接", "value": "download" } ] }, "name": "linkType", "title": "链接类型", "tsType": "'destination' | 'download'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "destination" }, "playground": [] } }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "name": "hrefAndTo", "title": "链接地址", "tsType": "nasl.core.String" }, { "concept": "PropDeclaration", "group": "交互属性", "tabKind": "property", "setter": { "concept": "EnumSelectSetter", "options": [ { "title": "新窗口", "value": "_blank" }, { "title": "当前窗口", "value": "_self" }, { "title": "父级窗口", "value": "_parent" }, { "title": "顶级窗口", "value": "_top" } ] }, "name": "target", "title": "打开方式", "tsType": "'_blank' | '_self' | '_parent' | '_top'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "_self" }, "playground": [] }, "description": "父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则打开方式同当前窗口。" } ], "readableProps": [ { "concept": "PropDeclaration", "group": "主要属性", "tabKind": "property", "name": "value", "title": "值", "tsType": "VanCellOptions['value']" } ], "events": [ { "concept": "EventDeclaration", "name": "click", "title": "点击后", "tsType": "(event: {\n altKey: nasl.core.Boolean;\n button: nasl.core.Integer;\n clientX: nasl.core.Integer;\n clientY: nasl.core.Integer;\n ctrlKey: nasl.core.Boolean;\n metaKey: nasl.core.Boolean;\n movementX: nasl.core.Integer;\n movementY: nasl.core.Integer;\n offsetX: nasl.core.Integer;\n offsetY: nasl.core.Integer;\n pageX: nasl.core.Integer;\n pageY: nasl.core.Integer;\n screenX: nasl.core.Integer;\n screenY: nasl.core.Integer;\n which: nasl.core.Integer;\n}) => void", "description": "点击某一项后触发" } ], "methods": [], "slots": [ { "concept": "SlotDeclaration", "name": "default", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入文本或 HTML。" }, { "concept": "SlotDeclaration", "name": "title", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "插入文本或 HTML。" }, { "concept": "SlotDeclaration", "name": "rightIcon", "title": "undefined", "tsType": "() => Array<ViewComponent>", "params": [], "description": "右侧图标。" } ], "children": [], "blocks": [], "themeVariables": [] } ], "blocks": [ { "concept": "ViewBlockWithImage", "title": "基本用法", "description": "", "code": "<template>\n<van-cell-group>\n<van-cell isLink center>\n<template #title>\n左侧文本\n</template>\n右侧文本\n</van-cell>\n</van-cell-group>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cell-group/screenshots/0.png", "drawing": "" }, { "concept": "ViewBlockWithImage", "title": "圆角风格", "description": "", "code": "<template>\n<van-cell-group inset>\n<van-cell isLink center>\n<template #title>\n左侧文本\n</template>\n右侧文本\n</van-cell>\n</van-cell-group>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cell-group/screenshots/1.png", "drawing": "" }, { "concept": "ViewBlockWithImage", "title": "垂直居中", "description": "", "code": "<template>\n<van-cell-group>\n<van-cell isLink center>\n<template #title>\n左侧文本\n</template>\n右侧文本\n</van-cell>\n</van-cell-group>\n</template>", "screenshot": "https://static-vusion.163yun.com/packages/@lcap/mobile-ui@1.0.0/src/cell-group/screenshots/2.png", "drawing": "" } ], "themeVariables": [] }, { "group": "Layout", "show": true, "name": "VanRow", "alias": "栅格", "title": "栅格布局", "concept": "ViewComponentDeclaration", "kebabName": "van-row", "description": "内部元素按照一定的规则布局", "icon": "row", "tsTypeParams": "", "props": [ { "concept": "PropDeclaration", "group": "样式属性", "bindHide": true, "tabKind": "property", "setter": { "concept": "CapsulesSetter", "options": [ { "title": "正常", "icon": "layout-block", "tooltip": "块级布局", "value": "-" }, { "title": "弹性布局", "icon": "layout-flex", "tooltip": "弹性布局", "value": "flex" } ] }, "name": "type", "title": "布局模式", "tsType": "'-' | 'flex'", "defaultValue": { "concept": "DefaultValue", "expression": { "concept": "StringLiteral", "value": "flex"