From 22aef37c2a66ed5cea70db649a1c10d76b9975ab Mon Sep 17 00:00:00 2001 From: GuanMo <13216698987@163.com> Date: Sat, 22 Mar 2025 14:27:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=BA=93=E7=89=88=E6=9C=AC=E7=9A=84=E8=87=AA=E5=8A=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0&=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # designer-demo/public/mock/bundle.json resolved by [CherryPick] version --- designer-demo/public/mock/bundle.json | 14674 ++++++++++++------------ scripts/buildMaterials.mjs | 14 + scripts/connection.mjs | 101 +- 3 files changed, 7462 insertions(+), 7327 deletions(-) diff --git a/designer-demo/public/mock/bundle.json b/designer-demo/public/mock/bundle.json index ee66a20aa4..3716aa6fa9 100644 --- a/designer-demo/public/mock/bundle.json +++ b/designer-demo/public/mock/bundle.json @@ -3,15 +3,233 @@ "framework": "Vue", "materials": { "components": [ + { + "icon": "link", + "name": { + "zh_CN": "提示框" + }, + "component": "a", + "description": "链接", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "group": "component", + "priority": 7, + "npm": {}, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "children", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlTextConfigurator", + "props": {} + }, + "description": { + "zh_CN": "类型" + }, + "labelPosition": "none" + }, + { + "property": "href", + "label": { + "text": { + "zh_CN": "链接" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "指定链接的 URL" + }, + "labelPosition": "left" + }, + { + "property": "target", + "label": { + "text": { + "zh_CN": "打开方式" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "当前页面", + "value": "_self" + }, + { + "label": "打开新页面", + "value": "_blank" + } + ] + } + }, + "description": { + "zh_CN": "指定链接的打开方式,例如在当前窗口中打开或在新窗口中打开。" + } + }, + { + "property": "attributes3", + "label": { + "text": { + "zh_CN": "原生属性" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlAttributesConfigurator", + "props": {} + }, + "description": { + "zh_CN": "原生属性" + }, + "labelPosition": "none" + } + ] + } + ] + }, + "configure": { + "loop": true, + "condition": true, + "slots": [], + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [], + "disable": [] + } + } + }, + { + "icon": "button", + "name": { + "zh_CN": "Button" + }, + "component": "button", + "container": false, + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": {}, + "group": "component", + "priority": 70, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "attributes3", + "label": { + "text": { + "zh_CN": "原生属性" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlAttributesConfigurator", + "props": {} + }, + "description": { + "zh_CN": "原生属性" + }, + "labelPosition": "none" + } + ] + } + ], + "events": { + "onClick": { + "label": { + "zh_CN": "点击时触发" + }, + "description": { + "zh_CN": "点击时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "shortcuts": { + "properties": [] + }, + "contentMenu": { + "actions": [] + } + }, + "configure": { + "isContainer": true + } + }, { "id": 1, "version": "2.4.2", "name": { - "zh_CN": "输入框" + "zh_CN": "按钮" }, - "component": "ElInput", - "icon": "input", - "description": "通过鼠标或键盘输入字符", + "component": "ElButton", + "icon": "button", + "description": "常用的操作按钮", "doc_url": "", "screenshot": "", "tags": "", @@ -19,15 +237,18 @@ "dev_mode": "proCode", "npm": { "package": "element-plus", - "exportName": "ElInput" + "exportName": "ElButton", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, - "group": "表单组件", - "category": "element-plus", + "group": "基础组件", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": false, + "isContainer": true, "isModal": false, "isPopper": false, "nestingRule": { @@ -58,27 +279,6 @@ "zh_CN": "基础属性" }, "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "绑定值" - } - }, - "description": { - "zh_CN": "绑定值" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, { "property": "size", "label": { @@ -138,265 +338,10 @@ } }, { - "property": "placeholder", + "property": "plain", "label": { "text": { - "zh_CN": "占位文本" - } - }, - "description": { - "zh_CN": "输入框占位文本" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "I18nConfigurator", - "props": {} - }, - "device": [] - }, - { - "property": "maxlength", - "label": { - "text": { - "zh_CN": "最大长度" - } - }, - "description": { - "zh_CN": "最大输入长度" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "number", - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "device": [] - }, - { - "property": "disabled", - "label": { - "text": { - "zh_CN": "是否禁用" - } - }, - "description": { - "zh_CN": "是否禁用" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "device": [] - } - ], - "description": { - "zh_CN": "" - } - } - ], - "events": { - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定值改变时触发" - }, - "description": { - "zh_CN": "双向绑定值改变时触发" - } - }, - "onBlur": { - "label": { - "zh_CN": "输入框失去焦点时触发" - }, - "description": { - "zh_CN": "输入框失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - }, - "slots": { - "prefix": { - "label": { - "zh_CN": "头部内容" - }, - "description": { - "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" - } - }, - "suffix": { - "label": { - "zh_CN": "尾部内容" - }, - "description": { - "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" - } - }, - "prepend": { - "label": { - "zh_CN": "前置内容" - }, - "description": { - "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" - } - }, - "append": { - "label": { - "zh_CN": "后置内容" - }, - "description": { - "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" - } - } - } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "按钮" - }, - "component": "ElButton", - "icon": "button", - "description": "常用的操作按钮", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElButton" - }, - "group": "基础组件", - "category": "element-plus", - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "isPopper": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["type", "size"] - }, - "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEevent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ - { - "name": "0", - "label": { - "zh_CN": "基础属性" - }, - "content": [ - { - "property": "size", - "label": { - "text": { - "zh_CN": "尺寸" - } - }, - "description": { - "zh_CN": "尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } - }, - { - "property": "type", - "label": { - "text": { - "zh_CN": "类型" - } - }, - "description": { - "zh_CN": "类型" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "plain", - "label": { - "text": { - "zh_CN": "朴素按钮" + "zh_CN": "朴素按钮" } }, "description": { @@ -585,12 +530,20 @@ "zh_CN": "自定义默认内容" } }, - "loading": { + "icon": { "label": { - "zh_CN": "loading" + "zh_CN": "图标" }, "description": { - "zh_CN": "自定义加载中组件" + "zh_CN": "按钮图标" + } + }, + "loading": { + "label": { + "zh_CN": "loading" + }, + "description": { + "zh_CN": "自定义加载中组件" } } } @@ -612,10 +565,13 @@ "dev_mode": "proCode", "npm": { "package": "element-plus", - "exportName": "ElForm" + "exportName": "ElForm", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, @@ -1063,10 +1019,13 @@ "dev_mode": "proCode", "npm": { "package": "element-plus", - "exportName": "ElFormItem" + "exportName": "ElFormItem", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, @@ -1396,11 +1355,11 @@ "id": 1, "version": "2.4.2", "name": { - "zh_CN": "表单" + "zh_CN": "输入框" }, - "component": "ElTable", - "icon": "table", - "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "component": "ElInput", + "icon": "input", + "description": "通过鼠标或键盘输入字符", "doc_url": "", "screenshot": "", "tags": "", @@ -1408,10 +1367,13 @@ "dev_mode": "proCode", "npm": { "package": "element-plus", - "exportName": "ElTable" + "exportName": "ElInput", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, - "group": "数据展示", - "category": "element-plus", + "group": "表单组件", "configure": { "loop": true, "condition": true, @@ -1420,7 +1382,7 @@ "isModal": false, "isPopper": false, "nestingRule": { - "childWhitelist": ["ElTableColumn"], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -1429,7 +1391,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": ["type", "size"] }, "contextMenu": { "actions": ["copy", "remove", "insert", "updateAttr", "bindEevent", "createBlock"], @@ -1448,954 +1410,137 @@ }, "content": [ { - "property": "data", + "property": "modelValue", "label": { "text": { - "zh_CN": "数据" + "zh_CN": "绑定值" } }, "description": { - "zh_CN": "显示的数据" + "zh_CN": "绑定值" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", + "type": "string", "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } + "component": "InputConfigurator", + "props": {} } }, { - "property": "columns", + "property": "size", "label": { "text": { - "zh_CN": "表格列配置" + "zh_CN": "尺寸" } }, + "description": { + "zh_CN": "尺寸" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "properties": [ - { - "label": { - "zh_CN": "默认分组" - }, - "content": [ - { - "property": "type", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "type" - } - }, - "description": { - "text": { - "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "selection", - "value": "selection" - }, - { - "label": "index", - "value": "index" - }, - { - "label": "expand", - "value": "expand" - } - ] - } - } - }, - { - "property": "index", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "index" - } - }, - "description": { - "text": { - "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } - }, - { - "property": "label", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "label" - } - }, - "description": { - "text": { - "zh_CN": "显示的标题" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "column-key", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "column-key" - } - }, - "description": { - "text": { - "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "prop", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "prop" - } - }, - "description": { - "text": { - "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "width", - "type": "number", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "width" - } - }, - "description": { - "text": { - "zh_CN": "对应列的宽度" - } - }, - "widget": { - "component": "NumberConfigurator", - "props": {} - } - }, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ { - "property": "min-width", - "type": "number", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "min-width" - } - }, - "description": { - "text": { - "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" - } - }, - "widget": { - "component": "NumberConfigurator", - "props": {} - } + "label": "large", + "value": "large" }, { - "property": "fixed", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "fixed" - } - }, - "description": { - "text": { - "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "label": "default", + "value": "default" }, { - "property": "sortable", - "type": "boolean", - "labelPosition": "left", - "label": { - "text": { - "zh_CN": "sortable" - } - }, - "description": { - "text": { - "zh_CN": "对应列是否可以排序" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "sort-method", - "type": "function", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-method" - } - }, - "description": { - "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } - }, - { - "property": "sort-by", - "type": "array", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-by" - } - }, - "description": { - "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, - { - "property": "sort-orders", - "type": "array", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-orders" - } - }, - "description": { - "text": { - "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, - { - "property": "resizable", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "resizable" - } - }, - "description": { - "text": { - "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "formatter", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "formatter" - } - }, - "description": { - "text": { - "zh_CN": "用来格式化内容" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "dataType": "JSFunction" - } - } - }, - { - "property": "show-overflow-tooltip", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "show-overflow-tooltip" - } - }, - "description": { - "text": { - "zh_CN": "当内容过长被隐藏时显示 tooltip" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "align" - } - }, - "description": { - "text": { - "zh_CN": "对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } - }, - { - "property": "header-align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "header-align" - } - }, - "description": { - "text": { - "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } - }, - { - "property": "class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "class-name" - } - }, - "description": { - "text": { - "zh_CN": "列的 className" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "label-class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "label-class-name" - } - }, - "description": { - "text": { - "zh_CN": "当前列标题的自定义类名" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "selectable", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "selectable" - } - }, - "description": { - "text": { - "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } - }, - { - "property": "reserve-selection", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "reserve-selection" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "filters", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filters" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, - { - "property": "filter-placement", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "filter-placement" - } - }, - "description": { - "text": { - "zh_CN": "过滤弹出框的定位" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "filter-multiple", - "type": "string", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-multiple" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤的选项是否多选" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "filter-method", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-method" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } - }, - { - "property": "filtered-value", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filtered-value" - } - }, - "description": { - "text": { - "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - } - ] - } - ], - "widget": { - "component": "TableColumnsConfigurator", - "props": { - "type": "object", - "textField": "label", - "language": "json", - "buttonText": "编辑列配置", - "title": "编辑列配置", - "expand": true - } - }, - "description": { - "zh_CN": "表格列的配置信息" - }, - "labelPosition": "top" - }, - { - "property": "max-height", - "label": { - "text": { - "zh_CN": "最大高度" - } - }, - "description": { - "zh_CN": "Table 的最大高度。" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "number", - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "device": [] - }, - { - "property": "height", - "label": { - "text": { - "zh_CN": "表格高度" - } - }, - "description": { - "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "device": [] - }, - { - "property": "stripe", - "label": { - "text": { - "zh_CN": "斑马纹" - } - }, - "description": { - "zh_CN": "是否为斑马纹 table" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "border", - "label": { - "text": { - "zh_CN": "纵向边框" - } - }, - "description": { - "zh_CN": "是否带有纵向边框" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "size", - "label": { - "text": { - "zh_CN": "表格尺寸" - } - }, - "description": { - "zh_CN": "Table 的尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } - }, - { - "property": "fit", - "label": { - "text": { - "zh_CN": "列宽自撑开" - } - }, - "description": { - "zh_CN": "列的宽度是否自撑开" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "show-header", - "label": { - "text": { - "zh_CN": "显示表头" - } - }, - "description": { - "zh_CN": "是否显示表头" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "highlight-current-row", - "label": { - "text": { - "zh_CN": "高亮当前行" - } - }, - "description": { - "zh_CN": "是否要高亮当前行" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "current-row-key", - "label": { - "text": { - "zh_CN": "当前行的 key" - } - }, - "description": { - "zh_CN": "当前行的 key,只写属性" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "device": [] + "label": "small", + "value": "small" + } + ] + } + } }, { - "property": "row-class-name", + "property": "type", "label": { "text": { - "zh_CN": "行的类名" + "zh_CN": "类型" } }, "description": { - "zh_CN": "行的 className" + "zh_CN": "类型" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, "labelPosition": "left", + "type": "string", "widget": { "component": "InputConfigurator", "props": {} - }, - "device": [] + } }, { - "property": "row-key", + "property": "placeholder", "label": { "text": { - "zh_CN": "行数据的 Key" + "zh_CN": "占位文本" } }, "description": { - "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + "zh_CN": "输入框占位文本" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", + "type": "string", "widget": { - "component": "CodeConfigurator", + "component": "I18nConfigurator", "props": {} }, "device": [] }, { - "property": "empty-text", + "property": "maxlength", "label": { "text": { - "zh_CN": "空数据文本" + "zh_CN": "最大长度" } }, "description": { - "zh_CN": "空数据时显示的文本内容" + "zh_CN": "最大输入长度" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, "labelPosition": "left", + "type": "number", "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "device": [] }, { - "property": "table-layout", - "label": { - "text": { - "zh_CN": "表格布局方式" - } - }, - "description": { - "zh_CN": "设置表格单元、行和列的布局方式" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", - "defaultValue": "fixed", - "widget": { - "component": "InputConfigurator", - "props": { - "options": [ - { - "label": "fixed", - "value": "fixed" - }, - { - "label": "auto", - "value": "auto" - } - ] - } - }, - "device": [] - }, - { - "property": "scrollbar-always-on", + "property": "disabled", "label": { "text": { - "zh_CN": "显示滚动条" + "zh_CN": "是否禁用" } }, "description": { - "zh_CN": "总是显示滚动条" + "zh_CN": "是否禁用" }, "required": true, "readOnly": false, @@ -2407,29 +1552,8 @@ "widget": { "component": "CheckBoxConfigurator", "props": {} - } - }, - { - "property": "flexible", - "label": { - "text": { - "zh_CN": "主轴最小尺寸" - } - }, - "description": { - "zh_CN": "确保主轴的最小尺寸,以便不超过内容" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "device": [] } ], "description": { @@ -2438,188 +1562,69 @@ } ], "events": { - "onSelect": { + "onUpdate:modelValue": { "label": { - "zh_CN": "勾选数据行的 Checkbox 时触发" + "zh_CN": "双向绑定值改变时触发" }, "description": { - "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "selection", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项" - } - }, - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" - } - } - ], - "returns": {} + "zh_CN": "双向绑定值改变时触发" } }, - "onSelectAll": { + "onBlur": { "label": { - "zh_CN": "勾选全选时触发" + "zh_CN": "输入框失去焦点时触发" }, "description": { - "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + "zh_CN": "输入框失去焦点时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "selection", + "name": "event", "type": "Object", "defaultValue": "", "description": { - "zh_CN": "当前选中项" + "zh_CN": "原生 event" } } ], "returns": {} - } - }, - "onSelectionChange": { - "label": { - "zh_CN": "选择项发生变化时会触发" - }, - "description": { - "zh_CN": "当选择项发生变化时会触发该事件" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "selection", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项" - } - } - ], - "returns": {} - } - }, - "onCellMouseEnter": { + "defaultValue": "" + } + }, + "slots": { + "prefix": { "label": { - "zh_CN": "单元格 hover 时会触发" + "zh_CN": "头部内容" }, "description": { - "zh_CN": "当单元格 hover 进入时会触发该事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" - } - }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } - }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" - } - }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" - } - } - ], - "returns": {} + "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" } }, - "onCellMouseLeave": { + "suffix": { "label": { - "zh_CN": "单元格 hover 退出时会触发" + "zh_CN": "尾部内容" }, "description": { - "zh_CN": "当单元格 hover 退出时会触发该事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" - } - }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } - }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" - } - }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" - } - } - ], - "returns": {} - } - } - }, - "slots": { - "empty": { + "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" + } + }, + "prepend": { "label": { - "zh_CN": "empty" + "zh_CN": "前置内容" }, "description": { - "zh_CN": "当数据为空时自定义的内容" + "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" } }, "append": { "label": { - "zh_CN": "append" + "zh_CN": "后置内容" }, "description": { - "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" } } } @@ -2631,7 +1636,7 @@ "name": { "zh_CN": "表单" }, - "component": "ElTableColumn", + "component": "ElTable", "icon": "table", "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", "doc_url": "", @@ -2641,10 +1646,13 @@ "dev_mode": "proCode", "npm": { "package": "element-plus", - "exportName": "ElTableColumn" + "exportName": "ElTable", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, - "group": "表单组件", - "category": "element-plus", + "group": "数据展示", "configure": { "loop": true, "condition": true, @@ -2653,7 +1661,7 @@ "isModal": false, "isPopper": false, "nestingRule": { - "childWhitelist": "", + "childWhitelist": ["ElTableColumn"], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -2679,791 +1687,1217 @@ "label": { "zh_CN": "基础属性" }, - "content": [], - "description": { - "zh_CN": "" - } - } - ], - "events": {}, - "slots": {} - } - }, - { - "name": { - "zh_CN": "走马灯子项" - }, - "component": "TinyCarouselItem", - "icon": "carouselitem", - "description": "常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "CarouselItem" - }, - "group": "component", - "category": "容器组件", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, "content": [ { - "property": "name", + "property": "data", "label": { "text": { - "zh_CN": "名称" + "zh_CN": "数据" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, "description": { - "zh_CN": "幻灯片的名字,可用作 setActiveItem 的参数" - }, - "labelPosition": "left" - }, - { - "property": "title", - "label": { - "text": { - "zh_CN": "标题" - } + "zh_CN": "显示的数据" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "top", "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "幻灯片的标题" - }, - "labelPosition": "left" + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } }, { - "property": "indicator-position", + "property": "columns", "label": { "text": { - "zh_CN": "指示器位置" + "zh_CN": "表格列配置" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ + "properties": [ + { + "label": { + "zh_CN": "默认分组" + }, + "content": [ + { + "property": "type", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "type" + } + }, + "description": { + "text": { + "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "selection", + "value": "selection" + }, + { + "label": "index", + "value": "index" + }, + { + "label": "expand", + "value": "expand" + } + ] + } + } + }, + { + "property": "index", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "index" + } + }, + "description": { + "text": { + "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "label", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "label" + } + }, + "description": { + "text": { + "zh_CN": "显示的标题" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "column-key", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "column-key" + } + }, + "description": { + "text": { + "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "prop", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "prop" + } + }, + "description": { + "text": { + "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的宽度" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "min-width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "min-width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "fixed", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "fixed" + } + }, + "description": { + "text": { + "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "sortable", + "type": "boolean", + "labelPosition": "left", + "label": { + "text": { + "zh_CN": "sortable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以排序" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "sort-method", + "type": "function", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-method" + } + }, + "description": { + "text": { + "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "sort-by", + "type": "array", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-by" + } + }, + "description": { + "text": { + "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "sort-orders", + "type": "array", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-orders" + } + }, + "description": { + "text": { + "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "resizable", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "resizable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "formatter", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "formatter" + } + }, + "description": { + "text": { + "zh_CN": "用来格式化内容" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + } + }, + { + "property": "show-overflow-tooltip", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "show-overflow-tooltip" + } + }, + "description": { + "text": { + "zh_CN": "当内容过长被隐藏时显示 tooltip" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "align", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "align" + } + }, + "description": { + "text": { + "zh_CN": "对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "header-align", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "header-align" + } + }, + "description": { + "text": { + "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "class-name", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "class-name" + } + }, + "description": { + "text": { + "zh_CN": "列的 className" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, { - "label": "outside", - "value": "outside" + "property": "label-class-name", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "label-class-name" + } + }, + "description": { + "text": { + "zh_CN": "当前列标题的自定义类名" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } }, { - "label": "none", - "value": "none" - } - ] - } - }, - "description": { - "zh_CN": "指示器的位置" - }, - "labelPosition": "left" - } - ] - } - ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": [], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["disabled", "size"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "name": { - "zh_CN": "走马灯" - }, - "component": "TinyCarousel", - "icon": "carousel", - "description": "常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Carousel" - }, - "group": "component", - "category": "容器组件", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "arrow", - "label": { - "text": { - "zh_CN": "箭头显示时机" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": { - "options": [ + "property": "selectable", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "selectable" + } + }, + "description": { + "text": { + "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, { - "label": "总是显示", - "value": "always" + "property": "reserve-selection", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "reserve-selection" + } + }, + "description": { + "text": { + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } }, { - "label": "鼠标悬停时显示", - "value": "hover" + "property": "filters", + "type": "array", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filters" + } + }, + "description": { + "text": { + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } }, { - "label": "从不显示", - "value": "never" - } - ] - } - }, - "description": { - "zh_CN": "切换箭头的显示时机" - } - }, - { - "property": "autoplay", - "label": { - "text": { - "zh_CN": "自动切换" + "property": "filter-placement", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "filter-placement" + } + }, + "description": { + "text": { + "zh_CN": "过滤弹出框的定位" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "filter-multiple", + "type": "string", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filter-multiple" + } + }, + "description": { + "text": { + "zh_CN": "数据过滤的选项是否多选" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "filter-method", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filter-method" + } + }, + "description": { + "text": { + "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "filtered-value", + "type": "array", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filtered-value" + } + }, + "description": { + "text": { + "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + } + ] } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, + ], "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "TableColumnsConfigurator", + "props": { + "type": "object", + "textField": "label", + "language": "json", + "buttonText": "编辑列配置", + "title": "编辑列配置", + "expand": true + } }, "description": { - "zh_CN": "是否自动切换" + "zh_CN": "表格列的配置信息" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "tabs", + "property": "max-height", "label": { "text": { - "zh_CN": "选项卡" + "zh_CN": "最大高度" } }, + "description": { + "zh_CN": "Table 的最大高度。" + }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": "", "cols": 12, - "bindState": false, + "labelPosition": "left", + "type": "number", "widget": { - "component": "ContainerConfigurator", + "component": "NumberConfigurator", "props": {} }, - "description": { - "zh_CN": "tabs 选项卡" - }, - "labelPosition": "none" + "device": [] }, { "property": "height", "label": { "text": { - "zh_CN": "高度" + "zh_CN": "表格高度" } }, + "description": { + "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "type": "string", "widget": { "component": "InputConfigurator", "props": {} }, - "description": { - "zh_CN": "走马灯的高度" - } + "device": [] }, { - "property": "indicator-position", + "property": "stripe", "label": { "text": { - "zh_CN": "位置" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": { - "options": [ - { - "label": "走马灯外部", - "value": "outside" - }, - { - "label": "不显示", - "value": "none" - } - ] + "zh_CN": "斑马纹" } }, "description": { - "zh_CN": "指示器的位置" - } - }, - { - "property": "initial-index", - "label": { - "text": { - "zh_CN": "初始索引" - } + "zh_CN": "是否为斑马纹 table" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} - }, - "description": { - "zh_CN": "初始状态激活的幻灯片的索引,从 0 开始 " } }, { - "property": "interval", + "property": "border", "label": { "text": { - "zh_CN": "自动切换间隔" + "zh_CN": "纵向边框" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, "description": { - "zh_CN": "自动切换的时间间隔,单位为毫秒" - } - }, - { - "property": "loop", - "label": { - "text": { - "zh_CN": "循环显示" - } + "zh_CN": "是否带有纵向边框" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", "widget": { "component": "CheckBoxConfigurator", "props": {} - }, - "description": { - "zh_CN": "是否循环显示" - }, - "labelPosition": "left" + } }, { - "property": "show-title", + "property": "size", "label": { "text": { - "zh_CN": "显示标题" + "zh_CN": "表格尺寸" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, "description": { - "zh_CN": "是否显示标题" - }, - "labelPosition": "left" - }, - { - "property": "trigger", - "label": { - "text": { - "zh_CN": "触发方式" - } + "zh_CN": "Table 的尺寸" }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", "widget": { - "component": "InputConfigurator", + "component": "SelectConfigurator", "props": { "options": [ { - "label": "点击", - "value": "click" + "label": "large", + "value": "large" }, { - "label": "悬停", - "value": "hover" + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" } ] } - }, - "description": { - "zh_CN": "指示器的触发方式,默认为 hover" } }, { - "property": "type", + "property": "fit", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "列宽自撑开" } }, + "description": { + "zh_CN": "列的宽度是否自撑开" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": { - "options": [ - { - "label": "水平", - "value": "horizontal" - }, - { - "label": "垂直", - "value": "vertical" - }, - { - "label": "卡片", - "value": "card" - } - ] - } - }, - "description": { - "zh_CN": "走马灯的类型" - } - } - ] - } - ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "clickCapture": false, - "isModal": false, - "nestingRule": { - "childWhitelist": ["TinyCarouselItem"], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["disabled", "size"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "link", - "name": { - "zh_CN": "提示框" - }, - "component": "a", - "description": "链接", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "group": "component", - "priority": 7, - "npm": {}, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, { - "property": "children", + "property": "show-header", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "显示表头" } }, + "description": { + "zh_CN": "是否显示表头" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", "widget": { - "component": "HtmlTextConfigurator", + "component": "CheckBoxConfigurator", "props": {} + } + }, + { + "property": "highlight-current-row", + "label": { + "text": { + "zh_CN": "高亮当前行" + } }, "description": { - "zh_CN": "类型" + "zh_CN": "是否要高亮当前行" }, - "labelPosition": "none" + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } }, { - "property": "href", + "property": "current-row-key", "label": { "text": { - "zh_CN": "链接" + "zh_CN": "当前行的 key" } }, + "description": { + "zh_CN": "当前行的 key,只写属性" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "top", + "type": "string", "widget": { "component": "InputConfigurator", "props": {} }, - "description": { - "zh_CN": "指定链接的 URL" - }, - "labelPosition": "left" + "device": [] }, { - "property": "target", + "property": "row-class-name", "label": { "text": { - "zh_CN": "打开方式" + "zh_CN": "行的类名" } }, + "description": { + "zh_CN": "行的 className" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ - { - "label": "当前页面", - "value": "_self" - }, - { - "label": "打开新页面", - "value": "_blank" - } - ] - } + "component": "InputConfigurator", + "props": {} }, - "description": { - "zh_CN": "指定链接的打开方式,例如在当前窗口中打开或在新窗口中打开。" - } + "device": [] }, { - "property": "attributes3", + "property": "row-key", "label": { "text": { - "zh_CN": "原生属性" + "zh_CN": "行数据的 Key" } }, + "description": { + "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "top", "widget": { - "component": "HtmlAttributesConfigurator", + "component": "CodeConfigurator", "props": {} }, - "description": { - "zh_CN": "原生属性" - }, - "labelPosition": "none" - } - ] - } - ] - }, - "configure": { - "loop": true, - "condition": true, - "slots": [], - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": [] - }, - "contextMenu": { - "actions": [], - "disable": [] - } - } - }, - { - "name": { - "zh_CN": "标题" - }, - "component": ["h1", "h2", "h3", "h4", "h5", "h6"], - "icon": "h16", - "description": "标题", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": {}, - "group": "component", - "category": "html", - "priority": 20, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "device": [] + }, { - "property": "children", + "property": "empty-text", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "空数据文本" } }, + "description": { + "zh_CN": "空数据时显示的文本内容" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", "widget": { - "component": "HtmlTextConfigurator", - "props": { - "showRadioButton": true - } - }, - "description": { - "zh_CN": "" + "component": "InputConfigurator", + "props": {} }, - "labelPosition": "none" + "device": [] }, { - "property": "attributes3", + "property": "table-layout", "label": { "text": { - "zh_CN": "原生属性" + "zh_CN": "表格布局方式" } }, + "description": { + "zh_CN": "设置表格单元、行和列的布局方式" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "top", + "defaultValue": "fixed", "widget": { - "component": "HtmlAttributesConfigurator", - "props": {} - }, - "description": { - "zh_CN": "" - }, - "labelPosition": "none" - } - ] - } - ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": [], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["disabled", "size"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "name": { - "zh_CN": "段落" - }, - "component": "p", - "icon": "paragraph", - "description": "段落", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": {}, - "group": "component", - "category": "html", - "priority": 30, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "component": "InputConfigurator", + "props": { + "options": [ + { + "label": "fixed", + "value": "fixed" + }, + { + "label": "auto", + "value": "auto" + } + ] + } + }, + "device": [] + }, { - "property": "children", + "property": "scrollbar-always-on", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "显示滚动条" } }, + "description": { + "zh_CN": "总是显示滚动条" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", "widget": { - "component": "HtmlTextConfigurator", + "component": "CheckBoxConfigurator", "props": {} - }, - "description": { - "zh_CN": "类型" - }, - "labelPosition": "none" + } }, { - "property": "attributes3", + "property": "flexible", "label": { "text": { - "zh_CN": "原生属性" + "zh_CN": "主轴最小尺寸" } }, + "description": { + "zh_CN": "确保主轴的最小尺寸,以便不超过内容" + }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", "widget": { - "component": "HtmlAttributesConfigurator", + "component": "CheckBoxConfigurator", "props": {} - }, - "description": { - "zh_CN": "原生属性" - }, - "labelPosition": "none" + } } - ] + ], + "description": { + "zh_CN": "" + } } ], - "events": {} + "events": { + "onSelect": { + "label": { + "zh_CN": "勾选数据行的 Checkbox 时触发" + }, + "description": { + "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + }, + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + } + ], + "returns": {} + } + }, + "onSelectAll": { + "label": { + "zh_CN": "勾选全选时触发" + }, + "description": { + "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onSelectionChange": { + "label": { + "zh_CN": "选择项发生变化时会触发" + }, + "description": { + "zh_CN": "当选择项发生变化时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onCellMouseEnter": { + "label": { + "zh_CN": "单元格 hover 时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 进入时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + }, + "onCellMouseLeave": { + "label": { + "zh_CN": "单元格 hover 退出时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 退出时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + } + }, + "slots": { + "empty": { + "label": { + "zh_CN": "empty" + }, + "description": { + "zh_CN": "当数据为空时自定义的内容" + } + }, + "append": { + "label": { + "zh_CN": "append" + }, + "description": { + "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElTableColumn", + "icon": "table", + "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElTableColumn", + "version": "2.4.2", + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css", + "destructuring": true }, + "group": "表单组件", "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, "isModal": false, + "isPopper": false, "nestingRule": { - "childWhitelist": [], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -3472,30 +2906,47 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": [] + "properties": ["inline", "label-width"] }, "contextMenu": { - "actions": [], + "actions": ["copy", "remove", "insert", "updateAttr", "bindEevent", "createBlock"], "disable": [] - } + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": {} } }, { + "icon": "form", "name": { - "zh_CN": "输入框" + "zh_CN": "表单" }, - "component": "input", - "icon": "input", - "description": "输入框", - "docUrl": "", + "component": "form", + "container": false, "screenshot": "", "tags": "", "keywords": "", "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 40, + "priority": 100, "schema": { "properties": [ { @@ -3507,10 +2958,10 @@ }, "content": [ { - "property": "type", + "property": "name", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "名称" } }, "required": true, @@ -3518,101 +2969,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "checkbox", - "value": "checkbox" - }, - { - "label": "color", - "value": "color" - }, - { - "label": "date", - "value": "date" - }, - { - "label": "button", - "value": "button" - }, - { - "label": "email", - "value": "email" - }, - { - "label": "file", - "value": "file" - }, - { - "label": "hidden", - "value": "hidden" - }, - { - "label": "image", - "value": "image" - }, - { - "label": "month", - "value": "month" - }, - { - "label": "number", - "value": "number" - }, - { - "label": "password", - "value": "password" - }, - { - "label": "radio", - "value": "radio" - }, - { - "label": "range", - "value": "range" - }, - { - "label": "reset", - "value": "reset" - }, - { - "label": "search", - "value": "search" - }, - { - "label": "submit", - "value": "submit" - }, - { - "label": "text", - "value": "text" - }, - { - "label": "time", - "value": "time" - }, - { - "label": "week", - "value": "week" - }, - { - "label": "url", - "value": "url" - } - ] - } + "component": "InputConfigurator", + "props": {} }, "description": { - "zh_CN": "类型" + "zh_CN": "表单的名称" } }, { - "property": "placeholder", + "property": "action", "label": { "text": { - "zh_CN": "占位符" + "zh_CN": "提交地址" } }, "required": true, @@ -3624,14 +2992,14 @@ "props": {} }, "description": { - "zh_CN": "占位符" + "zh_CN": "提交表单时向何处发送表单数据" } }, { - "property": "attributes3", + "property": "method", "label": { "text": { - "zh_CN": "原生属性" + "zh_CN": "HTTP方法" } }, "required": true, @@ -3639,88 +3007,125 @@ "disabled": false, "cols": 12, "widget": { - "component": "HtmlAttributesConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "get", + "value": "get" + }, + { + "label": "post", + "value": "post" + } + ] + } }, "description": { - "zh_CN": "原生属性" - }, - "labelPosition": "none" + "zh_CN": "用于发送 form-data 的 HTTP 方法" + } } ] } ], "events": { - "onBlur": { + "onClick": { "label": { - "zh_CN": "失去焦点时触发" + "zh_CN": "点击时触发" }, "description": { - "zh_CN": "在 Input 失去焦点时触发" + "zh_CN": "点击时触发" }, "type": "event", "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], + "params": [], "returns": {} }, "defaultValue": "" - }, - "onFocus": { + } + }, + "shortcuts": { + "properties": [] + }, + "contentMenu": { + "actions": [] + } + }, + "configure": { + "isContainer": true + } + }, + { + "name": { + "zh_CN": "标题" + }, + "component": ["h1", "h2", "h3", "h4", "h5", "h6"], + "icon": "h16", + "description": "标题", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": {}, + "group": "component", + "priority": 20, + "schema": { + "properties": [ + { "label": { - "zh_CN": "获取焦点时触发" + "zh_CN": "基础信息" }, "description": { - "zh_CN": "在 Input 获取焦点时触发" + "zh_CN": "基础信息" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" + "content": [ + { + "property": "children", + "label": { + "text": { + "zh_CN": "类型" } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onChange": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlTextConfigurator", + "props": { + "showRadioButton": true } - } - ], - "returns": {} - }, - "defaultValue": "" + }, + "description": { + "zh_CN": "" + }, + "labelPosition": "none" + }, + { + "property": "attributes3", + "label": { + "text": { + "zh_CN": "原生属性" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlAttributesConfigurator", + "props": {} + }, + "description": { + "zh_CN": "" + }, + "labelPosition": "none" + } + ] } - } + ], + "events": {} }, "configure": { "loop": true, @@ -3747,21 +3152,19 @@ } }, { + "icon": "Image", "name": { - "zh_CN": "视频" + "zh_CN": "Img" }, - "component": "video", - "icon": "video", - "description": "视频", - "docUrl": "", + "component": "Img", + "container": false, "screenshot": "", "tags": "", "keywords": "", "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 50, + "priority": 60, "schema": { "properties": [ { @@ -3774,101 +3177,24 @@ "content": [ { "property": "src", + "type": "string", + "defaultValue": "", + "bindState": true, "label": { "text": { "zh_CN": "资源" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "视频的 URL" - } - }, - { - "property": "width", - "label": { - "text": { - "zh_CN": "播放器宽度" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "视频播放器的宽度" - } - }, - { - "property": "height", - "label": { - "text": { - "zh_CN": "播放器高度" - } - }, - "required": true, - "readOnly": false, - "disabled": false, "cols": 12, + "rules": [], "widget": { "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "视频播放器的高度" + "zh_CN": "src路径" } }, - { - "property": "controls", - "label": { - "text": { - "zh_CN": "显示控件" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否显示控件" - }, - "labelPosition": "left" - }, - { - "property": "autoplay", - "label": { - "text": { - "zh_CN": "马上播放" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否马上播放" - }, - "labelPosition": "left" - }, { "property": "attributes3", "label": { @@ -3892,47 +3218,30 @@ ] } ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": [], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", + "events": {}, "shortcuts": { - "properties": [] + "properties": ["src"] }, - "contextMenu": { - "actions": [], - "disable": [] + "contentMenu": { + "actions": [] } } }, { - "icon": "Image", "name": { - "zh_CN": "Img" + "zh_CN": "输入框" }, - "component": "Img", - "container": false, + "component": "input", + "icon": "input", + "description": "输入框", + "docUrl": "", "screenshot": "", "tags": "", "keywords": "", "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 60, + "priority": 40, "schema": { "properties": [ { @@ -3944,30 +3253,112 @@ }, "content": [ { - "property": "src", - "type": "string", - "defaultValue": "", - "bindState": true, + "property": "type", "label": { "text": { - "zh_CN": "资源" + "zh_CN": "类型" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "checkbox", + "value": "checkbox" + }, + { + "label": "color", + "value": "color" + }, + { + "label": "date", + "value": "date" + }, + { + "label": "button", + "value": "button" + }, + { + "label": "email", + "value": "email" + }, + { + "label": "file", + "value": "file" + }, + { + "label": "hidden", + "value": "hidden" + }, + { + "label": "image", + "value": "image" + }, + { + "label": "month", + "value": "month" + }, + { + "label": "number", + "value": "number" + }, + { + "label": "password", + "value": "password" + }, + { + "label": "radio", + "value": "radio" + }, + { + "label": "range", + "value": "range" + }, + { + "label": "reset", + "value": "reset" + }, + { + "label": "search", + "value": "search" + }, + { + "label": "submit", + "value": "submit" + }, + { + "label": "text", + "value": "text" + }, + { + "label": "time", + "value": "time" + }, + { + "label": "week", + "value": "week" + }, + { + "label": "url", + "value": "url" + } + ] } }, - "cols": 12, - "rules": [], - "widget": { - "component": "InputConfigurator", - "props": {} - }, "description": { - "zh_CN": "src路径" + "zh_CN": "类型" } }, { - "property": "attributes3", + "property": "placeholder", "label": { "text": { - "zh_CN": "原生属性" + "zh_CN": "占位符" } }, "required": true, @@ -3975,51 +3366,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "HtmlAttributesConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "原生属性" - }, - "labelPosition": "none" - } - ] - } - ], - "events": {}, - "shortcuts": { - "properties": ["src"] - }, - "contentMenu": { - "actions": [] - } - } - }, - { - "icon": "button", - "name": { - "zh_CN": "Button" - }, - "component": "button", - "container": false, - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": {}, - "group": "component", - "category": "html", - "priority": 70, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "zh_CN": "占位符" + } + }, { "property": "attributes3", "label": { @@ -4044,38 +3397,107 @@ } ], "events": { - "onClick": { + "onBlur": { "label": { - "zh_CN": "点击时触发" + "zh_CN": "失去焦点时触发" }, "description": { - "zh_CN": "点击时触发" + "zh_CN": "在 Input 失去焦点时触发" }, "type": "event", "functionInfo": { - "params": [], + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onChange": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], "returns": {} }, "defaultValue": "" } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": [], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", "shortcuts": { - "properties": [] + "properties": ["disabled", "size"] }, - "contentMenu": { - "actions": [] + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] } - }, - "configure": { - "isContainer": true } }, { - "icon": "table", + "icon": "label", "name": { - "zh_CN": "表格" + "zh_CN": "表单标签" }, - "component": "table", + "component": "label", "container": false, "screenshot": "", "tags": "", @@ -4083,8 +3505,7 @@ "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 80, + "priority": 110, "schema": { "properties": [ { @@ -4096,10 +3517,10 @@ }, "content": [ { - "property": "width", + "property": "for", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "label绑定表单元素" } }, "required": true, @@ -4111,14 +3532,14 @@ "props": {} }, "description": { - "zh_CN": "表格的宽度" + "zh_CN": "label 绑定到哪个表单元素" } }, { - "property": "border", + "property": "form", "label": { "text": { - "zh_CN": "边框宽度" + "zh_CN": "label字段所属表单" } }, "required": true, @@ -4130,48 +3551,13 @@ "props": {} }, "description": { - "zh_CN": "表格边框的宽度" + "zh_CN": "label 字段所属的一个或多个表单" } - }, - { - "property": "attributes3", - "label": { - "text": { - "zh_CN": "原生属性" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "HtmlAttributesConfigurator", - "props": {} - }, - "description": { - "zh_CN": "原生属性" - }, - "labelPosition": "none" } ] } ], - "events": { - "onClick": { - "label": { - "zh_CN": "点击时触发" - }, - "description": { - "zh_CN": "点击时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - } - }, + "events": {}, "shortcuts": { "properties": [] }, @@ -4181,54 +3567,35 @@ } }, { - "icon": "td", "name": { - "zh_CN": "表格单元格" + "zh_CN": "段落" }, - "component": "td", - "container": false, + "component": "p", + "icon": "paragraph", + "description": "段落", + "docUrl": "", "screenshot": "", "tags": "", "keywords": "", "devMode": "proCode", - "npm": {}, - "group": "component", - "category": "html", - "priority": 90, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "colspan", - "label": { - "text": { - "zh_CN": "合并列" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "单元格可横跨的列数" - } - }, + "npm": {}, + "group": "component", + "priority": 30, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "rowspan", + "property": "children", "label": { "text": { - "zh_CN": "合并行" + "zh_CN": "类型" } }, "required": true, @@ -4236,12 +3603,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "HtmlTextConfigurator", "props": {} }, "description": { - "zh_CN": "单元格可横跨的行数" - } + "zh_CN": "类型" + }, + "labelPosition": "none" }, { "property": "attributes3", @@ -4266,36 +3634,38 @@ ] } ], - "events": { - "onClick": { - "label": { - "zh_CN": "点击时触发" - }, - "description": { - "zh_CN": "点击时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - } + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": [], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", "shortcuts": { "properties": [] }, - "contentMenu": { - "actions": [] + "contextMenu": { + "actions": [], + "disable": [] } } }, { - "icon": "form", + "icon": "table", "name": { - "zh_CN": "表单" + "zh_CN": "表格" }, - "component": "form", + "component": "table", "container": false, "screenshot": "", "tags": "", @@ -4303,8 +3673,7 @@ "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 100, + "priority": 80, "schema": { "properties": [ { @@ -4316,10 +3685,10 @@ }, "content": [ { - "property": "name", + "property": "width", "label": { "text": { - "zh_CN": "名称" + "zh_CN": "宽度" } }, "required": true, @@ -4331,14 +3700,14 @@ "props": {} }, "description": { - "zh_CN": "表单的名称" + "zh_CN": "表格的宽度" } }, { - "property": "action", + "property": "border", "label": { "text": { - "zh_CN": "提交地址" + "zh_CN": "边框宽度" } }, "required": true, @@ -4350,14 +3719,14 @@ "props": {} }, "description": { - "zh_CN": "提交表单时向何处发送表单数据" + "zh_CN": "表格边框的宽度" } }, { - "property": "method", + "property": "attributes3", "label": { "text": { - "zh_CN": "HTTP方法" + "zh_CN": "原生属性" } }, "required": true, @@ -4365,23 +3734,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "get", - "value": "get" - }, - { - "label": "post", - "value": "post" - } - ] - } + "component": "HtmlAttributesConfigurator", + "props": {} }, "description": { - "zh_CN": "用于发送 form-data 的 HTTP 方法" - } + "zh_CN": "原生属性" + }, + "labelPosition": "none" } ] } @@ -4408,17 +3767,14 @@ "contentMenu": { "actions": [] } - }, - "configure": { - "isContainer": true } }, { - "icon": "label", + "icon": "td", "name": { - "zh_CN": "表单标签" + "zh_CN": "表格单元格" }, - "component": "label", + "component": "td", "container": false, "screenshot": "", "tags": "", @@ -4426,8 +3782,7 @@ "devMode": "proCode", "npm": {}, "group": "component", - "category": "html", - "priority": 110, + "priority": 90, "schema": { "properties": [ { @@ -4439,10 +3794,10 @@ }, "content": [ { - "property": "for", + "property": "colspan", "label": { "text": { - "zh_CN": "label绑定表单元素" + "zh_CN": "合并列" } }, "required": true, @@ -4450,18 +3805,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "label 绑定到哪个表单元素" + "zh_CN": "单元格可横跨的列数" } }, { - "property": "form", + "property": "rowspan", "label": { "text": { - "zh_CN": "label字段所属表单" + "zh_CN": "合并行" } }, "required": true, @@ -4469,135 +3824,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "label 字段所属的一个或多个表单" - } - } - ] - } - ], - "events": {}, - "shortcuts": { - "properties": [] - }, - "contentMenu": { - "actions": [] - } - } - }, - { - "name": { - "zh_CN": "按钮组" - }, - "component": "TinyButtonGroup", - "icon": "buttonGroup", - "description": "以按钮组的方式出现,常用于多项类似操作", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "ButtonGroup" - }, - "group": "component", - "category": "general", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "data", - "label": { - "text": { - "zh_CN": "数据" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - }, - "description": { - "zh_CN": "配置按钮组数据" + "zh_CN": "单元格可横跨的行数" } }, { - "property": "size", - "label": { - "text": { - "zh_CN": "大小" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "mini", - "value": "mini" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "medium", - "value": "medium" - } - ] - } - }, - "description": { - "zh_CN": "组件大小" - }, - "labelPosition": "left" - }, - { - "property": "plain", - "label": { - "text": { - "zh_CN": "朴素按钮" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否是朴素按钮" - }, - "labelPosition": "left" - }, - { - "property": "disabled", + "property": "attributes3", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "原生属性" } }, "required": true, @@ -4605,50 +3843,48 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "HtmlAttributesConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "原生属性" }, - "labelPosition": "left" + "labelPosition": "none" } ] } ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": [], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" + "events": { + "onClick": { + "label": { + "zh_CN": "点击时触发" + }, + "description": { + "zh_CN": "点击时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [] }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "contentMenu": { + "actions": [] } } }, { - "icon": "row", + "icon": "breadcrumb", "name": { - "zh_CN": "row" + "zh_CN": "面包屑" }, - "component": "TinyRow", - "description": "定义 Layout 的行配置信息", + "component": "TinyBreadcrumb", + "description": "告诉访问者他们目前在网站中的位置以及如何返回", "docUrl": "", "screenshot": "", "tags": "", @@ -4656,10 +3892,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Row" + "exportName": "Breadcrumb", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 5, + "priority": 1, "schema": { "properties": [ { @@ -4671,27 +3911,30 @@ }, "content": [ { - "property": "layout", + "property": "separator", "label": { "text": { - "zh_CN": "布局" + "zh_CN": "分隔符" } }, + "required": true, + "readOnly": false, + "disabled": false, "cols": 12, "widget": { - "component": "LayoutGridConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "选择布局方式" + "zh_CN": "自定义分隔符" }, - "labelPosition": "none" + "labelPosition": "left" }, { - "property": "align", + "property": "options", "label": { "text": { - "zh_CN": "子项对齐方式" + "zh_CN": "配置数据" } }, "required": true, @@ -4699,33 +3942,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "CodeConfigurator", "props": { - "options": [ - { - "label": "top", - "value": "top" - }, - { - "label": "middle", - "value": "middle" - }, - { - "label": "bottom", - "value": "bottom" - } - ] + "language": "json" } }, "description": { - "zh_CN": "子项的副轴对齐方向,可取值:top, middle, bottom" - } + "zh_CN": "单独使用 Breadcrumb,通过 option 配置生成面包屑" + }, + "labelPosition": "top" }, { - "property": "flex", + "property": "textField", "label": { "text": { - "zh_CN": "flex容器" + "zh_CN": "键值" } }, "required": true, @@ -4733,54 +3964,52 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "是否为flex容器" + "zh_CN": "指定面包屑的显示键值,结合 options 使用" }, "labelPosition": "left" - }, - { - "property": "gutter", - "label": { - "text": { - "zh_CN": "子项间隔" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "子项的间隔的像素" - } } ] } - ] + ], + "events": { + "onSelect": { + "label": { + "zh_CN": "选择 breadcrumb 时触发" + }, + "description": { + "zh_CN": "选择 breadcrumb 时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + } }, "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, + "clickCapture": false, "isModal": false, "nestingRule": { - "childWhitelist": [], - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" + "childWhitelist": ["TinyBreadcrumbItem"], + "parentWhitelist": [], + "descendantBlacklist": [], + "ancestorWhitelist": [] }, "isNullNode": false, "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": ["separator"] }, "contextMenu": { "actions": ["create symbol"], @@ -4789,12 +4018,12 @@ } }, { - "icon": "row", + "icon": "breadcrumb", "name": { - "zh_CN": "row" + "zh_CN": "面包屑项" }, - "component": "TinyLayout", - "description": "定义 Layout 的行配置信息", + "component": "TinyBreadcrumbItem", + "description": "", "docUrl": "", "screenshot": "", "tags": "", @@ -4802,12 +4031,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Layout", + "exportName": "BreadcrumbItem", "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", "destructuring": true }, "group": "component", - "priority": 5, + "priority": 1, "schema": { "properties": [ { @@ -4819,41 +4050,13 @@ }, "content": [ { - "property": "cols", - "label": { - "text": { - "zh_CN": "总栅格数" - } - }, - "cols": 12, - "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ - { - "label": "12", - "value": 12 - }, - { - "label": "24", - "value": 24 - } - ] - } - }, - "description": { - "zh_CN": "选择总栅格数" - }, - "labelPosition": "none" - }, - { - "property": "tag", + "property": "to", "label": { "text": { - "zh_CN": "layout渲染的标签" + "zh_CN": "路由跳转" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, @@ -4862,12 +4065,22 @@ "props": {} }, "description": { - "zh_CN": "定义Layout元素渲染后的标签,默认为 div" + "zh_CN": "路由跳转对象,同 vue-router 的 to" } } ] } - ] + ], + "slots": { + "default": { + "label": { + "zh_CN": "面包屑项标签" + }, + "description": { + "zh_CN": "面包屑项" + } + } + } }, "configure": { "loop": true, @@ -4876,8 +4089,8 @@ "isContainer": true, "isModal": false, "nestingRule": { - "childWhitelist": ["TinyRow", "TinyCol"], - "parentWhitelist": "", + "childWhitelist": "", + "parentWhitelist": ["TinyBreadcrumb"], "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -4885,7 +4098,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled"] + "properties": ["to"] }, "contextMenu": { "actions": ["create symbol"], @@ -4894,12 +4107,12 @@ } }, { - "icon": "form", "name": { - "zh_CN": "表单" + "zh_CN": "按钮" }, - "component": "TinyForm", - "description": "由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据", + "component": "TinyButton", + "icon": "button", + "description": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型", "docUrl": "", "screenshot": "", "tags": "", @@ -4907,10 +4120,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Form" + "exportName": "Button", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 5, + "priority": 2, "schema": { "properties": [ { @@ -4921,6 +4138,71 @@ "zh_CN": "基础信息" }, "content": [ + { + "property": "text", + "type": "string", + "defaultValue": "按钮文案", + "label": { + "text": { + "zh_CN": "按钮文字" + } + }, + "cols": 12, + "hidden": false, + "required": true, + "readOnly": false, + "disabled": false, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "按钮文字" + }, + "labelPosition": "left" + }, + { + "property": "size", + "type": "select", + "label": { + "text": { + "zh_CN": "大小" + } + }, + "cols": 12, + "rules": [], + "hidden": false, + "required": true, + "readOnly": false, + "disabled": false, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "按钮大小" + }, + "labelPosition": "left" + }, { "property": "disabled", "label": { @@ -4937,15 +4219,15 @@ "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "是否被禁用" }, "labelPosition": "left" }, { - "property": "label-width", + "property": "type", "label": { "text": { - "zh_CN": "标签宽度" + "zh_CN": "类型" } }, "required": true, @@ -4953,19 +4235,54 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "primary", + "value": "primary" + }, + { + "label": "success", + "value": "success" + }, + { + "label": "info", + "value": "info" + }, + { + "label": "warning", + "value": "warning" + }, + { + "label": "danger", + "value": "danger" + }, + { + "label": "text", + "value": "text" + } + ] + } }, "description": { - "zh_CN": "表单中标签占位宽度,默认为 80px" + "zh_CN": "设置不同的主题样式" }, "labelPosition": "left" - }, + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ { - "property": "inline", + "property": "round", "label": { "text": { - "zh_CN": "行内布局" + "zh_CN": "圆角" } }, "required": true, @@ -4977,15 +4294,15 @@ "props": {} }, "description": { - "zh_CN": "行内布局模式,默认为 false" + "zh_CN": "是否圆角按钮" }, "labelPosition": "left" }, { - "property": "label-align", + "property": "plain", "label": { "text": { - "zh_CN": "必填标识占位" + "zh_CN": "朴素按钮" } }, "required": true, @@ -4997,15 +4314,15 @@ "props": {} }, "description": { - "zh_CN": "必填标识 * 是否占位" + "zh_CN": "是否为朴素按钮" }, "labelPosition": "left" }, { - "property": "label-suffix", + "property": "reset-time", "label": { "text": { - "zh_CN": "标签后缀" + "zh_CN": "禁用时间" } }, "required": true, @@ -5013,19 +4330,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "表单中标签后缀" + "zh_CN": "设置禁用时间,防止重复提交,单位毫秒" }, "labelPosition": "left" }, { - "property": "label-position", + "property": "circle", "label": { "text": { - "zh_CN": "标签位置" + "zh_CN": "圆形按钮" } }, "required": true, @@ -5033,42 +4350,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "right", - "value": "right" - }, - { - "label": "left ", - "value": "left " - }, - { - "label": "top", - "value": "top" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "表单中标签的布局位置" + "zh_CN": "是否圆形按钮" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "校验属性" - }, - "content": [ + }, { - "property": "model", + "property": "autofocus", "label": { "text": { - "zh_CN": "数据对象" + "zh_CN": "自动聚焦" } }, "required": true, @@ -5076,19 +4370,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "表单数据对象" + "zh_CN": "是否默认聚焦" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "rules", + "property": "loading", "label": { "text": { - "zh_CN": "校验规则" + "zh_CN": "加载中样式" } }, "required": true, @@ -5096,119 +4390,27 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "表单验证规则" - }, - "labelPosition": "top" - } - ], - "description": { - "zh_CN": "" - } - } - ], - "events": { - "onValidate": { - "label": { - "zh_CN": "表单项被校验后触发" - }, - "description": { - "zh_CN": "表单项被校验后触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "function", - "type": "Function", - "defaultValue": "(valid) => {}", - "description": { - "zh_CN": "校验回调函数" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框输入的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onClear": { + "zh_CN": "是否展示位加载中样式" + }, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onClick": { "label": { - "zh_CN": "点击清空按钮时触发" + "zh_CN": "点击事件" }, "description": { - "zh_CN": "点击清空按钮时触发" + "zh_CN": "按钮被点击时触发的回调函数" }, "type": "event", "functionInfo": { @@ -5226,7 +4428,7 @@ "isContainer": false, "isModal": false, "nestingRule": { - "childWhitelist": [], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -5235,7 +4437,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": ["text", "size"] }, "contextMenu": { "actions": ["create symbol"], @@ -5244,12 +4446,12 @@ } }, { - "icon": "formitem", "name": { - "zh_CN": "表单项" + "zh_CN": "按钮组" }, - "component": "TinyFormItem", - "description": "由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据", + "component": "TinyButtonGroup", + "icon": "buttonGroup", + "description": "以按钮组的方式出现,常用于多项类似操作", "docUrl": "", "screenshot": "", "tags": "", @@ -5257,10 +4459,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "FormItem" + "exportName": "ButtonGroup", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 12, + "priority": 2, "schema": { "properties": [ { @@ -5272,31 +4478,66 @@ }, "content": [ { - "property": "label", + "property": "data", "label": { "text": { - "zh_CN": "标签文本" + "zh_CN": "数据" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": "标签", "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "language": "json" + } }, "description": { - "zh_CN": "标签文本" + "zh_CN": "配置按钮组数据" + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "大小" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "mini", + "value": "mini" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "medium", + "value": "medium" + } + ] + } + }, + "description": { + "zh_CN": "组件大小" }, "labelPosition": "left" }, { - "property": "prop", + "property": "plain", "label": { "text": { - "zh_CN": "校验字段" + "zh_CN": "朴素按钮" } }, "required": true, @@ -5304,19 +4545,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "表单域 model 字段,在使用 validate、resetFields 方法的情况下,该属性是必填的" + "zh_CN": "是否是朴素按钮" }, "labelPosition": "left" }, { - "property": "required", + "property": "disabled", "label": { "text": { - "zh_CN": "必填" + "zh_CN": "禁用" } }, "required": true, @@ -5328,34 +4569,24 @@ "props": {} }, "description": { - "zh_CN": "是否必填" + "zh_CN": "是否禁用" }, "labelPosition": "left" } ] } ], - "events": {}, - "slots": { - "label": { - "label": { - "zh_CN": "字段名" - }, - "description": { - "zh_CN": "自定义显示字段名称" - } - } - } + "events": {} }, "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, "nestingRule": { - "childWhitelist": "", - "parentWhitelist": ["TinyForm"], + "childWhitelist": [], + "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -5363,7 +4594,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label", "rules"] + "properties": ["disabled", "size"] }, "contextMenu": { "actions": ["create symbol"], @@ -5372,12 +4603,12 @@ } }, { - "icon": "col", "name": { - "zh_CN": "col" + "zh_CN": "走马灯" }, - "component": "TinyCol", - "description": "列配置信息", + "component": "TinyCarousel", + "icon": "carousel", + "description": "常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。", "docUrl": "", "screenshot": "", "tags": "", @@ -5385,7 +4616,11 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Col" + "exportName": "Carousel", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", "priority": 2, @@ -5400,10 +4635,10 @@ }, "content": [ { - "property": "span", + "property": "arrow", "label": { "text": { - "zh_CN": "栅格列格数" + "zh_CN": "箭头显示时机" } }, "required": true, @@ -5411,41 +4646,33 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "InputConfigurator", "props": { "options": [ { - "label": "整行", - "value": 12 - }, - { - "label": "6格", - "value": 6 - }, - { - "label": "4格", - "value": 4 + "label": "总是显示", + "value": "always" }, { - "label": "3格", - "value": 3 + "label": "鼠标悬停时显示", + "value": "hover" }, { - "label": "1格", - "value": 1 + "label": "从不显示", + "value": "never" } ] } }, "description": { - "zh_CN": "当一行分为12格时,一列可占位多少格" + "zh_CN": "切换箭头的显示时机" } }, { - "property": "move", + "property": "autoplay", "label": { "text": { - "zh_CN": "栅格移动格数" + "zh_CN": "自动切换" } }, "required": true, @@ -5453,86 +4680,41 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "min": -12, - "max": 12 - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "栅格左右移动格数(正数向右,负数向左)" - } - }, - { - "property": "no", - "label": { - "text": { - "zh_CN": "排序编号" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "max": 12 - } + "zh_CN": "是否自动切换" }, - "description": { - "zh_CN": "排序编号(row中启用order生效)" - } + "labelPosition": "left" }, { - "property": "offset", + "property": "tabs", "label": { "text": { - "zh_CN": "间隔格数" + "zh_CN": "选项卡" } }, "required": true, "readOnly": false, "disabled": false, + "defaultValue": "", "cols": 12, + "bindState": false, "widget": { - "component": "NumberConfigurator", - "props": { - "min": 0, - "max": 12 - } + "component": "ContainerConfigurator", + "props": {} }, "description": { - "zh_CN": "栅格左侧的间隔格数" - } - }, - { - "property": "xs", - "label": { - "text": { - "zh_CN": "超小屏格数" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "min": 1, - "max": 12 - } + "zh_CN": "tabs 选项卡" }, - "description": { - "zh_CN": "<768px 响应式栅格数" - } + "labelPosition": "none" }, { - "property": "sm", + "property": "height", "label": { "text": { - "zh_CN": "小屏格数" + "zh_CN": "高度" } }, "required": true, @@ -5540,21 +4722,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "min": 1, - "max": 12 - } + "component": "InputConfigurator", + "props": {} }, "description": { - "zh_CN": "≥768px 响应式栅格数" + "zh_CN": "走马灯的高度" } }, { - "property": "md", + "property": "indicator-position", "label": { "text": { - "zh_CN": "中屏格数" + "zh_CN": "位置" } }, "required": true, @@ -5562,21 +4741,29 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": { - "min": 1, - "max": 12 + "options": [ + { + "label": "走马灯外部", + "value": "outside" + }, + { + "label": "不显示", + "value": "none" + } + ] } }, "description": { - "zh_CN": "≥992px 响应式栅格数" + "zh_CN": "指示器的位置" } }, { - "property": "lg", + "property": "initial-index", "label": { "text": { - "zh_CN": "大屏格数" + "zh_CN": "初始索引" } }, "required": true, @@ -5585,20 +4772,17 @@ "cols": 12, "widget": { "component": "NumberConfigurator", - "props": { - "min": 1, - "max": 12 - } + "props": {} }, "description": { - "zh_CN": "≥1200px 响应式栅格数" + "zh_CN": "初始状态激活的幻灯片的索引,从 0 开始 " } }, { - "property": "xl", + "property": "interval", "label": { "text": { - "zh_CN": "超大屏格数" + "zh_CN": "自动切换间隔" } }, "required": true, @@ -5607,142 +4791,57 @@ "cols": 12, "widget": { "component": "NumberConfigurator", - "props": { - "min": 1, - "max": 12 - } + "props": {} }, "description": { - "zh_CN": "≥1920px 响应式栅格数" + "zh_CN": "自动切换的时间间隔,单位为毫秒" } - } - ] - } - ], - "events": {} - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["label", "rules"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "name": { - "zh_CN": "按钮" - }, - "component": "TinyButton", - "icon": "button", - "description": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Button" - }, - "group": "component", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + }, { - "property": "text", - "type": "string", - "defaultValue": "按钮文案", + "property": "loop", "label": { "text": { - "zh_CN": "按钮文字" + "zh_CN": "循环显示" } }, - "cols": 12, - "hidden": false, "required": true, "readOnly": false, "disabled": false, + "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "按钮文字" + "zh_CN": "是否循环显示" }, "labelPosition": "left" }, { - "property": "size", - "type": "select", + "property": "show-title", "label": { "text": { - "zh_CN": "大小" + "zh_CN": "显示标题" } }, - "cols": 12, - "rules": [], - "hidden": false, "required": true, "readOnly": false, "disabled": false, + "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "按钮大小" + "zh_CN": "是否显示标题" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "trigger", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "触发方式" } }, "required": true, @@ -5750,13 +4849,23 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "InputConfigurator", + "props": { + "options": [ + { + "label": "点击", + "value": "click" + }, + { + "label": "悬停", + "value": "hover" + } + ] + } }, "description": { - "zh_CN": "是否被禁用" - }, - "labelPosition": "left" + "zh_CN": "指示器的触发方式,默认为 hover" + } }, { "property": "type", @@ -5770,94 +4879,95 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "InputConfigurator", "props": { "options": [ { - "label": "primary", - "value": "primary" - }, - { - "label": "success", - "value": "success" - }, - { - "label": "info", - "value": "info" - }, - { - "label": "warning", - "value": "warning" + "label": "水平", + "value": "horizontal" }, { - "label": "danger", - "value": "danger" + "label": "垂直", + "value": "vertical" }, { - "label": "text", - "value": "text" + "label": "卡片", + "value": "card" } ] } }, "description": { - "zh_CN": "设置不同的主题样式" - }, - "labelPosition": "left" + "zh_CN": "走马灯的类型" + } } ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ - { - "property": "round", - "label": { - "text": { - "zh_CN": "圆角" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否圆角按钮" - }, - "labelPosition": "left" - }, - { - "property": "plain", - "label": { - "text": { - "zh_CN": "朴素按钮" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否为朴素按钮" - }, - "labelPosition": "left" - }, + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "clickCapture": false, + "isModal": false, + "nestingRule": { + "childWhitelist": ["TinyCarouselItem"], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["disabled", "size"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "name": { + "zh_CN": "走马灯子项" + }, + "component": "TinyCarouselItem", + "icon": "carouselitem", + "description": "常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "CarouselItem", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "reset-time", + "property": "name", "label": { "text": { - "zh_CN": "禁用时间" + "zh_CN": "名称" } }, "required": true, @@ -5865,19 +4975,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "设置禁用时间,防止重复提交,单位毫秒" + "zh_CN": "幻灯片的名字,可用作 setActiveItem 的参数" }, "labelPosition": "left" }, { - "property": "circle", + "property": "title", "label": { "text": { - "zh_CN": "圆形按钮" + "zh_CN": "标题" } }, "required": true, @@ -5885,19 +4995,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "是否圆形按钮" + "zh_CN": "幻灯片的标题" }, "labelPosition": "left" }, { - "property": "autofocus", + "property": "indicator-position", "label": { "text": { - "zh_CN": "自动聚焦" + "zh_CN": "指示器位置" } }, "required": true, @@ -5905,65 +5015,38 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否默认聚焦" - }, - "labelPosition": "left" - }, - { - "property": "loading", - "label": { - "text": { - "zh_CN": "加载中样式" + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "outside", + "value": "outside" + }, + { + "label": "none", + "value": "none" + } + ] } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, "description": { - "zh_CN": "是否展示位加载中样式" + "zh_CN": "指示器的位置" }, "labelPosition": "left" } - ], - "description": { - "zh_CN": "" - } + ] } ], - "events": { - "onClick": { - "label": { - "zh_CN": "点击事件" - }, - "description": { - "zh_CN": "按钮被点击时触发的回调函数" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - } - } + "events": {} }, "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": false, + "isContainer": true, "isModal": false, "nestingRule": { - "childWhitelist": "", + "childWhitelist": [], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -5972,7 +5055,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["text", "size"] + "properties": ["disabled", "size"] }, "contextMenu": { "actions": ["create symbol"], @@ -5981,12 +5064,12 @@ } }, { + "icon": "checkbox", "name": { - "zh_CN": "输入框" + "zh_CN": "复选框" }, - "component": "TinyInput", - "icon": "input", - "description": "通过鼠标或键盘输入字符", + "component": "TinyCheckbox", + "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", "docUrl": "", "screenshot": "", "tags": "", @@ -5994,10 +5077,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Input" + "exportName": "Checkbox", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 1, + "priority": 4, "schema": { "properties": [ { @@ -6020,7 +5107,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6029,56 +5116,10 @@ "labelPosition": "left" }, { - "property": "type", - "label": { - "text": { - "zh_CN": "类型" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "textarea", - "value": "textarea" - }, - { - "label": "text", - "value": "text" - }, - { - "label": "password", - "value": "password" - } - ] - } - }, - "description": { - "zh_CN": "设置input框的type属性" - }, - "labelPosition": "left" - }, - { - "property": "rows", - "label": { - "text": { - "zh_CN": "行数" - } - }, - "widget": { - "component": "NumberConfigurator" - }, - "description": { - "zh_CN": "输入框行数,只对 type='textarea' 有效" - }, - "labelPosition": "left" - }, - { - "property": "placeholder", + "property": "disabled", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "禁用" } }, "required": true, @@ -6086,19 +5127,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "是否禁用" }, "labelPosition": "left" }, { - "property": "clearable", + "property": "checked", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "勾选" } }, "required": true, @@ -6110,15 +5151,15 @@ "props": {} }, "description": { - "zh_CN": "是否显示清除按钮" + "zh_CN": "当前是否勾选" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "text", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "文本" } }, "required": true, @@ -6126,19 +5167,27 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "复选框的文本" }, "labelPosition": "left" - }, + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ { - "property": "size", + "property": "border", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "边框" } }, "required": true, @@ -6146,42 +5195,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "是否显示边框" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "maxlength", + "property": "false-label", "label": { "text": { - "zh_CN": "最大输入长度" + "zh_CN": "未选中的值" } }, "required": true, @@ -6189,18 +5215,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "设置 input 框的maxLength" - } + "zh_CN": "没有选中时的值" + }, + "labelPosition": "left" }, { - "property": "autofocus", + "property": "true-label", "label": { "text": { - "zh_CN": "自动聚焦" + "zh_CN": "选择时的值" } }, "required": true, @@ -6208,11 +5235,11 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "自动获取焦点" + "zh_CN": "选中时的值" }, "labelPosition": "left" } @@ -6225,33 +5252,10 @@ "events": { "onChange": { "label": { - "zh_CN": "值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框改变后的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" + "zh_CN": "勾选值改变后将触发" }, "description": { - "zh_CN": "在 Input 输入值改变时触发" + "zh_CN": "勾选值改变后将触发" }, "type": "event", "functionInfo": { @@ -6261,7 +5265,7 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "输入框输入的值" + "zh_CN": "选中项的值" } } ], @@ -6274,7 +5278,7 @@ "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "在 Input 输入值改变时触发" + "zh_CN": "当前选中的值改变时触发" }, "type": "event", "functionInfo": { @@ -6284,85 +5288,13 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" + "zh_CN": "双向绑定的当前选中值" } } ], "returns": {} }, "defaultValue": "" - }, - "onClear": { - "label": { - "zh_CN": "点击清空按钮时触发" - }, - "description": { - "zh_CN": "点击清空按钮时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - } - }, - "slots": { - "prefix": { - "label": { - "zh_CN": "前置内容" - } - }, - "suffix": { - "label": { - "zh_CN": "后置内容" - } } } }, @@ -6382,7 +5314,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["value", "disabled"] + "properties": ["border", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -6391,12 +5323,12 @@ } }, { - "icon": "radio", + "icon": "checkboxbutton", "name": { - "zh_CN": "单选" + "zh_CN": "复选按钮" }, - "component": "TinyRadio", - "description": "用于配置不同场景的选项,在一组备选项中进行单选", + "component": "TinyCheckboxButton", + "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", "docUrl": "", "screenshot": "", "tags": "", @@ -6404,10 +5336,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Radio" + "exportName": "CheckboxButton", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 3, + "priority": 1, "schema": { "properties": [ { @@ -6419,10 +5355,10 @@ }, "content": [ { - "property": "text", + "property": "modelValue", "label": { "text": { - "zh_CN": "文本内容" + "zh_CN": "绑定值" } }, "required": true, @@ -6434,14 +5370,15 @@ "props": {} }, "description": { - "zh_CN": "单选框文本内容" - } + "zh_CN": "双向绑定的当前选中值" + }, + "labelPosition": "left" }, { - "property": "label", + "property": "disabled", "label": { "text": { - "zh_CN": "选中值" + "zh_CN": "禁用" } }, "required": true, @@ -6449,12 +5386,162 @@ "disabled": false, "cols": 12, "widget": { + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "radio 选中时的值" - } + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "checked", + "label": { + "text": { + "zh_CN": "勾选" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "当前是否勾选" + }, + "labelPosition": "left" }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "按钮文本" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "勾选值改变后将触发" + }, + "description": { + "zh_CN": "勾选值改变后将触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "选中项的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "当前选中的值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "array", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的当前选中值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["text", "size"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "checkboxgroup", + "name": { + "zh_CN": "复选按钮组" + }, + "component": "TinyCheckboxGroup", + "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "CheckboxGroup", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { "property": "modelValue", "label": { @@ -6468,11 +5555,14 @@ "cols": 12, "widget": { "component": "InputConfigurator", - "props": {} + "props": { + "dataType": "Array" + } }, "description": { "zh_CN": "双向绑定的当前选中值" - } + }, + "labelPosition": "left" }, { "property": "disabled", @@ -6493,42 +5583,40 @@ "zh_CN": "是否禁用" }, "labelPosition": "left" - } - ] - }, - { - "label": { - "zh_CN": "其他" - }, - "description": { - "zh_CN": "" - }, - "content": [ + }, { - "property": "border", + "property": "options", "label": { "text": { - "zh_CN": "显示边框" + "zh_CN": "选项列表" } }, + "defaultValue": [ + { + "label": "标签2" + }, + { + "label": "标签2" + } + ], "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示边框" + "zh_CN": "checkbox组件列表" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "size", + "property": "type", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "类型" } }, "required": true, @@ -6536,31 +5624,24 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "单选框的尺寸,仅在 border 为true时有效" - } - }, - { - "property": "name", - "label": { - "text": { - "zh_CN": "原生name属性" + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "button", + "value": "button" + }, + { + "label": "checkbox", + "value": "checkbox" + } + ] } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, "description": { - "zh_CN": "原生 name 属性" - } + "zh_CN": "checkbox组件类型(button/checkbox),该属性的默认值为 checkbox,配合 options 属性一起使用" + }, + "labelPosition": "left" } ] } @@ -6568,11 +5649,26 @@ "events": { "onChange": { "label": { - "zh_CN": "值变化事件" + "zh_CN": "勾选值改变后将触发" }, "description": { - "zh_CN": "绑定值变化时触发的事件" - } + "zh_CN": "勾选值改变后将触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "选中项的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" }, "onUpdate:modelValue": { "label": { @@ -6586,7 +5682,7 @@ "params": [ { "name": "value", - "type": "string", + "type": "array", "defaultValue": "", "description": { "zh_CN": "双向绑定的当前选中值" @@ -6615,7 +5711,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["visible", "width"] + "properties": ["disabled", "type"] }, "contextMenu": { "actions": ["create symbol"], @@ -6624,12 +5720,12 @@ } }, { - "icon": "select", + "icon": "col", "name": { - "zh_CN": "下拉框" + "zh_CN": "col" }, - "component": "TinySelect", - "description": "Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件", + "component": "TinyCol", + "description": "列配置信息", "docUrl": "", "screenshot": "", "tags": "", @@ -6637,10 +5733,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Select" + "exportName": "Col", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 8, + "priority": 2, "schema": { "properties": [ { @@ -6652,10 +5752,10 @@ }, "content": [ { - "property": "modelValue", + "property": "span", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "栅格列格数" } }, "required": true, @@ -6663,19 +5763,41 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "整行", + "value": 12 + }, + { + "label": "6格", + "value": 6 + }, + { + "label": "4格", + "value": 4 + }, + { + "label": "3格", + "value": 3 + }, + { + "label": "1格", + "value": 1 + } + ] + } }, "description": { - "zh_CN": "双向绑定的当前选中值" - }, - "labelPosition": "left" + "zh_CN": "当一行分为12格时,一列可占位多少格" + } }, { - "property": "placeholder", + "property": "move", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "栅格移动格数" } }, "required": true, @@ -6683,19 +5805,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "min": -12, + "max": 12 + } }, "description": { - "zh_CN": "输入框占位文本" - }, - "labelPosition": "left" + "zh_CN": "栅格左右移动格数(正数向右,负数向左)" + } }, { - "property": "clearable", + "property": "no", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "排序编号" } }, "required": true, @@ -6703,39 +5827,42 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "max": 12 + } }, "description": { - "zh_CN": "是否显示清除按钮" - }, - "labelPosition": "left" + "zh_CN": "排序编号(row中启用order生效)" + } }, { - "property": "searchable", + "property": "offset", "label": { "text": { - "zh_CN": "下拉可搜索" + "zh_CN": "间隔格数" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "min": 0, + "max": 12 + } }, "description": { - "zh_CN": "下拉面板是否可搜索" - }, - "labelPosition": "left" + "zh_CN": "栅格左侧的间隔格数" + } }, { - "property": "disabled", + "property": "xs", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "超小屏格数" } }, "required": true, @@ -6743,19 +5870,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "min": 1, + "max": 12 + } }, "description": { - "zh_CN": "是否禁用" - }, - "labelPosition": "left" + "zh_CN": "<768px 响应式栅格数" + } }, { - "property": "options", + "property": "sm", "label": { "text": { - "zh_CN": "选项数据" + "zh_CN": "小屏格数" } }, "required": true, @@ -6763,21 +5892,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "NumberConfigurator", "props": { - "language": "json" + "min": 1, + "max": 12 } }, "description": { - "zh_CN": "配置 Select 下拉数据项" - }, - "labelPosition": "top" + "zh_CN": "≥768px 响应式栅格数" + } }, { - "property": "multiple", + "property": "md", "label": { "text": { - "zh_CN": "多选" + "zh_CN": "中屏格数" } }, "required": true, @@ -6785,27 +5914,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "min": 1, + "max": 12 + } }, "description": { - "zh_CN": "是否允许输入框输入或选择多个项" - }, - "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + "zh_CN": "≥992px 响应式栅格数" + } + }, { - "property": "multiple-limit", + "property": "lg", "label": { "text": { - "zh_CN": "最大可选值" + "zh_CN": "大屏格数" } }, "required": true, @@ -6814,18 +5937,20 @@ "cols": 12, "widget": { "component": "NumberConfigurator", - "props": {} + "props": { + "min": 1, + "max": 12 + } }, "description": { - "zh_CN": "多选时用户最多可以选择的项目数,为 0 则不限制" - }, - "labelPosition": "left" + "zh_CN": "≥1200px 响应式栅格数" + } }, { - "property": "popper-class", + "property": "xl", "label": { "text": { - "zh_CN": "下拉框类名" + "zh_CN": "超大屏格数" } }, "required": true, @@ -6833,19 +5958,82 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "min": 1, + "max": 12 + } }, "description": { - "zh_CN": "设置下拉框自定义的类名" - }, - "labelPosition": "left" - }, + "zh_CN": "≥1920px 响应式栅格数" + } + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["label", "rules"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "collapse", + "name": { + "zh_CN": "折叠面板" + }, + "component": "TinyCollapse", + "description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Collapse", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 3, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "collapse-tags", + "property": "modelValue", "label": { "text": { - "zh_CN": "多选展示" + "zh_CN": "当前激活面板" } }, "required": true, @@ -6853,37 +6041,33 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "多选时是否将选中值按文字的形式展示" - }, - "labelPosition": "left" + "zh_CN": "双向绑定当前激活的面板" + } } - ], - "description": { - "zh_CN": "" - } + ] } ], "events": { "onChange": { "label": { - "zh_CN": "值改变时触发" + "zh_CN": "激活面板改变时触发" }, "description": { - "zh_CN": "在下拉框值改变时触发" + "zh_CN": "当前激活面板改变时触发(如果是手风琴模式,参数 activeNames 类型为string,否则为array)" }, "type": "event", "functionInfo": { "params": [ { - "name": "value", + "name": "data", "type": "string", "defaultValue": "", "description": { - "zh_CN": "下拉框选中项的值" + "zh_CN": "当前激活面板的值" } } ], @@ -6896,7 +6080,7 @@ "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "当前选中的值改变时触发" + "zh_CN": "当前激活面板的值改变时触发" }, "type": "event", "functionInfo": { @@ -6906,105 +6090,132 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的当前选中值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" + "zh_CN": "双向绑定的值" } } ], "returns": {} }, "defaultValue": "" - }, - "onClear": { - "label": { - "zh_CN": "点击清空按钮时触发" - }, - "description": { - "zh_CN": "点击清空按钮时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - }, - "onRemoveTag": { + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["label-width", "disabled"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "collapseitem", + "name": { + "zh_CN": "折叠面板项" + }, + "component": "TinyCollapseItem", + "description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "CollapseItem", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 2, + "schema": { + "properties": [ + { "label": { - "zh_CN": "多选模式下移除tag时触发" + "zh_CN": "基础信息" }, "description": { - "zh_CN": "多选模式下移除tag时触发" + "zh_CN": "基础信息" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "被移除Tag对应数据项的值字段" + "content": [ + { + "property": "name", + "label": { + "text": { + "zh_CN": "唯一标识符" } - } - ], - "returns": {} + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "唯一标识符: String | Number" + }, + "labelPosition": "left" + }, + { + "property": "title", + "label": { + "text": { + "zh_CN": "标题" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "面板标题" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {}, + "slots": { + "title": { + "label": { + "zh_CN": "标题" }, - "defaultValue": "" + "description": { + "zh_CN": "自定义标题" + } } - }, - "onBeforeMount": "console.log('table on load'); this.options = source.data" + } }, "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": false, + "isContainer": true, "isModal": false, "nestingRule": { "childWhitelist": "", @@ -7016,7 +6227,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["multiple", "options"] + "properties": ["label-width", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -7025,12 +6236,12 @@ } }, { - "icon": "switch", "name": { - "zh_CN": "开关" + "zh_CN": "日期选择" }, - "component": "TinySwitch", - "description": "Switch 在两种状态间切换选择", + "component": "TinyDatePicker", + "icon": "datepick", + "description": "用于输入或选择日期", "docUrl": "", "screenshot": "", "tags": "", @@ -7038,10 +6249,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Switch" + "exportName": "DatePicker", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 9, + "priority": 1, "schema": { "properties": [ { @@ -7053,10 +6268,10 @@ }, "content": [ { - "property": "disabled", + "property": "modelValue", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "绑定值" } }, "required": true, @@ -7064,19 +6279,58 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "是否被禁用" + "zh_CN": "双向绑定值" }, "labelPosition": "left" }, { - "property": "modelValue", + "property": "type", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } + }, + "description": { + "zh_CN": "设置日期框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" } }, "required": true, @@ -7084,19 +6338,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "绑定默认值" + "zh_CN": "输入框占位文本" }, "labelPosition": "left" }, { - "property": "true-value", + "property": "clearable", "label": { "text": { - "zh_CN": "设置打开值" + "zh_CN": "清除按钮" } }, "required": true, @@ -7104,39 +6358,39 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "设置打开时的值(Boolean / String / Number)" + "zh_CN": "是否显示清除按钮" }, "labelPosition": "left" }, { - "property": "false-value", + "property": "disabled", "label": { "text": { - "zh_CN": "设置关闭值" + "zh_CN": "禁用" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "设置关闭时的值(Boolean / String / Number)" + "zh_CN": "是否禁用" }, "labelPosition": "left" }, { - "property": "mini", + "property": "readonly", "label": { "text": { - "zh_CN": "迷你尺寸" + "zh_CN": "只读" } }, "required": true, @@ -7148,24 +6402,141 @@ "props": {} }, "description": { - "zh_CN": "是否显示为 mini 模式" + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" }, "labelPosition": "left" } ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ + { + "property": "maxlength", + "label": { + "text": { + "zh_CN": "输入最大长度" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "设置 input 框的maxLength" + } + }, + { + "property": "autofocus", + "label": { + "text": { + "zh_CN": "聚焦" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "自动获取焦点" + }, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "" + } } ], "events": { "onChange": { "label": { - "zh_CN": "点击事件" + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在 Input 值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框改变后的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" }, "description": { - "zh_CN": "按钮被点击时触发的回调函数" + "zh_CN": "在 Input 输入值改变时触发" }, "type": "event", "functionInfo": { - "params": [], + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框输入的值" + } + } + ], "returns": {} }, "defaultValue": "" @@ -7175,7 +6546,7 @@ "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "开关的状态值改变时触发" + "zh_CN": "在 Input 输入值改变时触发" }, "type": "event", "functionInfo": { @@ -7185,13 +6556,73 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的开关状态值" + "zh_CN": "双向绑定的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" } } ], "returns": {} }, "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" } } }, @@ -7199,7 +6630,7 @@ "loop": true, "condition": true, "styles": true, - "isContainer": false, + "isContainer": true, "isModal": false, "nestingRule": { "childWhitelist": "", @@ -7211,7 +6642,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "mini"] + "properties": ["value", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -7220,12 +6651,12 @@ } }, { - "icon": "search", + "icon": "dialogbox", "name": { - "zh_CN": "搜索框" + "zh_CN": "对话框" }, - "component": "TinySearch", - "description": "指定条件对象进行搜索数据", + "component": "TinyDialogBox", + "description": "模态对话框,在浮层中显示,引导用户进行相关操作。", "docUrl": "", "screenshot": "", "tags": "", @@ -7233,10 +6664,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Search" + "exportName": "DialogBox", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 2, + "priority": 4, "schema": { "properties": [ { @@ -7248,10 +6683,10 @@ }, "content": [ { - "property": "modelValue", + "property": "title", "label": { "text": { - "zh_CN": "默认值" + "zh_CN": "标题" } }, "required": true, @@ -7263,15 +6698,15 @@ "props": {} }, "description": { - "zh_CN": "输入框内的默认搜索值" + "zh_CN": "弹出框标题" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "visible", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "显示与隐藏" } }, "required": true, @@ -7283,15 +6718,15 @@ "props": {} }, "description": { - "zh_CN": "是否被禁用" + "zh_CN": "控制弹出框显示与关闭" }, "labelPosition": "left" }, { - "property": "placeholder", + "property": "width", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "宽度" } }, "required": true, @@ -7303,15 +6738,15 @@ "props": {} }, "description": { - "zh_CN": "输入框内的提示占位文本" + "zh_CN": "弹出框的宽度" }, "labelPosition": "left" }, { - "property": "clearable", + "property": "draggable", "label": { "text": { - "zh_CN": "清空按钮" + "zh_CN": "可拖拽" } }, "required": true, @@ -7323,15 +6758,15 @@ "props": {} }, "description": { - "zh_CN": "设置显示清空图标按钮" + "zh_CN": "是否开启弹窗的拖拽功能,默认值为 false 。" }, "labelPosition": "left" }, { - "property": "isEnterSearch", + "property": "center", "label": { "text": { - "zh_CN": "Enter键触发" + "zh_CN": "居中" } }, "required": true, @@ -7343,23 +6778,35 @@ "props": {} }, "description": { - "zh_CN": "是否在按下键盘Enter键的时候触发search事件" + "zh_CN": "弹出框的头部与底部内容会自动居中" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "mini", + "property": "dialog-class", "label": { "text": { - "zh_CN": "迷你尺寸" + "zh_CN": "自定义类名" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "自定义配置弹窗类名" + }, + "labelPosition": "left" + }, + { + "property": "append-to-body", + "label": { + "text": { + "zh_CN": "插入到Body" } }, "required": true, @@ -7371,15 +6818,15 @@ "props": {} }, "description": { - "zh_CN": "迷你模式,配置为true时,搜索默认显示为一个带图标的圆形按钮,点击后展开" + "zh_CN": "DialogBox 本身是否插入到 body 上,嵌套的 Dialog 必须指定该属性并赋值为 true" }, "labelPosition": "left" }, { - "property": "transparent", + "property": "show-close", "label": { "text": { - "zh_CN": "透明模式" + "zh_CN": "关闭按钮" } }, "required": true, @@ -7391,72 +6838,45 @@ "props": {} }, "description": { - "zh_CN": "配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景,默认 false" + "zh_CN": "是否显示关闭按钮,默认值为 true 。" }, "labelPosition": "left" } - ], - "description": { - "zh_CN": "" - } + ] } ], + "selector": ".TinyDialogBox", "events": { - "onChange": { + "onClose": { "label": { - "zh_CN": "输入完成时触发" + "zh_CN": "关闭弹窗时触发" }, "description": { - "zh_CN": "在 input 框中输入完成时触发的回调函数" + "zh_CN": "Dialog 关闭的回调" }, "type": "event", "functionInfo": { - "params": [ - { - "name": "type", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "搜索类型,默认值为 {} " - } - }, - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "当前input框中值" - } - } - ], + "params": [], "returns": {} }, "defaultValue": "" }, - "onSearch": { + "onUpdate:visible": { "label": { - "zh_CN": "点击搜索按钮时触发" + "zh_CN": "双向绑定的状态改变时触发" }, "description": { - "zh_CN": "展开状态点击搜索按钮时触发的回调函数" + "zh_CN": "显示或隐藏的状态值,发生改变时触发" }, "type": "event", "functionInfo": { "params": [ - { - "name": "type", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "搜索类型,默认值为 {} " - } - }, { "name": "value", - "type": "string", + "type": "boolean", "defaultValue": "", "description": { - "zh_CN": "当前input框中值" + "zh_CN": "双向绑定的显示或隐藏的状态值" } } ], @@ -7464,6 +6884,24 @@ }, "defaultValue": "" } + }, + "slots": { + "title": { + "label": { + "zh_CN": "标题区" + }, + "description": { + "zh_CN": "Dialog 标题区的内容" + } + }, + "footer": { + "label": { + "zh_CN": "按钮操作区" + }, + "description": { + "zh_CN": "Dialog 按钮操作区的内容" + } + } } }, "configure": { @@ -7471,7 +6909,7 @@ "condition": true, "styles": true, "isContainer": false, - "isModal": false, + "isModal": true, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -7480,9 +6918,9 @@ }, "isNullNode": false, "isLayout": false, - "rootSelector": "", + "rootSelector": ".tiny-dialog-box", "shortcuts": { - "properties": ["clearable", "mini"] + "properties": ["visible", "width"] }, "contextMenu": { "actions": ["create symbol"], @@ -7491,12 +6929,12 @@ } }, { - "icon": "checkbox", + "icon": "form", "name": { - "zh_CN": "复选框" + "zh_CN": "表单" }, - "component": "TinyCheckbox", - "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", + "component": "TinyForm", + "description": "由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据", "docUrl": "", "screenshot": "", "tags": "", @@ -7504,10 +6942,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Checkbox" + "exportName": "Form", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 4, + "priority": 5, "schema": { "properties": [ { @@ -7519,10 +6961,30 @@ }, "content": [ { - "property": "modelValue", + "property": "disabled", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "label-width", + "label": { + "text": { + "zh_CN": "标签宽度" } }, "required": true, @@ -7534,15 +6996,15 @@ "props": {} }, "description": { - "zh_CN": "双向绑定值" + "zh_CN": "表单中标签占位宽度,默认为 80px" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "inline", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "行内布局" } }, "required": true, @@ -7554,15 +7016,15 @@ "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "行内布局模式,默认为 false" }, "labelPosition": "left" }, { - "property": "checked", + "property": "label-align", "label": { "text": { - "zh_CN": "勾选" + "zh_CN": "必填标识占位" } }, "required": true, @@ -7574,15 +7036,15 @@ "props": {} }, "description": { - "zh_CN": "当前是否勾选" + "zh_CN": "必填标识 * 是否占位" }, "labelPosition": "left" }, { - "property": "text", + "property": "label-suffix", "label": { "text": { - "zh_CN": "文本" + "zh_CN": "标签后缀" } }, "required": true, @@ -7594,23 +7056,15 @@ "props": {} }, "description": { - "zh_CN": "复选框的文本" + "zh_CN": "表单中标签后缀" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "border", + "property": "label-position", "label": { "text": { - "zh_CN": "边框" + "zh_CN": "标签位置" } }, "required": true, @@ -7618,19 +7072,42 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "right", + "value": "right" + }, + { + "label": "left ", + "value": "left " + }, + { + "label": "top", + "value": "top" + } + ] + } }, "description": { - "zh_CN": "是否显示边框" + "zh_CN": "表单中标签的布局位置" }, "labelPosition": "left" - }, + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "校验属性" + }, + "content": [ { - "property": "false-label", + "property": "model", "label": { "text": { - "zh_CN": "未选中的值" + "zh_CN": "数据对象" } }, "required": true, @@ -7638,19 +7115,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "没有选中时的值" + "zh_CN": "表单数据对象" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "true-label", + "property": "rules", "label": { "text": { - "zh_CN": "选择时的值" + "zh_CN": "校验规则" } }, "required": true, @@ -7658,13 +7135,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "选中时的值" + "zh_CN": "表单验证规则" }, - "labelPosition": "left" + "labelPosition": "top" } ], "description": { @@ -7673,12 +7150,35 @@ } ], "events": { - "onChange": { + "onValidate": { "label": { - "zh_CN": "勾选值改变后将触发" + "zh_CN": "表单项被校验后触发" }, "description": { - "zh_CN": "勾选值改变后将触发" + "zh_CN": "表单项被校验后触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "function", + "type": "Function", + "defaultValue": "(valid) => {}", + "description": { + "zh_CN": "校验回调函数" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" }, "type": "event", "functionInfo": { @@ -7688,7 +7188,7 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "选中项的值" + "zh_CN": "输入框输入的值" } } ], @@ -7696,28 +7196,65 @@ }, "defaultValue": "" }, - "onUpdate:modelValue": { + "onBlur": { "label": { - "zh_CN": "双向绑定的值改变时触发" + "zh_CN": "失去焦点时触发" }, "description": { - "zh_CN": "当前选中的值改变时触发" + "zh_CN": "在 Input 失去焦点时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "value", - "type": "string", + "name": "event", + "type": "Object", "defaultValue": "", "description": { - "zh_CN": "双向绑定的当前选中值" + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" } } ], "returns": {} }, "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" } } }, @@ -7728,7 +7265,7 @@ "isContainer": false, "isModal": false, "nestingRule": { - "childWhitelist": "", + "childWhitelist": [], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -7737,7 +7274,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["border", "disabled"] + "properties": ["label-width", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -7746,12 +7283,12 @@ } }, { - "icon": "checkboxbutton", + "icon": "formitem", "name": { - "zh_CN": "复选按钮" + "zh_CN": "表单项" }, - "component": "TinyCheckboxButton", - "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", + "component": "TinyFormItem", + "description": "由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据", "docUrl": "", "screenshot": "", "tags": "", @@ -7759,10 +7296,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "CheckboxButton" + "exportName": "FormItem", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 1, + "priority": 12, "schema": { "properties": [ { @@ -7774,50 +7315,31 @@ }, "content": [ { - "property": "modelValue", + "property": "label", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "标签文本" } }, "required": true, "readOnly": false, "disabled": false, + "defaultValue": "标签", "cols": 12, "widget": { "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "双向绑定的当前选中值" - }, - "labelPosition": "left" - }, - { - "property": "disabled", - "label": { - "text": { - "zh_CN": "禁用" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否禁用" + "zh_CN": "标签文本" }, "labelPosition": "left" }, { - "property": "checked", + "property": "prop", "label": { "text": { - "zh_CN": "勾选" + "zh_CN": "校验字段" } }, "required": true, @@ -7825,19 +7347,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "当前是否勾选" + "zh_CN": "表单域 model 字段,在使用 validate、resetFields 方法的情况下,该属性是必填的" }, "labelPosition": "left" }, { - "property": "text", + "property": "required", "label": { "text": { - "zh_CN": "文本" + "zh_CN": "必填" } }, "required": true, @@ -7845,63 +7367,26 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "按钮文本" + "zh_CN": "是否必填" }, "labelPosition": "left" } ] } ], - "events": { - "onChange": { - "label": { - "zh_CN": "勾选值改变后将触发" - }, - "description": { - "zh_CN": "勾选值改变后将触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "选中项的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onUpdate:modelValue": { + "events": {}, + "slots": { + "label": { "label": { - "zh_CN": "双向绑定的值改变时触发" + "zh_CN": "字段名" }, "description": { - "zh_CN": "当前选中的值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "array", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的当前选中值" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "zh_CN": "自定义显示字段名称" + } } } }, @@ -7913,7 +7398,7 @@ "isModal": false, "nestingRule": { "childWhitelist": "", - "parentWhitelist": "", + "parentWhitelist": ["TinyForm"], "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -7921,7 +7406,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["text", "size"] + "properties": ["label", "rules"] }, "contextMenu": { "actions": ["create symbol"], @@ -7930,12 +7415,12 @@ } }, { - "icon": "checkboxgroup", + "icon": "grid", "name": { - "zh_CN": "复选按钮组" + "zh_CN": "表格" }, - "component": "TinyCheckboxGroup", - "description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选", + "component": "TinyGrid", + "description": "提供了非常强大数据表格功能,可以展示数据列表,可以对数据列表进行选择、编辑等", "docUrl": "", "screenshot": "", "tags": "", @@ -7943,7 +7428,11 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "CheckboxGroup" + "exportName": "Grid", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", "priority": 2, @@ -7951,17 +7440,17 @@ "properties": [ { "label": { - "zh_CN": "基础信息" + "zh_CN": "基础属性" }, "description": { - "zh_CN": "基础信息" + "zh_CN": "基础属性" }, "content": [ { - "property": "modelValue", + "property": "data", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "表格数据" } }, "required": true, @@ -7969,284 +7458,371 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", "props": { - "dataType": "Array" - } - }, - "description": { - "zh_CN": "双向绑定的当前选中值" - }, - "labelPosition": "left" - }, - { - "property": "disabled", - "label": { - "text": { - "zh_CN": "禁用" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否禁用" - }, - "labelPosition": "left" - }, - { - "property": "options", - "label": { - "text": { - "zh_CN": "选项列表" - } - }, - "defaultValue": [ - { - "label": "标签2" - }, - { - "label": "标签2" + "language": "json" } - ], - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": {} }, + "onChange": "this.delProp('fetchData')", "description": { - "zh_CN": "checkbox组件列表" + "zh_CN": "设置表格的数据" }, "labelPosition": "top" }, { - "property": "type", + "property": "columns", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "表格列" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ + "properties": [ + { + "label": { + "zh_CN": "默认分组" + }, + "content": [ + { + "property": "title", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "列标题" + } + }, + "widget": { + "component": "I18nConfigurator", + "props": {} + } + }, + { + "property": "field", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "列键值" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "sortable", + "type": "boolean", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "是否排序" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "labelPosition": "left" + }, + { + "property": "width", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "列宽" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "formatText", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "内置渲染器" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "整数", + "value": "integer" + }, + { + "label": "小数", + "value": "number" + }, + { + "label": "金额", + "value": "money" + }, + { + "label": "百分比", + "value": "rate" + }, + { + "label": "布尔", + "value": "boole" + }, + { + "label": "年月日", + "value": "date" + }, + { + "label": "年月日时分", + "value": "dateTime" + }, + { + "label": "时间", + "value": "time" + }, + { + "label": "省略", + "value": "ellipsis" + } + ] + } + } + }, { - "label": "button", - "value": "button" + "property": "renderer", + "type": "object", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "渲染函数" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + } }, { - "label": "checkbox", - "value": "checkbox" - } - ] - } - }, - "description": { - "zh_CN": "checkbox组件类型(button/checkbox),该属性的默认值为 checkbox,配合 options 属性一起使用" - }, - "labelPosition": "left" - } - ] - } - ], - "events": { - "onChange": { - "label": { - "zh_CN": "勾选值改变后将触发" - }, - "description": { - "zh_CN": "勾选值改变后将触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "选中项的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定的值改变时触发" - }, - "description": { - "zh_CN": "当前选中的值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "array", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的当前选中值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["disabled", "type"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "dialogbox", - "name": { - "zh_CN": "对话框" - }, - "component": "TinyDialogBox", - "description": "模态对话框,在浮层中显示,引导用户进行相关操作。", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "DialogBox" - }, - "group": "component", - "priority": 4, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "title", - "label": { - "text": { - "zh_CN": "标题" + "property": "slots", + "type": "object", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "插槽" + } + }, + "labelPosition": "none", + "widget": { + "component": "JsSlotConfigurator", + "props": { + "slots": ["header", "default"] + } + } + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "列类型" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "索引列", + "value": "index" + }, + { + "label": "单选列", + "value": "radio" + }, + { + "label": "多选列", + "value": "selection" + }, + { + "label": "展开列", + "value": "expand" + } + ], + "clearable": true + } + }, + "description": { + "zh_CN": "设置内置列的类型,该属性的可选值为 index(序号)/ selection(复选框)/ radio(单选框)/ expand(展开行)" + }, + "labelPosition": "left" + }, + { + "property": "editor", + "label": { + "text": { + "zh_CN": "编辑配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "单元格编辑渲染配置项,也可以是函数 Function(h, params)" + } + }, + { + "property": "filter", + "label": { + "text": { + "zh_CN": "筛选配置" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "设置表格列的筛选配置信息。默认值为 false 不配置筛选信息" + } + }, + { + "property": "showOverflow", + "label": { + "text": { + "zh_CN": "内容超出部分省略号配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "只显示省略号", + "value": "ellipsis" + }, + { + "label": "显示为原生 title", + "value": "title" + }, + { + "label": "显示为 tooltip 提示", + "value": "tooltip" + } + ], + "clearable": true + } + }, + "description": { + "zh_CN": "设置内置列的内容超出部分显示省略号配置,该属性的可选值为 ellipsis(只显示省略号)/ title(显示为原生 title)/ tooltip(显示为 tooltip 提示)" + }, + "labelPosition": "top" + } + ] } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, + ], "widget": { - "component": "InputConfigurator", - "props": {} + "component": "ArrayItemConfigurator", + "props": { + "type": "object", + "textField": "title", + "language": "json", + "buttonText": "编辑列配置", + "title": "编辑列配置", + "expand": true + } }, "description": { - "zh_CN": "弹出框标题" + "zh_CN": "表格列的配置信息" }, "labelPosition": "left" }, { - "property": "visible", + "property": "fetchData", "label": { "text": { - "zh_CN": "显示与隐藏" + "zh_CN": "服务端查询" } }, "required": true, "readOnly": false, "disabled": false, + "onChange": "function () { this.delProp('data') } ", "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "name": "fetchData", + "dataType": "JSExpression" + } }, "description": { - "zh_CN": "控制弹出框显示与关闭" + "zh_CN": "服务端数据查询方法" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "width", + "property": "pager", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "分页配置" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "弹出框的宽度" - }, - "labelPosition": "left" - }, - { - "property": "draggable", - "label": { - "text": { - "zh_CN": "可拖拽" + "defaultValue": { + "attrs": { + "currentPage": 1 } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "name": "pager", + "dataType": "JSExpression" + } }, "description": { - "zh_CN": "是否开启弹窗的拖拽功能,默认值为 false 。" + "zh_CN": "分页配置,需结合fetchData使用" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "center", + "property": "resizable", "label": { "text": { - "zh_CN": "居中" + "zh_CN": "调整列宽" } }, "required": true, @@ -8258,189 +7834,58 @@ "props": {} }, "description": { - "zh_CN": "弹出框的头部与底部内容会自动居中" + "zh_CN": "是否允许调整列宽" }, "labelPosition": "left" }, { - "property": "dialog-class", + "property": "row-id", "label": { "text": { - "zh_CN": "自定义类名" + "zh_CN": "行数据主键" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "自定义配置弹窗类名" - }, - "labelPosition": "left" - }, - { - "property": "append-to-body", - "label": { - "text": { - "zh_CN": "插入到Body" + "props": { + "placeholder": "比如:id" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, "description": { - "zh_CN": "DialogBox 本身是否插入到 body 上,嵌套的 Dialog 必须指定该属性并赋值为 true" + "zh_CN": "自定义行数据唯一主键的字段名(行数据必须要有唯一主键,默认自动生成)" }, "labelPosition": "left" }, { - "property": "show-close", + "property": "select-config", "label": { "text": { - "zh_CN": "关闭按钮" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否显示关闭按钮,默认值为 true 。" - }, - "labelPosition": "left" - } - ] - } - ], - "selector": ".TinyDialogBox", - "events": { - "onClose": { - "label": { - "zh_CN": "关闭弹窗时触发" - }, - "description": { - "zh_CN": "Dialog 关闭的回调" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - }, - "onUpdate:visible": { - "label": { - "zh_CN": "双向绑定的状态改变时触发" - }, - "description": { - "zh_CN": "显示或隐藏的状态值,发生改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "boolean", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的显示或隐藏的状态值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - }, - "slots": { - "title": { - "label": { - "zh_CN": "标题区" - }, - "description": { - "zh_CN": "Dialog 标题区的内容" - } - }, - "footer": { - "label": { - "zh_CN": "按钮操作区" - }, - "description": { - "zh_CN": "Dialog 按钮操作区的内容" - } - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": true, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": ".tiny-dialog-box", - "shortcuts": { - "properties": ["visible", "width"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "tabs", - "name": { - "zh_CN": "标签页" - }, - "component": "TinyTabs", - "description": "分隔内容上有关联但属于不同类别的数据集合", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Tabs" - }, - "group": "component", - "priority": 10, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "zh_CN": "行复选框配置" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSExpression" + } + }, + "description": { + "zh_CN": "表格行数据复选框配置项" + } + }, { - "property": "showEditIcon", + "property": "edit-rules", "label": { "text": { - "zh_CN": "显示编辑图标" + "zh_CN": "校验规则" } }, "required": true, @@ -8448,41 +7893,39 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示标题后编辑 ICON" + "zh_CN": "表格校验规则配置项" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "tabs", + "property": "edit-config", "label": { "text": { - "zh_CN": "选项卡" + "zh_CN": "编辑配置项" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": "", "cols": 12, - "bindState": false, "widget": { - "component": "ContainerConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "tabs 选项卡" + "zh_CN": "表格编辑配置项" }, - "labelPosition": "none" + "labelPosition": "top" }, { - "property": "modelValue", + "property": "expand-config", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "展开行配置" } }, "required": true, @@ -8490,19 +7933,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "绑定值,选中选项卡的 name" + "zh_CN": "展开行配置项" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "with-add", + "property": "sortable", "label": { "text": { - "zh_CN": "标签新增" + "zh_CN": "可排序" } }, "required": true, @@ -8514,15 +7957,25 @@ "props": {} }, "description": { - "zh_CN": "标签是否可增加" + "zh_CN": "是否允许列数据排序。默认为 true 可排序" }, "labelPosition": "left" - }, + } + ] + }, + { + "label": { + "zh_CN": "其他" + }, + "description": { + "zh_CN": "其他属性" + }, + "content": [ { - "property": "with-close", + "property": "auto-resize", "label": { "text": { - "zh_CN": "可关闭" + "zh_CN": "响应式监听" } }, "required": true, @@ -8534,15 +7987,15 @@ "props": {} }, "description": { - "zh_CN": "标签是否可关闭" + "zh_CN": "表格属性设置 autoResize 属性开启响应式表格宽高的同时,将高度height设置为auto就可以自动跟随父容器高度。" }, "labelPosition": "left" }, { - "property": "tab-style", + "property": "border", "label": { "text": { - "zh_CN": "标签页样式" + "zh_CN": "边框" } }, "required": true, @@ -8550,174 +8003,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "card", - "value": "card" - }, - { - "label": "border-card", - "value": "border-card" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "标签页样式" + "zh_CN": "是否带有纵向边框" }, "labelPosition": "left" - } - ] - } - ], - "events": { - "onClick": { - "label": { - "zh_CN": "点击页签时触发事件" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "component", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前点击的页签对象" - } - }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onEdit": { - "label": { - "zh_CN": "点击新增按钮或关闭按钮或者编辑按钮后触发" - }, - "description": { - "zh_CN": "点击新增按钮或关闭按钮或者编辑按钮后触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "tab", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前操作的页签对象" - } - }, - { - "name": "type", - "type": "String", - "defaultValue": "", - "description": { - "zh_CN": "当前操作的类型(remove || add || edit)" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onClose": { - "label": { - "zh_CN": "关闭页签时触发" - }, - "description": { - "zh_CN": "关闭页签时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "name", - "type": "String", - "defaultValue": "", - "description": { - "zh_CN": "页签名称" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "clickCapture": false, - "isModal": false, - "nestingRule": { - "childWhitelist": ["TinyTabItem"], - "parentWhitelist": [], - "descendantBlacklist": [], - "ancestorWhitelist": [] - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["size", "tab-style"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "tabitem", - "name": { - "zh_CN": "tab页签" - }, - "component": "TinyTabItem", - "description": "tab 标签页", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "TabItem" - }, - "group": "component", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + }, { - "property": "name", + "property": "seq-serial", "label": { "text": { - "zh_CN": "唯一标识" + "zh_CN": "行号连续" } }, "required": true, @@ -8725,18 +8023,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "唯一标识" - } + "zh_CN": "设置行序号是否连续,开启分页时有效,该属性的默认值为 false" + }, + "labelPosition": "left" }, { - "property": "title", + "property": "highlight-current-row", "label": { "text": { - "zh_CN": "标题" + "zh_CN": "高亮当前行" } }, "required": true, @@ -8744,85 +8043,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "标题" - } - } - ] - } - ], - "events": {}, - "slots": { - "title": { - "label": { - "zh_CN": "标题" - }, - "description": { - "zh_CN": "自定义标题" - } - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": ["TinyTab"], - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["name", "title"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "breadcrumb", - "name": { - "zh_CN": "面包屑" - }, - "component": "TinyBreadcrumb", - "description": "告诉访问者他们目前在网站中的位置以及如何返回", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Breadcrumb" - }, - "group": "component", - "priority": 1, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "zh_CN": "高亮当前行" + }, + "labelPosition": "left" + }, { - "property": "separator", + "property": "highlight-hover-row", "label": { "text": { - "zh_CN": "分隔符" + "zh_CN": "移入行高亮" } }, "required": true, @@ -8830,19 +8063,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "自定义分隔符" + "zh_CN": "鼠标移到行是否要高亮显示" }, "labelPosition": "left" }, { - "property": "options", + "property": "row-class-name", "label": { "text": { - "zh_CN": "配置数据" + "zh_CN": "设置行高亮" } }, "required": true, @@ -8851,20 +8084,18 @@ "cols": 12, "widget": { "component": "CodeConfigurator", - "props": { - "language": "json" - } + "props": {} }, "description": { - "zh_CN": "单独使用 Breadcrumb,通过 option 配置生成面包屑" + "zh_CN": "给行附加 className,也可以是函数 Function({seq, row, rowIndex, $rowIndex})" }, "labelPosition": "top" }, { - "property": "textField", + "property": "max-height", "label": { "text": { - "zh_CN": "键值" + "zh_CN": "内容最大高度" } }, "required": true, @@ -8876,88 +8107,14 @@ "props": {} }, "description": { - "zh_CN": "指定面包屑的显示键值,结合 options 使用" - }, - "labelPosition": "left" - } - ] - } - ], - "events": { - "onSelect": { - "label": { - "zh_CN": "选择 breadcrumb 时触发" - }, - "description": { - "zh_CN": "选择 breadcrumb 时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "clickCapture": false, - "isModal": false, - "nestingRule": { - "childWhitelist": ["TinyBreadcrumbItem"], - "parentWhitelist": [], - "descendantBlacklist": [], - "ancestorWhitelist": [] - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["separator"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "breadcrumb", - "name": { - "zh_CN": "面包屑项" - }, - "component": "TinyBreadcrumbItem", - "description": "", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "BreadcrumbItem" - }, - "group": "component", - "priority": 1, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ + "zh_CN": "设置表格内容区域(不含表格头部,底部)的最大高度。" + } + }, { - "property": "to", + "property": "row-span", "label": { "text": { - "zh_CN": "路由跳转" + "zh_CN": "行合并" } }, "required": true, @@ -8965,149 +8122,187 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "路由跳转对象,同 vue-router 的 to" - } + "zh_CN": "设置行合并,该属性仅适用于普通表格,不可与 tree-config 同时使用" + }, + "labelPosition": "top" } ] } ], - "slots": { - "default": { + "events": { + "onFilterChange": { "label": { - "zh_CN": "面包屑项标签" + "zh_CN": "筛选条件改变时触发改事件" }, "description": { - "zh_CN": "面包屑项" - } - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": ["TinyBreadcrumb"], - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["to"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "collapse", - "name": { - "zh_CN": "折叠面板" - }, - "component": "TinyCollapse", - "description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Collapse" - }, - "group": "component", - "priority": 3, - "schema": { - "properties": [ - { + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSortChange": { "label": { - "zh_CN": "基础信息" + "zh_CN": "点击列头,执行数据排序前触发的事件" }, "description": { - "zh_CN": "基础信息" + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" }, - "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "当前激活面板" + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectAll": { + "label": { + "zh_CN": "当手动勾选全选时触发的事件" + }, + "description": { + "zh_CN": "只对 type=selection 有效,当手动勾选全选时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 包含 table 实例对象" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} + { + "name": "checked", + "type": "boolean", + "defaultValue": "", + "description": { + "zh_CN": "勾选状态" + } }, - "description": { - "zh_CN": "双向绑定当前激活的面板" + { + "name": "selction", + "type": "Array", + "defaultValue": "", + "description": { + "zh_CN": "选中的表格数据数组" + } } - } - ] - } - ], - "events": { - "onChange": { + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectChange": { "label": { - "zh_CN": "激活面板改变时触发" + "zh_CN": "手动勾选并且值发生改变时触发的事件" }, "description": { - "zh_CN": "当前激活面板改变时触发(如果是手风琴模式,参数 activeNames 类型为string,否则为array)" + "zh_CN": "只对 type=selection 有效,当手动勾选并且值发生改变时触发的事件" }, "type": "event", "functionInfo": { "params": [ { - "name": "data", - "type": "string", + "name": "table", + "type": "Object", "defaultValue": "", "description": { - "zh_CN": "当前激活面板的值" + "zh_CN": " table 实例对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" } } ], "returns": {} }, - "defaultValue": "" + "defaultValue": "function onClick(e) {}" }, - "onUpdate:modelValue": { + "onToggleExpandChange": { "label": { - "zh_CN": "双向绑定的值改变时触发" + "zh_CN": "当行展开或收起时会触发该事件" }, "description": { - "zh_CN": "当前激活面板的值改变时触发" + "zh_CN": "当行展开或收起时会触发该事件" }, "type": "event", "functionInfo": { "params": [ { - "name": "value", - "type": "string", + "name": "table", + "type": "Object", "defaultValue": "", "description": { - "zh_CN": "双向绑定的值" + "zh_CN": "{$table,row,rowIndex} 包含 table 实例对象和当前行数据的对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" } } ], "returns": {} }, + "defaultValue": "function onClick(e) {}" + }, + "onCurrentChange": { + "label": { + "zh_CN": "行点击时触发" + }, + "description": { + "zh_CN": "行点击时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, "defaultValue": "" } - } + }, + "shortcuts": { + "properties": ["sortable", "columns"] + }, + "contentMenu": { + "actions": ["create symbol"] + }, + "onBeforeMount": "console.log('table on load'); this.pager = source.pager; this.fetchData = source.fetchData; this.data = source.data ;this.columns = source.columns" }, "configure": { "loop": true, @@ -9125,7 +8320,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": ["sortable", "columns"] }, "contextMenu": { "actions": ["create symbol"], @@ -9134,12 +8329,12 @@ } }, { - "icon": "collapseitem", "name": { - "zh_CN": "折叠面板项" + "zh_CN": "输入框" }, - "component": "TinyCollapseItem", - "description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作", + "component": "TinyInput", + "icon": "input", + "description": "通过鼠标或键盘输入字符", "docUrl": "", "screenshot": "", "tags": "", @@ -9147,10 +8342,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "CollapseItem" + "exportName": "Input", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 2, + "priority": 1, "schema": { "properties": [ { @@ -9162,10 +8361,10 @@ }, "content": [ { - "property": "name", + "property": "modelValue", "label": { "text": { - "zh_CN": "唯一标识符" + "zh_CN": "绑定值" } }, "required": true, @@ -9173,106 +8372,65 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "唯一标识符: String | Number" + "zh_CN": "双向绑定值" }, "labelPosition": "left" }, { - "property": "title", + "property": "type", "label": { "text": { - "zh_CN": "标题" + "zh_CN": "类型" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "面板标题" - }, - "labelPosition": "left" - } - ] - } - ], - "events": {}, - "slots": { - "title": { - "label": { - "zh_CN": "标题" - }, - "description": { - "zh_CN": "自定义标题" - } - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["label-width", "disabled"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "grid", - "name": { - "zh_CN": "表格" - }, - "component": "TinyGrid", - "description": "提供了非常强大数据表格功能,可以展示数据列表,可以对数据列表进行选择、编辑等", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Grid" - }, - "group": "component", - "priority": 2, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础属性" - }, - "description": { - "zh_CN": "基础属性" - }, - "content": [ + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "textarea", + "value": "textarea" + }, + { + "label": "text", + "value": "text" + }, + { + "label": "password", + "value": "password" + } + ] + } + }, + "description": { + "zh_CN": "设置input框的type属性" + }, + "labelPosition": "left" + }, { - "property": "data", + "property": "rows", "label": { "text": { - "zh_CN": "表格数据" + "zh_CN": "行数" + } + }, + "widget": { + "component": "NumberConfigurator" + }, + "description": { + "zh_CN": "输入框行数,只对 type='textarea' 有效" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" } }, "required": true, @@ -9280,374 +8438,571 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "清除按钮" } }, - "onChange": "this.delProp('fetchData')", + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, "description": { - "zh_CN": "设置表格的数据" + "zh_CN": "是否显示清除按钮" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "columns", + "property": "disabled", "label": { "text": { - "zh_CN": "表格列" + "zh_CN": "禁用" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "properties": [ - { - "label": { - "zh_CN": "默认分组" - }, - "content": [ - { - "property": "title", - "type": "string", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "列标题" - } - }, - "widget": { - "component": "I18nConfigurator", - "props": {} - } - }, - { - "property": "field", - "type": "string", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "列键值" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "sortable", - "type": "boolean", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "是否排序" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "labelPosition": "left" - }, - { - "property": "width", - "type": "string", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "列宽" - } - }, - "widget": { - "component": "NumberConfigurator", - "props": {} - } - }, - { - "property": "formatText", - "type": "string", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "内置渲染器" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "整数", - "value": "integer" - }, - { - "label": "小数", - "value": "number" - }, - { - "label": "金额", - "value": "money" - }, - { - "label": "百分比", - "value": "rate" - }, - { - "label": "布尔", - "value": "boole" - }, - { - "label": "年月日", - "value": "date" - }, - { - "label": "年月日时分", - "value": "dateTime" - }, - { - "label": "时间", - "value": "time" - }, - { - "label": "省略", - "value": "ellipsis" - } - ] - } - } - }, - { - "property": "renderer", - "type": "object", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "渲染函数" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "dataType": "JSFunction" - } - } - }, - { - "property": "slots", - "type": "object", - "defaultValue": "", - "label": { - "text": { - "zh_CN": "插槽" - } - }, - "labelPosition": "none", - "widget": { - "component": "JsSlotConfigurator", - "props": { - "slots": ["header", "default"] - } - } - }, - { - "property": "type", - "label": { - "text": { - "zh_CN": "列类型" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "索引列", - "value": "index" - }, - { - "label": "单选列", - "value": "radio" - }, - { - "label": "多选列", - "value": "selection" - }, - { - "label": "展开列", - "value": "expand" - } - ], - "clearable": true - } - }, - "description": { - "zh_CN": "设置内置列的类型,该属性的可选值为 index(序号)/ selection(复选框)/ radio(单选框)/ expand(展开行)" - }, - "labelPosition": "left" + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" }, { - "property": "editor", - "label": { - "text": { - "zh_CN": "编辑配置" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - }, - "description": { - "zh_CN": "单元格编辑渲染配置项,也可以是函数 Function(h, params)" - } + "label": "small", + "value": "small" }, { - "property": "filter", - "label": { - "text": { - "zh_CN": "筛选配置" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - }, - "description": { - "zh_CN": "设置表格列的筛选配置信息。默认值为 false 不配置筛选信息" - } + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ + { + "property": "maxlength", + "label": { + "text": { + "zh_CN": "最大输入长度" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "设置 input 框的maxLength" + } + }, + { + "property": "autofocus", + "label": { + "text": { + "zh_CN": "自动聚焦" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "自动获取焦点" + }, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在 Input 值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框改变后的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框输入的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "slots": { + "prefix": { + "label": { + "zh_CN": "前置内容" + } + }, + "suffix": { + "label": { + "zh_CN": "后置内容" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["value", "disabled"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "row", + "name": { + "zh_CN": "row" + }, + "component": "TinyLayout", + "description": "定义 Layout 的行配置信息", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Layout", + "version": "3.20.0", + "destructuring": true, + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css" + }, + "group": "component", + "priority": 5, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "cols", + "label": { + "text": { + "zh_CN": "总栅格数" + } + }, + "cols": 12, + "widget": { + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "12", + "value": 12 }, { - "property": "showOverflow", - "label": { - "text": { - "zh_CN": "内容超出部分省略号配置" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "只显示省略号", - "value": "ellipsis" - }, - { - "label": "显示为原生 title", - "value": "title" - }, - { - "label": "显示为 tooltip 提示", - "value": "tooltip" - } - ], - "clearable": true - } - }, - "description": { - "zh_CN": "设置内置列的内容超出部分显示省略号配置,该属性的可选值为 ellipsis(只显示省略号)/ title(显示为原生 title)/ tooltip(显示为 tooltip 提示)" - }, - "labelPosition": "top" + "label": "24", + "value": 24 } ] } - ], + }, + "description": { + "zh_CN": "选择总栅格数" + }, + "labelPosition": "none" + }, + { + "property": "tag", + "label": { + "text": { + "zh_CN": "layout渲染的标签" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, "widget": { - "component": "ArrayItemConfigurator", - "props": { - "type": "object", - "textField": "title", - "language": "json", - "buttonText": "编辑列配置", - "title": "编辑列配置", - "expand": true + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "定义Layout元素渲染后的标签,默认为 div" + } + } + ] + } + ] + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": ["TinyRow", "TinyCol"], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["disabled"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "name": { + "zh_CN": "数字输入框" + }, + "component": "TinyNumeric", + "icon": "numeric", + "description": "通过鼠标或键盘输入字符", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Numeric", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 1, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "双向绑定值" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "allow-empty", + "label": { + "text": { + "zh_CN": "内容可清空" } }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, "description": { - "zh_CN": "表格列的配置信息" + "zh_CN": "是否内容可清空" }, "labelPosition": "left" }, { - "property": "fetchData", + "property": "disabled", "label": { "text": { - "zh_CN": "服务端查询" + "zh_CN": "禁用" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, - "onChange": "function () { this.delProp('data') } ", "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": { - "name": "fetchData", - "dataType": "JSExpression" - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "服务端数据查询方法" + "zh_CN": "是否禁用" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "pager", + "property": "size", "label": { "text": { - "zh_CN": "分页配置" + "zh_CN": "尺寸" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "defaultValue": { - "attrs": { - "currentPage": 1 - } - }, "widget": { - "component": "CodeConfigurator", + "component": "SelectConfigurator", "props": { - "name": "pager", - "dataType": "JSExpression" + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] } }, "description": { - "zh_CN": "分页配置,需结合fetchData使用" + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "resizable", + "property": "controls", "label": { "text": { - "zh_CN": "调整列宽" + "zh_CN": "加减按钮" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, @@ -9656,37 +9011,45 @@ "props": {} }, "description": { - "zh_CN": "是否允许调整列宽" + "zh_CN": "是否使用加减按钮" }, "labelPosition": "left" }, { - "property": "row-id", + "property": "controls-position", "label": { "text": { - "zh_CN": "行数据主键" + "zh_CN": "加减按钮位置" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "SelectConfigurator", "props": { - "placeholder": "比如:id" + "options": [ + { + "label": "左右两侧", + "value": "" + }, + { + "label": "只在右侧", + "value": "right" + } + ] } }, "description": { - "zh_CN": "自定义行数据唯一主键的字段名(行数据必须要有唯一主键,默认自动生成)" - }, - "labelPosition": "left" + "zh_CN": "加减按钮位置" + } }, { - "property": "select-config", + "property": "precision", "label": { "text": { - "zh_CN": "行复选框配置" + "zh_CN": "精度" } }, "required": false, @@ -9694,130 +9057,278 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "NumberConfigurator", "props": { - "dataType": "JSExpression" + "allowEmpty": true } }, "description": { - "zh_CN": "表格行数据复选框配置项" - } + "zh_CN": "数值精度" + }, + "labelPosition": "left" }, { - "property": "edit-rules", + "property": "step", "label": { "text": { - "zh_CN": "校验规则" + "zh_CN": "步长" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "表格校验规则配置项" + "zh_CN": "步长" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "edit-config", + "property": "max", "label": { "text": { - "zh_CN": "编辑配置项" + "zh_CN": "最大数值" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "表格编辑配置项" + "zh_CN": "可输入的最大数值" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "expand-config", + "property": "min", "label": { "text": { - "zh_CN": "展开行配置" + "zh_CN": "最小数值" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "展开行配置项" + "zh_CN": "可输入的最大数值" }, - "labelPosition": "top" - }, - { - "property": "sortable", - "label": { - "text": { - "zh_CN": "可排序" + "labelPosition": "left" + } + ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在 Input 值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框改变后的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框输入的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否允许列数据排序。默认为 true 可排序" - }, - "labelPosition": "left" - } - ] + } + ], + "returns": {} + }, + "defaultValue": "" }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["value", "disabled"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "name": { + "zh_CN": "分页" + }, + "component": "TinyPager", + "icon": "pager", + "description": "当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Pager", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 1, + "schema": { + "properties": [ { "label": { - "zh_CN": "其他" + "zh_CN": "基础信息" }, "description": { - "zh_CN": "其他属性" + "zh_CN": "基础信息" }, "content": [ { - "property": "auto-resize", - "label": { - "text": { - "zh_CN": "响应式监听" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "表格属性设置 autoResize 属性开启响应式表格宽高的同时,将高度height设置为auto就可以自动跟随父容器高度。" - }, - "labelPosition": "left" - }, - { - "property": "border", + "property": "currentPage", "label": { "text": { - "zh_CN": "边框" + "zh_CN": "当前页数" } }, "required": true, @@ -9825,19 +9336,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "是否带有纵向边框" + "zh_CN": "当前页数,支持 .sync 修饰符" }, "labelPosition": "left" }, { - "property": "seq-serial", + "property": "pageSize", "label": { "text": { - "zh_CN": "行号连续" + "zh_CN": "每页条数" } }, "required": true, @@ -9845,19 +9356,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "设置行序号是否连续,开启分页时有效,该属性的默认值为 false" + "zh_CN": "每页显示条目个数" }, "labelPosition": "left" }, { - "property": "highlight-current-row", + "property": "pageSizes", "label": { "text": { - "zh_CN": "高亮当前行" + "zh_CN": "可选每页条数" } }, "required": true, @@ -9865,19 +9376,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "高亮当前行" - }, - "labelPosition": "left" + "zh_CN": "设置可选择的每页显示条数" + } }, { - "property": "highlight-hover-row", + "property": "total", "label": { "text": { - "zh_CN": "移入行高亮" + "zh_CN": "总条数" } }, "required": true, @@ -9885,246 +9395,111 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "鼠标移到行是否要高亮显示" + "zh_CN": "数据总条数" }, "labelPosition": "left" }, { - "property": "row-class-name", - "label": { - "text": { - "zh_CN": "设置行高亮" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": {} - }, - "description": { - "zh_CN": "给行附加 className,也可以是函数 Function({seq, row, rowIndex, $rowIndex})" - }, - "labelPosition": "top" - }, - { - "property": "max-height", + "property": "layout", "label": { "text": { - "zh_CN": "内容最大高度" + "zh_CN": "布局" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "defaultValue": "total,sizes,prev, pager, next", "widget": { "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "设置表格内容区域(不含表格头部,底部)的最大高度。" - } - }, - { - "property": "row-span", - "label": { - "text": { - "zh_CN": "行合并" + "props": { + "type": "textarea" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": {} - }, "description": { - "zh_CN": "设置行合并,该属性仅适用于普通表格,不可与 tree-config 同时使用" + "zh_CN": "组件布局,子组件名用逗号分隔" }, - "labelPosition": "top" - } - ] - } - ], - "events": { - "onFilterChange": { - "label": { - "zh_CN": "筛选条件改变时触发改事件" - }, - "description": { - "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "table", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" - } - } - ], - "returns": {} - }, - "defaultValue": "function onClick(e) {}" - }, - "onSortChange": { - "label": { - "zh_CN": "点击列头,执行数据排序前触发的事件" - }, - "description": { - "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "table", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" - } - } - ], - "returns": {} - }, - "defaultValue": "function onClick(e) {}" - }, - "onSelectAll": { + "labelPosition": "left" + } + ] + } + ], + "events": { + "onCurrentChange ": { "label": { - "zh_CN": "当手动勾选全选时触发的事件" + "zh_CN": "切换页码时触发" }, "description": { - "zh_CN": "只对 type=selection 有效,当手动勾选全选时触发的事件" + "zh_CN": "切换页码时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "table", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": " 包含 table 实例对象" - } - }, - { - "name": "checked", - "type": "boolean", - "defaultValue": "", - "description": { - "zh_CN": "勾选状态" - } - }, - { - "name": "selction", - "type": "Array", + "name": "value", + "type": "string", "defaultValue": "", "description": { - "zh_CN": "选中的表格数据数组" + "zh_CN": "当前页的值" } } ], "returns": {} }, - "defaultValue": "function onClick(e) {}" + "defaultValue": "" }, - "onSelectChange": { + "onPrevClick ": { "label": { - "zh_CN": "手动勾选并且值发生改变时触发的事件" + "zh_CN": "点击上一页按钮时触发" }, "description": { - "zh_CN": "只对 type=selection 有效,当手动勾选并且值发生改变时触发的事件" + "zh_CN": "点击上一页按钮时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "table", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": " table 实例对象" - } - }, - { - "name": "event", - "type": "Object", + "name": "page", + "type": "String", "defaultValue": "", "description": { - "zh_CN": " 原生 Event" + "zh_CN": "当前页的页码值" } } ], "returns": {} }, - "defaultValue": "function onClick(e) {}" + "defaultValue": "" }, - "onToggleExpandChange": { + "onNextClick": { "label": { - "zh_CN": "当行展开或收起时会触发该事件" + "zh_CN": "点击下一页按钮时触发" }, "description": { - "zh_CN": "当行展开或收起时会触发该事件" + "zh_CN": "点击上一页按钮时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "table", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "{$table,row,rowIndex} 包含 table 实例对象和当前行数据的对象" - } - }, - { - "name": "event", - "type": "Object", + "name": "page", + "type": "String", "defaultValue": "", "description": { - "zh_CN": " 原生 Event" + "zh_CN": "当前页的页码值" } } ], "returns": {} }, - "defaultValue": "function onClick(e) {}" - }, - "onCurrentChange": { - "label": { - "zh_CN": "行点击时触发" - }, - "description": { - "zh_CN": "行点击时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, "defaultValue": "" } - }, - "shortcuts": { - "properties": ["sortable", "columns"] - }, - "contentMenu": { - "actions": ["create symbol"] - }, - "onBeforeMount": "console.log('table on load'); this.pager = source.pager; this.fetchData = source.fetchData; this.data = source.data ;this.columns = source.columns" + } }, "configure": { "loop": true, @@ -10142,56 +9517,8 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["sortable", "columns"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "grid", - "name": { - "zh_CN": "表格行" - }, - "component": "TinyGridColumn", - "description": "提供了非常强大数据表格功能,可以展示数据列表,可以对数据列表进行选择、编辑等", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "TinyGridColumn" - }, - "group": "component", - "priority": 2, - "schema": { - "properties": [], - "events": {}, - "shortcuts": {}, - "contentMenu": { - "actions": ["create symbol"] - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" + "properties": ["currentPage", "total"] }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": {}, "contextMenu": { "actions": ["create symbol"], "disable": ["copy", "remove"] @@ -10200,11 +9527,11 @@ }, { "name": { - "zh_CN": "分页" + "zh_CN": "弹出编辑" }, - "component": "TinyPager", - "icon": "pager", - "description": "当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件", + "component": "TinyPopeditor", + "icon": "popEditor", + "description": "该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件", "docUrl": "", "screenshot": "", "tags": "", @@ -10212,10 +9539,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Pager" + "exportName": "Popeditor", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 1, + "priority": 6, "schema": { "properties": [ { @@ -10227,10 +9558,118 @@ }, "content": [ { - "property": "currentPage", + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "双向绑定值" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "show-clear-btn", + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ + { + "property": "width", + "label": { + "text": { + "zh_CN": "宽度" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "设置弹出面板的宽度(单位像素)" + }, + "labelPosition": "left" + }, + { + "property": "conditions", "label": { "text": { - "zh_CN": "当前页数" + "zh_CN": "过滤条件" } }, "required": true, @@ -10238,19 +9677,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "当前页数,支持 .sync 修饰符" + "zh_CN": "当弹出面板配置的是表格时,设置弹出面板中的过滤条件" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "pageSize", + "property": "grid-op", "label": { "text": { - "zh_CN": "每页条数" + "zh_CN": "面板表格配置" } }, "required": true, @@ -10258,19 +9697,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "每页显示条目个数" - }, - "labelPosition": "left" + "zh_CN": "设置弹出面板中表格组件的配置信息" + } }, { - "property": "pageSizes", + "property": "pager-op", "label": { "text": { - "zh_CN": "可选每页条数" + "zh_CN": "分页配置" } }, "required": true, @@ -10282,14 +9720,15 @@ "props": {} }, "description": { - "zh_CN": "设置可选择的每页显示条数" - } + "zh_CN": "设置弹出编辑框中分页配置" + }, + "labelPosition": "top" }, { - "property": "total", + "property": "multi", "label": { "text": { - "zh_CN": "总条数" + "zh_CN": "多选" } }, "required": true, @@ -10297,47 +9736,47 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "数据总条数" + "zh_CN": "设置弹出面板中的数据是否可多选" }, "labelPosition": "left" }, { - "property": "layout", + "property": "show-pager", "label": { "text": { - "zh_CN": "布局" + "zh_CN": "启用分页" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, - "defaultValue": "total,sizes,prev, pager, next", "widget": { - "component": "InputConfigurator", - "props": { - "type": "textarea" - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "组件布局,子组件名用逗号分隔" + "zh_CN": "当 popseletor 为 grid 时才能生效,配置为 true 后还需配置 pagerOp 属性" }, "labelPosition": "left" } - ] + ], + "description": { + "zh_CN": "" + } } ], "events": { - "onCurrentChange ": { + "onChange": { "label": { - "zh_CN": "切换页码时触发" + "zh_CN": "选中值改变时触发" }, "description": { - "zh_CN": "切换页码时触发" + "zh_CN": "在 Input 值改变时触发" }, "type": "event", "functionInfo": { @@ -10347,7 +9786,15 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "当前页的值" + "zh_CN": "当前选中项的值" + } + }, + { + "name": "value", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中对象" } } ], @@ -10355,22 +9802,22 @@ }, "defaultValue": "" }, - "onPrevClick ": { + "onUpdate:modelValue": { "label": { - "zh_CN": "点击上一页按钮时触发" + "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "点击上一页按钮时触发" + "zh_CN": "当前选中的值改变时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "page", - "type": "String", + "name": "value", + "type": "string", "defaultValue": "", "description": { - "zh_CN": "当前页的页码值" + "zh_CN": "双向绑定的当前选中值" } } ], @@ -10378,22 +9825,36 @@ }, "defaultValue": "" }, - "onNextClick": { + "onClose": { "label": { - "zh_CN": "点击下一页按钮时触发" + "zh_CN": "弹框关闭时触发的事件" }, "description": { - "zh_CN": "点击上一页按钮时触发" + "zh_CN": "弹框关闭时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + }, + "onPageChange": { + "label": { + "zh_CN": "分页切换事件" + }, + "description": { + "zh_CN": "表格模式下分页切换事件" }, "type": "event", "functionInfo": { "params": [ { - "name": "page", + "name": "value", "type": "String", "defaultValue": "", "description": { - "zh_CN": "当前页的页码值" + "zh_CN": "当前页码数" } } ], @@ -10419,7 +9880,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["currentPage", "total"] + "properties": ["modelValue", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -10428,12 +9889,12 @@ } }, { + "icon": "popover", "name": { - "zh_CN": "弹出编辑" + "zh_CN": "提示框" }, - "component": "TinyPopeditor", - "icon": "popEditor", - "description": "该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件", + "component": "TinyPopover", + "description": "Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画", "docUrl": "", "screenshot": "", "tags": "", @@ -10441,10 +9902,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Popeditor" + "exportName": "Popover", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 6, + "priority": 7, "schema": { "properties": [ { @@ -10456,10 +9921,140 @@ }, "content": [ { - "property": "modelValue", + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "双向绑定,手动控制是否可见的状态值" + }, + "labelPosition": "left" + }, + { + "property": "placement", + "label": { + "text": { + "zh_CN": "位置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "top", + "value": "top" + }, + { + "label": "top-start", + "value": "top-start" + }, + { + "label": "top-end", + "value": "top-end" + }, + { + "label": "bottom", + "value": "bottom" + }, + { + "label": "bottom-start", + "value": "bottom-start" + }, + { + "label": "bottom-end", + "value": "bottom-end" + }, + { + "label": "left", + "value": "left" + }, + { + "label": "left-start", + "value": "left-start" + }, + { + "label": "left-end", + "value": "left-end" + }, + { + "label": "right", + "value": "right" + }, + { + "label": "right-start", + "value": "right-start" + }, + { + "label": "right-end", + "value": "right-end" + } + ] + } + }, + "description": { + "zh_CN": "提示框位置" + }, + "labelPosition": "left" + }, + { + "property": "trigger", + "label": { + "text": { + "zh_CN": "触发方式" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "click", + "value": "click" + }, + { + "label": "focus", + "value": "focus" + }, + { + "label": "hover", + "value": "hover" + }, + { + "label": "manual", + "value": "manual" + } + ] + } + }, + "description": { + "zh_CN": "触发方式,该属性的可选值为 click / focus / hover / manual,该属性的默认值为 click" + }, + "labelPosition": "left" + }, + { + "property": "popper-class", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "自定义类" } }, "required": true, @@ -10471,15 +10066,15 @@ "props": {} }, "description": { - "zh_CN": "双向绑定值" + "zh_CN": "为 popper 添加类名" }, "labelPosition": "left" }, { - "property": "placeholder", + "property": "visible-arrow", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "显示箭头" } }, "required": true, @@ -10487,19 +10082,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "是否显示 Tooltip 箭头" }, "labelPosition": "left" }, { - "property": "show-clear-btn", + "property": "append-to-body", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "添加到body上" } }, "required": true, @@ -10511,7 +10106,66 @@ "props": {} }, "description": { - "zh_CN": "是否显示清除按钮" + "zh_CN": "Popover弹窗是否添加到body上" + }, + "labelPosition": "left" + }, + { + "property": "arrow-offset", + "label": { + "text": { + "zh_CN": "箭头的位置偏移" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "箭头的位置偏移,该属性的默认值为 0" + } + }, + { + "property": "close-delay", + "label": { + "text": { + "zh_CN": "延迟隐藏" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + }, + "labelPosition": "left" + }, + { + "property": "content", + "label": { + "text": { + "zh_CN": "显示的内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" }, "labelPosition": "left" }, @@ -10531,23 +10185,15 @@ "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "Popover 是否可用" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "width", + "property": "offset", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "位置偏移量" } }, "required": true, @@ -10559,15 +10205,15 @@ "props": {} }, "description": { - "zh_CN": "设置弹出面板的宽度(单位像素)" + "zh_CN": "出现位置的偏移量" }, "labelPosition": "left" }, { - "property": "conditions", + "property": "open-delay", "label": { "text": { - "zh_CN": "过滤条件" + "zh_CN": "显示延迟" } }, "required": true, @@ -10575,19 +10221,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "当弹出面板配置的是表格时,设置弹出面板中的过滤条件" + "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "grid-op", + "property": "popper-options", "label": { "text": { - "zh_CN": "面板表格配置" + "zh_CN": "弹出层参数" } }, "required": true, @@ -10599,14 +10245,15 @@ "props": {} }, "description": { - "zh_CN": "设置弹出面板中表格组件的配置信息" - } + "zh_CN": "popper.js 的参数" + }, + "labelPosition": "top" }, { - "property": "pager-op", + "property": "title", "label": { "text": { - "zh_CN": "分页配置" + "zh_CN": "标题" } }, "required": true, @@ -10614,19 +10261,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "设置弹出编辑框中分页配置" + "zh_CN": "提示内容标题" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "multi", + "property": "transform-origin", "label": { "text": { - "zh_CN": "多选" + "zh_CN": "旋转中心点" } }, "required": true, @@ -10638,15 +10285,15 @@ "props": {} }, "description": { - "zh_CN": "设置弹出面板中的数据是否可多选" + "zh_CN": "组件的旋转中心点,组件的旋转中心点" }, "labelPosition": "left" }, { - "property": "show-pager", + "property": "transition", "label": { "text": { - "zh_CN": "启用分页" + "zh_CN": "渐变动画" } }, "required": true, @@ -10654,105 +10301,54 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "当 popseletor 为 grid 时才能生效,配置为 true 后还需配置 pagerOp 属性" + "zh_CN": "该属性的默认值为 fade-in-linear" + }, + "labelPosition": "left" + }, + { + "property": "width", + "label": { + "text": { + "zh_CN": "宽度" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "宽度" }, "labelPosition": "left" } - ], - "description": { - "zh_CN": "" - } + ] } ], "events": { - "onChange": { - "label": { - "zh_CN": "选中值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项的值" - } - }, - { - "name": "value", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中对象" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, "onUpdate:modelValue": { "label": { "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "当前选中的值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的当前选中值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onClose": { - "label": { - "zh_CN": "弹框关闭时触发的事件" - }, - "description": { - "zh_CN": "弹框关闭时触发的事件" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" - }, - "onPageChange": { - "label": { - "zh_CN": "分页切换事件" - }, - "description": { - "zh_CN": "表格模式下分页切换事件" + "zh_CN": "手动控制是否可见的状态值改变时触发" }, "type": "event", "functionInfo": { "params": [ { "name": "value", - "type": "String", + "type": "boolean", "defaultValue": "", "description": { - "zh_CN": "当前页码数" + "zh_CN": "双向绑定的可见状态值" } } ], @@ -10766,8 +10362,9 @@ "loop": true, "condition": true, "styles": true, - "isContainer": false, + "isContainer": true, "isModal": false, + "isPopper": true, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -10778,7 +10375,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["modelValue", "disabled"] + "properties": ["visible", "width"] }, "contextMenu": { "actions": ["create symbol"], @@ -10787,12 +10384,12 @@ } }, { - "icon": "tree", + "icon": "radio", "name": { - "zh_CN": "树" + "zh_CN": "单选" }, - "component": "TinyTree", - "description": "可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单", + "component": "TinyRadio", + "description": "用于配置不同场景的选项,在一组备选项中进行单选", "docUrl": "", "screenshot": "", "tags": "", @@ -10800,10 +10397,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Tree" + "exportName": "Radio", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 12, + "priority": 3, "schema": { "properties": [ { @@ -10815,10 +10416,10 @@ }, "content": [ { - "property": "show-checkbox", + "property": "text", "label": { "text": { - "zh_CN": "多选" + "zh_CN": "文本内容" } }, "required": true, @@ -10826,49 +10427,36 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "设置接口是否可以多选" - }, - "labelPosition": "left" + "zh_CN": "单选框文本内容" + } }, { - "property": "data", + "property": "label", "label": { "text": { - "zh_CN": "数据源" + "zh_CN": "选中值" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": [ - { - "label": "一级 1", - "children": [ - { - "label": "二级 1-1" - } - ] - } - ], "cols": 12, "widget": { - "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "可配置静态数据源和动态数据源" - }, - "labelPosition": "top" + "zh_CN": "radio 选中时的值" + } }, { - "property": "node-key", + "property": "modelValue", "label": { "text": { - "zh_CN": "唯一标识" + "zh_CN": "绑定值" } }, "required": true, @@ -10880,37 +10468,44 @@ "props": {} }, "description": { - "zh_CN": "节点唯一标识属性名称" - }, - "labelPosition": "left" + "zh_CN": "双向绑定的当前选中值" + } }, { - "property": "render-content", + "property": "disabled", "label": { "text": { - "zh_CN": "渲染函数" + "zh_CN": "禁用" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": { - "disabled": true, - "placeholder": "请使用变量绑定来绑定函数" - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "树节点的内容区的渲染函数" - } - }, + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "label": { + "zh_CN": "其他" + }, + "description": { + "zh_CN": "" + }, + "content": [ { - "property": "icon-trigger-click-node", + "property": "border", "label": { "text": { - "zh_CN": "触发NodeClick事件" + "zh_CN": "显示边框" } }, "required": true, @@ -10922,15 +10517,15 @@ "props": {} }, "description": { - "zh_CN": "点击图标展开节点时是否触发 node-click 事件" + "zh_CN": "是否显示边框" }, "labelPosition": "left" }, { - "property": "expand-icon", + "property": "size", "label": { "text": { - "zh_CN": "展开图标" + "zh_CN": "尺寸" } }, "required": true, @@ -10938,19 +10533,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "节点展开图标" - }, - "labelPosition": "top" + "zh_CN": "单选框的尺寸,仅在 border 为true时有效" + } }, { - "property": "shrink-icon", + "property": "name", "label": { "text": { - "zh_CN": "收缩图标" + "zh_CN": "原生name属性" } }, "required": true, @@ -10958,47 +10552,128 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "节点收缩的图标" - }, - "labelPosition": "top" + "zh_CN": "原生 name 属性" + } } ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "值变化事件" + }, + "description": { + "zh_CN": "绑定值变化时触发的事件" + } }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "当前选中的值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的当前选中值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["visible", "width"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "row", + "name": { + "zh_CN": "row" + }, + "component": "TinyRow", + "description": "定义 Layout 的行配置信息", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Row", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 5, + "schema": { + "properties": [ { - "name": "1", "label": { - "zh_CN": "其他" + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" }, "content": [ { - "property": "check-on-click-node", + "property": "layout", "label": { "text": { - "zh_CN": "点击节点选中" + "zh_CN": "布局" } }, - "required": true, - "readOnly": false, - "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "LayoutGridConfigurator", "props": {} }, "description": { - "zh_CN": "是否在点击节点的时候选中节点,默认值为 false,即只有在点击复选框时才会选中节点" + "zh_CN": "选择布局方式" }, - "labelPosition": "left" + "labelPosition": "none" }, { - "property": "filter-node-method", + "property": "align", "label": { "text": { - "zh_CN": "筛选函数" + "zh_CN": "子项对齐方式" } }, "required": true, @@ -11006,92 +10681,70 @@ "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": {} - }, - "description": { - "zh_CN": "节点筛选函数" - }, - "labelPosition": "top" - } - ], - "description": { - "zh_CN": "" - } - } - ], - "events": { - "onCheck": { - "label": { - "zh_CN": "勾选节点后的事件" - }, - "description": { - "zh_CN": "勾选节点后的事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "data", - "type": "object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中节点信息" - } - }, - { - "name": "currentNode", - "type": "object", - "defaultValue": "", - "description": { - "zh_CN": "树组件目前的选中状态信息,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性" + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "top", + "value": "top" + }, + { + "label": "middle", + "value": "middle" + }, + { + "label": "bottom", + "value": "bottom" + } + ] } + }, + "description": { + "zh_CN": "子项的副轴对齐方向,可取值:top, middle, bottom" } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onNodeClick": { - "label": { - "zh_CN": "点击节点后的事件" - }, - "description": { - "zh_CN": "点击节点后的事件" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "data", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中节点信息" + }, + { + "property": "flex", + "label": { + "text": { + "zh_CN": "flex容器" } }, - { - "name": "node", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "树组件目前的选中状态信息,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性" - } + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} }, - { - "name": "vm", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "树组件实例" + "description": { + "zh_CN": "是否为flex容器" + }, + "labelPosition": "left" + }, + { + "property": "gutter", + "label": { + "text": { + "zh_CN": "子项间隔" } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "子项的间隔的像素" } - ], - "returns": {} - }, - "defaultValue": "" + } + ] } - } + ] }, "configure": { "loop": true, @@ -11100,7 +10753,7 @@ "isContainer": false, "isModal": false, "nestingRule": { - "childWhitelist": "", + "childWhitelist": [], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -11109,7 +10762,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["data", "show-checkbox"] + "properties": ["label-width", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -11118,12 +10771,12 @@ } }, { - "icon": "timeline", + "icon": "search", "name": { - "zh_CN": "时间线" + "zh_CN": "搜索框" }, - "component": "TinyTimeLine", - "description": "TimeLine 时间线", + "component": "TinySearch", + "description": "指定条件对象进行搜索数据", "docUrl": "", "screenshot": "", "tags": "", @@ -11131,10 +10784,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "TimeLine" + "exportName": "Search", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 3, + "priority": 2, "schema": { "properties": [ { @@ -11146,68 +10803,70 @@ }, "content": [ { - "property": "horizontal", - "type": "Boolean", - "defaultValue": { - "type": "i18n", - "zh_CN": "布局", - "en_US": "layout", - "key": "" - }, + "property": "modelValue", "label": { "text": { - "zh_CN": "水平布局" + "zh_CN": "默认值" } }, + "required": true, + "readOnly": false, + "disabled": false, "cols": 12, - "rules": [], - "hidden": false, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框内的默认搜索值" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, "required": true, "readOnly": false, "disabled": false, + "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "节点和文字横向布局" + "zh_CN": "是否被禁用" }, "labelPosition": "left" }, { - "property": "vertical", - "type": "Boolean", - "defaultValue": { - "type": "i18n", - "zh_CN": "垂直布局", - "en_US": "layout", - "key": "" - }, + "property": "placeholder", "label": { "text": { - "zh_CN": "垂直布局" + "zh_CN": "占位文本" } }, - "cols": 12, - "rules": [], - "hidden": false, "required": true, "readOnly": false, "disabled": false, + "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "节点和文字垂直布局" + "zh_CN": "输入框内的提示占位文本" }, "labelPosition": "left" }, { - "property": "active", + "property": "clearable", "label": { "text": { - "zh_CN": "选中值" + "zh_CN": "清空按钮" } }, "required": true, @@ -11215,60 +10874,126 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "步骤条的选中步骤值" + "zh_CN": "设置显示清空图标按钮" }, "labelPosition": "left" }, { - "property": "data", + "property": "isEnterSearch", "label": { "text": { - "zh_CN": "步骤条数据" + "zh_CN": "Enter键触发" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": [ - { - "name": "配置基本信息", - "status": "ready" - }, - { - "name": "配置报价", - "status": "wait" - }, - { - "name": "完成报价", - "status": "wait" + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否在按下键盘Enter键的时候触发search事件" + }, + "labelPosition": "left" + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ + { + "property": "mini", + "label": { + "text": { + "zh_CN": "迷你尺寸" } - ], + }, + "required": true, + "readOnly": false, + "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "迷你模式,配置为true时,搜索默认显示为一个带图标的圆形按钮,点击后展开" + }, + "labelPosition": "left" + }, + { + "property": "transparent", + "label": { + "text": { + "zh_CN": "透明模式" } }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, "description": { - "zh_CN": "时间线步骤条数据" + "zh_CN": "配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景,默认 false" + }, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "输入完成时触发" + }, + "description": { + "zh_CN": "在 input 框中输入完成时触发的回调函数" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "type", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "搜索类型,默认值为 {} " + } }, - "labelPosition": "top" - } - ] - } - ], - "events": { - "onClick": { + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "当前input框中值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onSearch": { "label": { - "zh_CN": "节点的点击时触发" + "zh_CN": "点击搜索按钮时触发" }, "description": { - "zh_CN": "节点的点击时触发的回调函数" + "zh_CN": "展开状态点击搜索按钮时触发的回调函数" }, "type": "event", "functionInfo": { @@ -11278,7 +11003,7 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "点击节点的下标" + "zh_CN": "搜索类型,默认值为 {} " } }, { @@ -11286,7 +11011,7 @@ "type": "string", "defaultValue": "", "description": { - "zh_CN": "当前节点对象:{ name: 节点名称, time: 时间 }" + "zh_CN": "当前input框中值" } } ], @@ -11312,7 +11037,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["active", "data"] + "properties": ["clearable", "mini"] }, "contextMenu": { "actions": ["create symbol"], @@ -11321,12 +11046,12 @@ } }, { - "icon": "tooltip", + "icon": "select", "name": { - "zh_CN": "文字提示框" + "zh_CN": "下拉框" }, - "component": "TinyTooltip", - "description": "动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信", + "component": "TinySelect", + "description": "Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件", "docUrl": "", "screenshot": "", "tags": "", @@ -11334,10 +11059,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Tooltip" + "exportName": "Select", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 11, + "priority": 8, "schema": { "properties": [ { @@ -11349,10 +11078,10 @@ }, "content": [ { - "property": "placement", + "property": "modelValue", "label": { "text": { - "zh_CN": "提示位置" + "zh_CN": "绑定值" } }, "required": true, @@ -11360,216 +11089,149 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "top", - "value": "top" - }, - { - "label": "top-start", - "value": "top-start" - }, - { - "label": "top-end", - "value": "top-end" - }, - { - "label": "bottom", - "value": "bottom" - }, - { - "label": "bottom-start", - "value": "bottom-start" - }, - { - "label": "bottom-end", - "value": "bottom-end" - }, - { - "label": "left", - "value": "left" - }, - { - "label": "left-start", - "value": "left-start" - }, - { - "label": "left-end", - "value": "left-end" - }, - { - "label": "right", - "value": "right" - }, - { - "label": "right-start", - "value": "right-start" - }, - { - "label": "right-end", - "value": "right-end" - } - ] - } + "component": "InputConfigurator", + "props": {} }, "description": { - "zh_CN": "Tooltip 的出现位置" + "zh_CN": "双向绑定的当前选中值" }, "labelPosition": "left" }, { - "property": "content", + "property": "placeholder", "label": { "text": { - "zh_CN": "内容" + "zh_CN": "占位文本" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": "提示信息", "cols": 12, "widget": { "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "显示的内容,也可以通过 slot#content 传入 DOM" + "zh_CN": "输入框占位文本" }, "labelPosition": "left" }, { - "property": "render-content", + "property": "clearable", "label": { "text": { - "zh_CN": "渲染函数" + "zh_CN": "清除按钮" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": { - "disabled": true, - "placeholder": "请使用变量绑定来绑定函数" + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "searchable", + "label": { + "text": { + "zh_CN": "下拉可搜索" } }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, "description": { - "zh_CN": "自定义渲染函数,返回需要渲染的节点内容" - } + "zh_CN": "下拉面板是否可搜索" + }, + "labelPosition": "left" }, { - "property": "modelValue", + "property": "disabled", "label": { "text": { - "zh_CN": "是否可见" + "zh_CN": "禁用" } }, - "defaultValue": true, + "required": true, + "readOnly": false, + "disabled": false, "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "状态是否可见" + "zh_CN": "是否禁用" }, "labelPosition": "left" }, { - "property": "manual", + "property": "options", "label": { "text": { - "zh_CN": "手动控制" + "zh_CN": "选项数据" } }, - "defaultValue": true, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "配置 Select 下拉数据项" + }, + "labelPosition": "top" + }, + { + "property": "multiple", + "label": { + "text": { + "zh_CN": "多选" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效" + "zh_CN": "是否允许输入框输入或选择多个项" }, "labelPosition": "left" } ] - } - ], - "events": {}, - "slots": { - "content": { - "label": { - "zh_CN": "提示内容" - }, - "description": { - "zh_CN": "自定义提示内容" - } - } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": true, - "isModal": false, - "isPopper": true, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["disabled", "content"] - }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - }, - { - "icon": "popover", - "name": { - "zh_CN": "提示框" - }, - "component": "TinyPopover", - "description": "Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "Popover" - }, - "group": "component", - "priority": 7, - "schema": { - "properties": [ + }, { + "name": "1", "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" + "zh_CN": "其他" }, "content": [ { - "property": "modelValue", + "property": "multiple-limit", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "最大可选值" } }, "required": true, @@ -11577,19 +11239,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "双向绑定,手动控制是否可见的状态值" + "zh_CN": "多选时用户最多可以选择的项目数,为 0 则不限制" }, "labelPosition": "left" }, { - "property": "placement", + "property": "popper-class", "label": { "text": { - "zh_CN": "位置" + "zh_CN": "下拉框类名" } }, "required": true, @@ -11597,70 +11259,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "top", - "value": "top" - }, - { - "label": "top-start", - "value": "top-start" - }, - { - "label": "top-end", - "value": "top-end" - }, - { - "label": "bottom", - "value": "bottom" - }, - { - "label": "bottom-start", - "value": "bottom-start" - }, - { - "label": "bottom-end", - "value": "bottom-end" - }, - { - "label": "left", - "value": "left" - }, - { - "label": "left-start", - "value": "left-start" - }, - { - "label": "left-end", - "value": "left-end" - }, - { - "label": "right", - "value": "right" - }, - { - "label": "right-start", - "value": "right-start" - }, - { - "label": "right-end", - "value": "right-end" - } - ] - } + "component": "InputConfigurator", + "props": {} }, "description": { - "zh_CN": "提示框位置" + "zh_CN": "设置下拉框自定义的类名" }, "labelPosition": "left" }, { - "property": "trigger", + "property": "collapse-tags", "label": { "text": { - "zh_CN": "触发方式" + "zh_CN": "多选展示" } }, "required": true, @@ -11668,38 +11279,214 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "click", - "value": "click" - }, - { - "label": "focus", - "value": "focus" - }, - { - "label": "hover", - "value": "hover" - }, - { - "label": "manual", - "value": "manual" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "触发方式,该属性的可选值为 click / focus / hover / manual,该属性的默认值为 click" + "zh_CN": "多选时是否将选中值按文字的形式展示" }, "labelPosition": "left" - }, + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在下拉框值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "下拉框选中项的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "当前选中的值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的当前选中值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + }, + "onRemoveTag": { + "label": { + "zh_CN": "多选模式下移除tag时触发" + }, + "description": { + "zh_CN": "多选模式下移除tag时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "被移除Tag对应数据项的值字段" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + }, + "onBeforeMount": "console.log('table on load'); this.options = source.data" + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["multiple", "options"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "switch", + "name": { + "zh_CN": "开关" + }, + "component": "TinySwitch", + "description": "Switch 在两种状态间切换选择", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Switch", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 9, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "popper-class", + "property": "disabled", "label": { "text": { - "zh_CN": "自定义类" + "zh_CN": "禁用" } }, "required": true, @@ -11707,19 +11494,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "为 popper 添加类名" + "zh_CN": "是否被禁用" }, "labelPosition": "left" }, { - "property": "visible-arrow", + "property": "modelValue", "label": { "text": { - "zh_CN": "显示箭头" + "zh_CN": "绑定值" } }, "required": true, @@ -11727,19 +11514,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示 Tooltip 箭头" + "zh_CN": "绑定默认值" }, "labelPosition": "left" }, { - "property": "append-to-body", + "property": "true-value", "label": { "text": { - "zh_CN": "添加到body上" + "zh_CN": "设置打开值" } }, "required": true, @@ -11747,38 +11534,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "Popover弹窗是否添加到body上" + "zh_CN": "设置打开时的值(Boolean / String / Number)" }, "labelPosition": "left" }, { - "property": "arrow-offset", - "label": { - "text": { - "zh_CN": "箭头的位置偏移" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "箭头的位置偏移,该属性的默认值为 0" - } - }, - { - "property": "close-delay", + "property": "false-value", "label": { "text": { - "zh_CN": "延迟隐藏" + "zh_CN": "设置关闭值" } }, "required": true, @@ -11786,19 +11554,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + "zh_CN": "设置关闭时的值(Boolean / String / Number)" }, "labelPosition": "left" }, { - "property": "content", + "property": "mini", "label": { "text": { - "zh_CN": "显示的内容" + "zh_CN": "迷你尺寸" } }, "required": true, @@ -11806,19 +11574,118 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" + "zh_CN": "是否显示为 mini 模式" }, "labelPosition": "left" - }, + } + ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "点击事件" + }, + "description": { + "zh_CN": "按钮被点击时触发的回调函数" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + }, + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "开关的状态值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的开关状态值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["disabled", "mini"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "tabitem", + "name": { + "zh_CN": "tab页签" + }, + "component": "TinyTabItem", + "description": "tab 标签页", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TabItem", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "disabled", + "property": "name", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "唯一标识" } }, "required": true, @@ -11826,19 +11693,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "Popover 是否可用" - }, - "labelPosition": "left" + "zh_CN": "唯一标识" + } }, { - "property": "offset", + "property": "title", "label": { "text": { - "zh_CN": "位置偏移量" + "zh_CN": "标题" } }, "required": true, @@ -11846,19 +11712,89 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "出现位置的偏移量" - }, - "labelPosition": "left" - }, + "zh_CN": "标题" + } + } + ] + } + ], + "events": {}, + "slots": { + "title": { + "label": { + "zh_CN": "标题" + }, + "description": { + "zh_CN": "自定义标题" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": ["TinyTab"], + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["name", "title"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "tabs", + "name": { + "zh_CN": "标签页" + }, + "component": "TinyTabs", + "description": "分隔内容上有关联但属于不同类别的数据集合", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Tabs", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 10, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "open-delay", + "property": "showEditIcon", "label": { "text": { - "zh_CN": "显示延迟" + "zh_CN": "显示编辑图标" } }, "required": true, @@ -11866,39 +11802,41 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" + "zh_CN": "是否显示标题后编辑 ICON" }, "labelPosition": "left" }, { - "property": "popper-options", + "property": "tabs", "label": { "text": { - "zh_CN": "弹出层参数" + "zh_CN": "选项卡" } }, "required": true, "readOnly": false, "disabled": false, + "defaultValue": "", "cols": 12, + "bindState": false, "widget": { - "component": "CodeConfigurator", + "component": "ContainerConfigurator", "props": {} }, "description": { - "zh_CN": "popper.js 的参数" + "zh_CN": "tabs 选项卡" }, - "labelPosition": "top" + "labelPosition": "none" }, { - "property": "title", + "property": "modelValue", "label": { "text": { - "zh_CN": "标题" + "zh_CN": "绑定值" } }, "required": true, @@ -11910,15 +11848,15 @@ "props": {} }, "description": { - "zh_CN": "提示内容标题" + "zh_CN": "绑定值,选中选项卡的 name" }, "labelPosition": "left" }, { - "property": "transform-origin", + "property": "with-add", "label": { "text": { - "zh_CN": "旋转中心点" + "zh_CN": "标签新增" } }, "required": true, @@ -11930,15 +11868,15 @@ "props": {} }, "description": { - "zh_CN": "组件的旋转中心点,组件的旋转中心点" + "zh_CN": "标签是否可增加" }, "labelPosition": "left" }, { - "property": "transition", + "property": "with-close", "label": { "text": { - "zh_CN": "渐变动画" + "zh_CN": "可关闭" } }, "required": true, @@ -11946,19 +11884,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "该属性的默认值为 fade-in-linear" + "zh_CN": "标签是否可关闭" }, "labelPosition": "left" }, { - "property": "width", + "property": "tab-style", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "标签页样式" } }, "required": true, @@ -11966,11 +11904,22 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "card", + "value": "card" + }, + { + "label": "border-card", + "value": "border-card" + } + ] + } }, "description": { - "zh_CN": "宽度" + "zh_CN": "标签页样式" }, "labelPosition": "left" } @@ -11978,22 +11927,84 @@ } ], "events": { - "onUpdate:modelValue": { + "onClick": { "label": { - "zh_CN": "双向绑定的值改变时触发" + "zh_CN": "点击页签时触发事件" }, "description": { - "zh_CN": "手动控制是否可见的状态值改变时触发" + "zh_CN": "在 Input 值改变时触发" }, "type": "event", "functionInfo": { "params": [ { - "name": "value", - "type": "boolean", + "name": "component", + "type": "Object", "defaultValue": "", "description": { - "zh_CN": "双向绑定的可见状态值" + "zh_CN": "当前点击的页签对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onEdit": { + "label": { + "zh_CN": "点击新增按钮或关闭按钮或者编辑按钮后触发" + }, + "description": { + "zh_CN": "点击新增按钮或关闭按钮或者编辑按钮后触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "tab", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前操作的页签对象" + } + }, + { + "name": "type", + "type": "String", + "defaultValue": "", + "description": { + "zh_CN": "当前操作的类型(remove || add || edit)" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onClose": { + "label": { + "zh_CN": "关闭页签时触发" + }, + "description": { + "zh_CN": "关闭页签时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "name", + "type": "String", + "defaultValue": "", + "description": { + "zh_CN": "页签名称" } } ], @@ -12008,19 +12019,19 @@ "condition": true, "styles": true, "isContainer": true, + "clickCapture": false, "isModal": false, - "isPopper": true, "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" + "childWhitelist": ["TinyTabItem"], + "parentWhitelist": [], + "descendantBlacklist": [], + "ancestorWhitelist": [] }, "isNullNode": false, "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["visible", "width"] + "properties": ["size", "tab-style"] }, "contextMenu": { "actions": ["create symbol"], @@ -12029,12 +12040,12 @@ } }, { + "icon": "timeline", "name": { - "zh_CN": "日期选择" + "zh_CN": "时间线" }, - "component": "TinyDatePicker", - "icon": "datepick", - "description": "用于输入或选择日期", + "component": "TinyTimeLine", + "description": "TimeLine 时间线", "docUrl": "", "screenshot": "", "tags": "", @@ -12042,144 +12053,87 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "DatePicker" + "exportName": "TimeLine", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 1, + "priority": 3, "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "绑定值" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "I18nConfigurator", - "props": {} - }, - "description": { - "zh_CN": "双向绑定值" - }, - "labelPosition": "left" - }, - { - "property": "type", - "label": { - "text": { - "zh_CN": "类型" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "日期", - "value": "date" - }, - { - "label": "日期时间", - "value": "datetime" - }, - { - "label": "周", - "value": "week" - }, - { - "label": "月份", - "value": "month" - }, - { - "label": "年份", - "value": "year" - } - ] - } - }, - "description": { - "zh_CN": "设置日期框的type属性" - }, - "labelPosition": "left" - }, + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "placeholder", - "label": { - "text": { - "zh_CN": "占位文本" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "I18nConfigurator", - "props": {} - }, - "description": { - "zh_CN": "输入框占位文本" + "property": "horizontal", + "type": "Boolean", + "defaultValue": { + "type": "i18n", + "zh_CN": "布局", + "en_US": "layout", + "key": "" }, - "labelPosition": "left" - }, - { - "property": "clearable", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "水平布局" } }, + "cols": 12, + "rules": [], + "hidden": false, "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示清除按钮" + "zh_CN": "节点和文字横向布局" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "vertical", + "type": "Boolean", + "defaultValue": { + "type": "i18n", + "zh_CN": "垂直布局", + "en_US": "layout", + "key": "" + }, "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "垂直布局" } }, - "required": false, + "cols": 12, + "rules": [], + "hidden": false, + "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "节点和文字垂直布局" }, "labelPosition": "left" }, { - "property": "readonly", + "property": "active", "label": { "text": { - "zh_CN": "只读" + "zh_CN": "选中值" } }, "required": true, @@ -12187,231 +12141,84 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "是否只读" + "zh_CN": "步骤条的选中步骤值" }, "labelPosition": "left" }, { - "property": "size", + "property": "data", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "步骤条数据" } }, "required": true, "readOnly": false, "disabled": false, + "defaultValue": [ + { + "name": "配置基本信息", + "status": "ready" + }, + { + "name": "配置报价", + "status": "wait" + }, + { + "name": "完成报价", + "status": "wait" + } + ], "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "CodeConfigurator", "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] + "language": "json" } }, "description": { - "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "时间线步骤条数据" }, - "labelPosition": "left" + "labelPosition": "top" } ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ - { - "property": "maxlength", - "label": { - "text": { - "zh_CN": "输入最大长度" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "设置 input 框的maxLength" - } - }, - { - "property": "autofocus", - "label": { - "text": { - "zh_CN": "聚焦" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "自动获取焦点" - }, - "labelPosition": "left" - } - ], - "description": { - "zh_CN": "" - } } ], "events": { - "onChange": { - "label": { - "zh_CN": "值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框改变后的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框输入的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onUpdate:modelValue": { + "onClick": { "label": { - "zh_CN": "双向绑定的值改变时触发" + "zh_CN": "节点的点击时触发" }, "description": { - "zh_CN": "在 Input 输入值改变时触发" + "zh_CN": "节点的点击时触发的回调函数" }, "type": "event", "functionInfo": { "params": [ { - "name": "value", + "name": "type", "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "zh_CN": "点击节点的下标" + } + }, { - "name": "event", - "type": "Object", + "name": "value", + "type": "string", "defaultValue": "", "description": { - "zh_CN": "原生 event" + "zh_CN": "当前节点对象:{ name: 节点名称, time: 时间 }" } } ], "returns": {} }, "defaultValue": "" - }, - "onClear": { - "label": { - "zh_CN": "点击清空按钮时触发" - }, - "description": { - "zh_CN": "点击清空按钮时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" } } }, @@ -12419,7 +12226,7 @@ "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, "nestingRule": { "childWhitelist": "", @@ -12431,7 +12238,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["value", "disabled"] + "properties": ["active", "data"] }, "contextMenu": { "actions": ["create symbol"], @@ -12440,12 +12247,12 @@ } }, { + "icon": "tooltip", "name": { - "zh_CN": "数字输入框" + "zh_CN": "文字提示框" }, - "component": "TinyNumeric", - "icon": "numeric", - "description": "通过鼠标或键盘输入字符", + "component": "TinyTooltip", + "description": "动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信", "docUrl": "", "screenshot": "", "tags": "", @@ -12453,10 +12260,14 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Numeric" + "exportName": "Tooltip", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true }, "group": "component", - "priority": 1, + "priority": 11, "schema": { "properties": [ { @@ -12468,49 +12279,231 @@ }, "content": [ { - "property": "modelValue", + "property": "placement", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "提示位置" } }, "required": true, "readOnly": false, "disabled": false, + "cols": 12, "widget": { - "component": "I18nConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "top", + "value": "top" + }, + { + "label": "top-start", + "value": "top-start" + }, + { + "label": "top-end", + "value": "top-end" + }, + { + "label": "bottom", + "value": "bottom" + }, + { + "label": "bottom-start", + "value": "bottom-start" + }, + { + "label": "bottom-end", + "value": "bottom-end" + }, + { + "label": "left", + "value": "left" + }, + { + "label": "left-start", + "value": "left-start" + }, + { + "label": "left-end", + "value": "left-end" + }, + { + "label": "right", + "value": "right" + }, + { + "label": "right-start", + "value": "right-start" + }, + { + "label": "right-end", + "value": "right-end" + } + ] + } }, "description": { - "zh_CN": "双向绑定值" + "zh_CN": "Tooltip 的出现位置" }, "labelPosition": "left" }, { - "property": "placeholder", + "property": "content", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "内容" } }, "required": true, "readOnly": false, "disabled": false, + "defaultValue": "提示信息", "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "显示的内容,也可以通过 slot#content 传入 DOM" }, "labelPosition": "left" }, { - "property": "allow-empty", + "property": "render-content", "label": { "text": { - "zh_CN": "内容可清空" + "zh_CN": "渲染函数" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": { + "disabled": true, + "placeholder": "请使用变量绑定来绑定函数" + } + }, + "description": { + "zh_CN": "自定义渲染函数,返回需要渲染的节点内容" + } + }, + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "是否可见" + } + }, + "defaultValue": true, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "状态是否可见" + }, + "labelPosition": "left" + }, + { + "property": "manual", + "label": { + "text": { + "zh_CN": "手动控制" + } + }, + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {}, + "slots": { + "content": { + "label": { + "zh_CN": "提示内容" + }, + "description": { + "zh_CN": "自定义提示内容" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": true, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["disabled", "content"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "icon": "tree", + "name": { + "zh_CN": "树" + }, + "component": "TinyTree", + "description": "可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Tree", + "version": "3.20.0", + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css", + "destructuring": true + }, + "group": "component", + "priority": 12, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "show-checkbox", + "label": { + "text": { + "zh_CN": "多选" } }, "required": true, @@ -12522,35 +12515,45 @@ "props": {} }, "description": { - "zh_CN": "是否内容可清空" + "zh_CN": "设置接口是否可以多选" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "data", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "数据源" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "defaultValue": [ + { + "label": "一级 1", + "children": [ + { + "label": "二级 1-1" + } + ] } - }, - "required": false, - "readOnly": false, - "disabled": false, + ], "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "CodeConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "可配置静态数据源和动态数据源" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "size", + "property": "node-key", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "唯一标识" } }, "required": true, @@ -12558,34 +12561,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] - } + "component": "InputConfigurator", + "props": {} }, "description": { - "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "节点唯一标识属性名称" }, "labelPosition": "left" }, { - "property": "controls", + "property": "render-content", "label": { "text": { - "zh_CN": "加减按钮" + "zh_CN": "渲染函数" } }, "required": false, @@ -12593,19 +12581,21 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "InputConfigurator", + "props": { + "disabled": true, + "placeholder": "请使用变量绑定来绑定函数" + } }, "description": { - "zh_CN": "是否使用加减按钮" - }, - "labelPosition": "left" + "zh_CN": "树节点的内容区的渲染函数" + } }, { - "property": "controls-position", + "property": "icon-trigger-click-node", "label": { "text": { - "zh_CN": "加减按钮位置" + "zh_CN": "触发NodeClick事件" } }, "required": true, @@ -12613,224 +12603,133 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "左右两侧", - "value": "" - }, - { - "label": "只在右侧", - "value": "right" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "加减按钮位置" - } + "zh_CN": "点击图标展开节点时是否触发 node-click 事件" + }, + "labelPosition": "left" }, { - "property": "precision", + "property": "expand-icon", "label": { "text": { - "zh_CN": "精度" + "zh_CN": "展开图标" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } + "component": "CodeConfigurator", + "props": {} }, "description": { - "zh_CN": "数值精度" + "zh_CN": "节点展开图标" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "step", + "property": "shrink-icon", "label": { "text": { - "zh_CN": "步长" + "zh_CN": "收缩图标" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } + "component": "CodeConfigurator", + "props": {} }, "description": { - "zh_CN": "步长" + "zh_CN": "节点收缩的图标" }, - "labelPosition": "left" - }, + "labelPosition": "top" + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ { - "property": "max", + "property": "check-on-click-node", "label": { "text": { - "zh_CN": "最大数值" + "zh_CN": "点击节点选中" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "可输入的最大数值" + "zh_CN": "是否在点击节点的时候选中节点,默认值为 false,即只有在点击复选框时才会选中节点" }, "labelPosition": "left" }, { - "property": "min", + "property": "filter-node-method", "label": { "text": { - "zh_CN": "最小数值" + "zh_CN": "筛选函数" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } + "component": "CodeConfigurator", + "props": {} }, "description": { - "zh_CN": "可输入的最大数值" + "zh_CN": "节点筛选函数" }, - "labelPosition": "left" + "labelPosition": "top" } - ] + ], + "description": { + "zh_CN": "" + } } ], "events": { - "onChange": { - "label": { - "zh_CN": "值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框改变后的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框输入的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定的值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { + "onCheck": { "label": { - "zh_CN": "失去焦点时触发" + "zh_CN": "勾选节点后的事件" }, "description": { - "zh_CN": "在 Input 失去焦点时触发" + "zh_CN": "勾选节点后的事件" }, "type": "event", "functionInfo": { "params": [ { - "name": "event", - "type": "Object", + "name": "data", + "type": "object", "defaultValue": "", "description": { - "zh_CN": "原生 event" + "zh_CN": "当前选中节点信息" } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", + }, + { + "name": "currentNode", + "type": "object", "defaultValue": "", "description": { - "zh_CN": "原生 event" + "zh_CN": "树组件目前的选中状态信息,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性" } } ], @@ -12838,16 +12737,41 @@ }, "defaultValue": "" }, - "onClear": { + "onNodeClick": { "label": { - "zh_CN": "点击清空按钮时触发" + "zh_CN": "点击节点后的事件" }, "description": { - "zh_CN": "点击清空按钮时触发" + "zh_CN": "点击节点后的事件" }, "type": "event", "functionInfo": { - "params": [], + "params": [ + { + "name": "data", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中节点信息" + } + }, + { + "name": "node", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "树组件目前的选中状态信息,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性" + } + }, + { + "name": "vm", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "树组件实例" + } + } + ], "returns": {} }, "defaultValue": "" @@ -12858,7 +12782,7 @@ "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, "nestingRule": { "childWhitelist": "", @@ -12870,121 +12794,191 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["value", "disabled"] + "properties": ["data", "show-checkbox"] }, "contextMenu": { "actions": ["create symbol"], "disable": ["copy", "remove"] } } - } - ], - "blocks": [], - "snippets": [ + }, { - "group": "layout", - "label": { - "zh_CN": "布局与容器" + "name": { + "zh_CN": "视频" }, - "children": [ - { - "name": { - "zh_CN": "栅格布局" - }, - "icon": "row", - "screenshot": "", - "snippetName": "TinyLayout", - "schema": { - "componentName": "TinyLayout", - "props": {}, - "children": [ + "component": "video", + "icon": "video", + "description": "视频", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": {}, + "group": "component", + "priority": 50, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "componentName": "TinyRow", - "props": { - "style": "padding: 10px;" + "property": "src", + "label": { + "text": { + "zh_CN": "资源" + } }, - "children": [ - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "视频的 URL" + } + }, + { + "property": "width", + "label": { + "text": { + "zh_CN": "播放器宽度" } - ] + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "视频播放器的宽度" + } }, { - "componentName": "TinyRow", - "props": { - "style": "padding: 10px;" + "property": "height", + "label": { + "text": { + "zh_CN": "播放器高度" + } }, - "children": [ - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "视频播放器的高度" + } + }, + { + "property": "controls", + "label": { + "text": { + "zh_CN": "显示控件" } - ] + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示控件" + }, + "labelPosition": "left" + }, + { + "property": "autoplay", + "label": { + "text": { + "zh_CN": "马上播放" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否马上播放" + }, + "labelPosition": "left" + }, + { + "property": "attributes3", + "label": { + "text": { + "zh_CN": "原生属性" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "HtmlAttributesConfigurator", + "props": {} + }, + "description": { + "zh_CN": "原生属性" + }, + "labelPosition": "none" } ] } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": [], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [], + "disable": [] } - ] - }, + } + } + ], + "blocks": [], + "snippets": [ { "group": "basic", - "label": { - "zh_CN": "基础元素" - }, "children": [ - { - "name": { - "zh_CN": "段落" - }, - "icon": "paragraph", - "screenshot": "", - "snippetName": "p", - "schema": { - "componentName": "p", - "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" - } - }, { "name": { "zh_CN": "链接" @@ -12997,15 +12991,6 @@ "children": "链接" } }, - { - "name": { - "zh_CN": "分隔线" - }, - "icon": "hr", - "screenshot": "", - "snippetName": "hr", - "schema": {} - }, { "name": { "zh_CN": "标题" @@ -13021,19 +13006,14 @@ }, { "name": { - "zh_CN": "视频" + "zh_CN": "段落" }, - "icon": "video", + "icon": "paragraph", "screenshot": "", - "snippetName": "video", + "snippetName": "p", "schema": { - "componentName": "video", - "props": { - "src": "img/webNova.jpg", - "width": "200", - "height": "100", - "style": "border:1px solid #ccc" - } + "componentName": "p", + "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" } }, { @@ -13050,44 +13030,6 @@ } } }, - { - "name": { - "zh_CN": "按钮组" - }, - "icon": "buttons", - "snippetName": "TinyButtons", - "screenshot": "", - "schema": { - "componentName": "div", - "props": {}, - "children": [ - { - "componentName": "TinyButton", - "props": { - "text": "提交", - "type": "primary", - "style": "margin: 0 5px 0 5px;" - } - }, - { - "componentName": "TinyButton", - "props": { - "text": "重置", - "style": "margin: 0 5px 0 5px;" - } - }, - { - "componentName": "TinyButton", - "props": { - "text": "取消" - } - } - ] - }, - "configure": { - "isContainer": true - } - }, { "name": { "zh_CN": "互斥按钮组" @@ -13130,172 +13072,125 @@ "placeholder": "输入关键词" } } + }, + { + "name": { + "zh_CN": "视频" + }, + "icon": "video", + "screenshot": "", + "snippetName": "video", + "schema": { + "componentName": "video", + "props": { + "src": "img/webNova.jpg", + "width": "200", + "height": "100", + "style": "border:1px solid #ccc" + } + } } ] }, { - "group": "form", - "label": { - "zh_CN": "表单类型" - }, + "group": "html", + "children": [] + }, + { + "group": "element-plus", "children": [ { "name": { - "zh_CN": "表单" + "zh_CN": "按钮" }, + "icon": "button", "screenshot": "", - "snippetName": "tiny-form", - "icon": "form", + "snippetName": "ElButton", "schema": { - "componentName": "TinyForm", - "props": { - "labelWidth": "80px", - "labelPosition": "top" - }, "children": [ { - "componentName": "TinyFormItem", + "componentName": "Text", "props": { - "label": "人员" - }, - "children": [ - { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - ] - }, + "text": "按钮文本" + } + } + ] + } + }, + { + "name": { + "zh_CN": "表单" + }, + "icon": "form", + "screenshot": "", + "snippetName": "ElForm", + "schema": { + "children": [ { - "componentName": "TinyFormItem", + "componentName": "ElFormItem", "props": { - "label": "密码" + "label": "账号", + "prop": "account" }, "children": [ { - "componentName": "TinyInput", + "componentName": "ElInput", "props": { - "placeholder": "请输入", "modelValue": "", - "type": "password" + "placeholder": "请输入账号" } } ] }, { - "componentName": "TinyFormItem", - "props": { - "label": "" - }, - "children": [ - { - "componentName": "TinyButton", - "props": { - "text": "提交", - "type": "primary", - "style": "margin-right: 10px" - } - }, - { - "componentName": "TinyButton", - "props": { - "text": "重置", - "type": "primary" - } - } - ] - } - ] - } - }, - { - "name": { - "zh_CN": "下拉框" - }, - "icon": "select", - "screenshot": "", - "snippetName": "TinySelect", - "schema": { - "componentName": "TinySelect", - "props": { - "modelValue": "", - "placeholder": "请选择", - "options": [ - { - "value": "1", - "label": "黄金糕" - }, - { - "value": "2", - "label": "双皮奶" - } - ] - } - } - }, - { - "name": { - "zh_CN": "开关" - }, - "icon": "switch", - "screenshot": "", - "snippetName": "TinySwitch", - "schema": { - "componentName": "TinySwitch", - "props": { - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "复选框组" - }, - "icon": "checkboxs", - "screenshot": "", - "snippetName": "TinyCheckboxGroup", - "schema": { - "componentName": "TinyCheckboxGroup", - "props": { - "modelValue": ["name1", "name2"], - "type": "checkbox", - "options": [ - { - "text": "复选框1", - "label": "name1" - }, - { - "text": "复选框2", - "label": "name2" - }, - { - "text": "复选框3", - "label": "name3" - } - ] - } - } - }, - { - "name": { - "zh_CN": "复选框拖拽按钮组" - }, - "icon": "checkboxgroup", - "screenshot": "", - "snippetName": "TinyCheckboxbuttonGroup", - "schema": { - "componentName": "TinyCheckboxGroup", - "props": { - "modelValue": [] - }, - "children": [ - { - "componentName": "TinyCheckboxButton", + "componentName": "ElFormItem", + "props": { + "label": "密码", + "prop": "password" + }, "children": [ { - "componentName": "div" + "componentName": "ElInput", + "props": { + "modelValue": "", + "placeholder": "请输入密码", + "type": "password" + } + } + ] + }, + { + "componentName": "ElFormItem", + "props": {}, + "children": [ + { + "componentName": "ElButton", + "props": { + "type": "primary", + "style": "margin-right: 10px" + }, + "children": [ + { + "componentName": "Text", + "props": { + "text": "提交" + } + } + ] + }, + { + "componentName": "ElButton", + "props": { + "type": "primary" + }, + "children": [ + { + "componentName": "Text", + "props": { + "text": "重置" + } + } + ] } ] } @@ -13308,137 +13203,99 @@ }, "icon": "input", "screenshot": "", - "snippetName": "TinyInput", - "schema": { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "单选" - }, - "icon": "radio", - "screenshot": "", - "snippetName": "TinyRadio", - "schema": { - "componentName": "TinyRadio", - "props": { - "label": "1", - "text": "单选文本" - } - } - }, - { - "name": { - "zh_CN": "复选框" - }, - "icon": "checkbox", - "screenshot": "", - "snippetName": "TinyCheckbox", - "schema": { - "componentName": "TinyCheckbox", - "props": { - "text": "复选框文案" - } - } - }, - { - "name": { - "zh_CN": "日期选择" - }, - "icon": "datepick", - "screenshot": "", - "snippetName": "TinyDatePicker", - "schema": { - "componentName": "TinyDatePicker", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } + "snippetName": "ElInput", + "schema": {} }, { "name": { - "zh_CN": "数字输入框" + "zh_CN": "表格" }, - "icon": "numeric", + "icon": "grid", "screenshot": "", - "snippetName": "TinyNumeric", + "snippetName": "ElTable", "schema": { - "componentName": "TinyNumeric", "props": { - "allow-empty": true, - "placeholder": "请输入", - "controlsPosition": "right", - "step": 1 + "data": [ + { + "date": "2016-05-03", + "name": "Tom", + "address": "No. 189, Grove St, Los Angeles" + }, + { + "date": "2016-05-02", + "name": "Tom", + "address": "No. 189, Grove St, Los Angeles" + }, + { + "date": "2016-05-04", + "name": "Tom", + "address": "No. 189, Grove St, Los Angeles" + }, + { + "date": "2016-05-01", + "name": "Tom", + "address": "No. 189, Grove St, Los Angeles" + } + ], + "columns": [ + { + "type": "index" + }, + { + "label": "Date", + "prop": "date" + }, + { + "label": "Name", + "prop": "name" + }, + { + "label": "Address", + "prop": "address" + } + ] } } } ] }, { - "group": "table", - "label": { - "zh_CN": "表格类型" - }, + "group": "表单", + "children": [] + }, + { + "group": "图片", + "children": [] + }, + { + "group": "表格", + "children": [] + }, + { + "group": "navigation", "children": [ { "name": { - "zh_CN": "表格" + "zh_CN": "面包屑" }, - "icon": "grid", + "icon": "breadcrumb", "screenshot": "", - "snippetName": "tinyGrid", + "snippetName": "TinyBreadcrumb", "schema": { - "componentName": "TinyGrid", + "componentName": "TinyBreadcrumb", "props": { - "editConfig": { - "trigger": "click", - "mode": "cell", - "showStatus": true - }, - "columns": [ - { - "type": "index", - "width": 60 - }, - { - "type": "selection", - "width": 60 - }, - { - "field": "employees", - "title": "员工数" - }, + "options": [ { - "field": "created_date", - "title": "创建日期" + "to": "{ path: '/' }", + "label": "首页" }, { - "field": "city", - "title": "城市" - } - ], - "data": [ - { - "id": "1", - "name": "GFD科技有限公司", - "city": "福州", - "employees": 800, - "created_date": "2014-04-30 00:56:00", - "boole": false + "to": "{ path: '/breadcrumb' }", + "label": "产品" }, { - "id": "2", - "name": "WWW科技有限公司", - "city": "深圳", - "employees": 300, - "created_date": "2016-07-08 12:36:22", - "boole": true + "replace": "true", + "label": "软件" } ] } @@ -13446,18 +13303,73 @@ }, { "name": { - "zh_CN": "分页" + "zh_CN": "标签页" + }, + "icon": "tabs", + "screenshot": "", + "group": true, + "snippetName": "TinyTabs", + "schema": { + "componentName": "TinyTabs", + "props": { + "modelValue": "first" + }, + "children": [ + { + "componentName": "TinyTabItem", + "props": { + "title": "标签页1", + "name": "first" + }, + "children": [ + { + "componentName": "div", + "props": { + "style": "margin:10px 0 0 30px" + } + } + ] + }, + { + "componentName": "TinyTabItem", + "props": { + "title": "标签页2", + "name": "second" + }, + "children": [ + { + "componentName": "div", + "props": { + "style": "margin:10px 0 0 30px" + } + } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "时间线" }, - "icon": "pager", + "icon": "timeline", "screenshot": "", - "snippetName": "TinyPager", + "snippetName": "TinyTimeLine", "schema": { - "componentName": "TinyPager", + "componentName": "TinyTimeLine", "props": { - "layout": "total, sizes, prev, pager, next", - "total": 100, - "pageSize": 10, - "currentPage": 1 + "active": "2", + "data": [ + { + "name": "已下单" + }, + { + "name": "运输中" + }, + { + "name": "已签收" + } + ] } } } @@ -13465,9 +13377,6 @@ }, { "group": "data-display", - "label": { - "zh_CN": "数据展示类" - }, "children": [ { "name": { @@ -13513,27 +13422,6 @@ ] } }, - { - "name": { - "zh_CN": "对话框" - }, - "screenshot": "", - "snippetName": "TinyDialogBox", - "icon": "dialogbox", - "schema": { - "componentName": "TinyDialogBox", - "props": { - "visible": true, - "show-close": true, - "title": "dialogBox title" - }, - "children": [ - { - "componentName": "div" - } - ] - } - }, { "name": { "zh_CN": "折叠面板" @@ -13586,6 +13474,27 @@ ] } }, + { + "name": { + "zh_CN": "对话框" + }, + "screenshot": "", + "snippetName": "TinyDialogBox", + "icon": "dialogbox", + "schema": { + "componentName": "TinyDialogBox", + "props": { + "visible": true, + "show-close": true, + "title": "dialogBox title" + }, + "children": [ + { + "componentName": "div" + } + ] + } + }, { "name": { "zh_CN": "弹出编辑" @@ -13665,175 +13574,352 @@ }, { "name": { - "zh_CN": "树" + "zh_CN": "提示框" + }, + "icon": "popover", + "screenshot": "", + "snippetName": "TinyPopover", + "schema": { + "componentName": "TinyPopover", + "props": { + "width": 200, + "title": "弹框标题", + "trigger": "manual", + "modelValue": true + }, + "children": [ + { + "componentName": "Template", + "props": { + "slot": "reference" + }, + "children": [ + { + "componentName": "div", + "props": { + "placeholder": "触发源" + } + } + ] + }, + { + "componentName": "Template", + "props": { + "slot": "default" + }, + "children": [ + { + "componentName": "div", + "props": { + "placeholder": "提示内容" + } + } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "文字提示框" + }, + "icon": "tooltip", + "screenshot": "", + "snippetName": "TinyTooltip", + "schema": { + "componentName": "TinyTooltip", + "props": { + "content": "Top Left 提示文字", + "placement": "top-start", + "manual": true, + "modelValue": true + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": {} + } + ] + }, + { + "componentName": "Template", + "props": { + "slot": "content" + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": { + "placeholder": "提示内容" + } + } + ] + } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "树" + }, + "icon": "tree", + "screenshot": "", + "snippetName": "TinyTree", + "schema": { + "componentName": "TinyTree", + "props": { + "data": [ + { + "label": "一级 1", + "children": [ + { + "label": "二级 1-1", + "children": [ + { + "label": "三级 1-1-1" + } + ] + } + ] + }, + { + "label": "一级 2", + "children": [ + { + "label": "二级 2-1", + "children": [ + { + "label": "三级 2-1-1" + } + ] + }, + { + "label": "二级 2-2", + "children": [ + { + "label": "三级 2-2-1" + } + ] + } + ] + } + ] + } + } + } + ] + }, + { + "group": "general", + "children": [{}] + }, + { + "group": "form", + "children": [ + { + "name": { + "zh_CN": "复选框" + }, + "icon": "checkbox", + "screenshot": "", + "snippetName": "TinyCheckbox", + "schema": { + "componentName": "TinyCheckbox", + "props": { + "text": "复选框文案" + } + } + }, + { + "name": { + "zh_CN": "复选框组" + }, + "icon": "checkboxs", + "screenshot": "", + "snippetName": "TinyCheckboxGroup", + "schema": { + "componentName": "TinyCheckboxGroup", + "props": { + "modelValue": ["name1", "name2"], + "type": "checkbox", + "options": [ + { + "text": "复选框1", + "label": "name1" + }, + { + "text": "复选框2", + "label": "name2" + }, + { + "text": "复选框3", + "label": "name3" + } + ] + } + } + }, + { + "name": { + "zh_CN": "日期选择" }, - "icon": "tree", + "icon": "datepick", "screenshot": "", - "snippetName": "TinyTree", + "snippetName": "TinyDatePicker", "schema": { - "componentName": "TinyTree", + "componentName": "TinyDatePicker", "props": { - "data": [ - { - "label": "一级 1", - "children": [ - { - "label": "二级 1-1", - "children": [ - { - "label": "三级 1-1-1" - } - ] - } - ] - }, - { - "label": "一级 2", - "children": [ - { - "label": "二级 2-1", - "children": [ - { - "label": "三级 2-1-1" - } - ] - }, - { - "label": "二级 2-2", - "children": [ - { - "label": "三级 2-2-1" - } - ] - } - ] - } - ] + "placeholder": "请输入", + "modelValue": "" } } }, { "name": { - "zh_CN": "文字提示框" + "zh_CN": "表单" }, - "icon": "tooltip", "screenshot": "", - "snippetName": "TinyTooltip", + "snippetName": "tiny-form", + "icon": "form", "schema": { - "componentName": "TinyTooltip", + "componentName": "TinyForm", "props": { - "content": "Top Left 提示文字", - "placement": "top-start", - "manual": true, - "modelValue": true + "labelWidth": "80px", + "labelPosition": "top" }, "children": [ { - "componentName": "span", - "children": [ - { - "componentName": "div", - "props": {} - } - ] - }, - { - "componentName": "Template", + "componentName": "TinyFormItem", "props": { - "slot": "content" + "label": "人员" }, "children": [ { - "componentName": "span", - "children": [ - { - "componentName": "div", - "props": { - "placeholder": "提示内容" - } - } - ] + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "" + } } ] - } - ] - } - }, - { - "name": { - "zh_CN": "提示框" - }, - "icon": "popover", - "screenshot": "", - "snippetName": "TinyPopover", - "schema": { - "componentName": "TinyPopover", - "props": { - "width": 200, - "title": "弹框标题", - "trigger": "manual", - "modelValue": true - }, - "children": [ + }, { - "componentName": "Template", + "componentName": "TinyFormItem", "props": { - "slot": "reference" + "label": "密码" }, "children": [ { - "componentName": "div", + "componentName": "TinyInput", "props": { - "placeholder": "触发源" + "placeholder": "请输入", + "modelValue": "", + "type": "password" } } ] }, { - "componentName": "Template", + "componentName": "TinyFormItem", "props": { - "slot": "default" + "label": "" }, "children": [ { - "componentName": "div", + "componentName": "TinyButton", "props": { - "placeholder": "提示内容" + "text": "提交", + "type": "primary", + "style": "margin-right: 10px" + } + }, + { + "componentName": "TinyButton", + "props": { + "text": "重置", + "type": "primary" } } ] } ] } - } - ] - }, - { - "group": "navigation", - "label": { - "zh_CN": "导航类型" - }, - "children": [ + }, { "name": { - "zh_CN": "时间线" + "zh_CN": "输入框" }, - "icon": "timeline", + "icon": "input", "screenshot": "", - "snippetName": "TinyTimeLine", + "snippetName": "TinyInput", "schema": { - "componentName": "TinyTimeLine", + "componentName": "TinyInput", "props": { - "active": "2", - "data": [ - { - "name": "已下单" - }, + "placeholder": "请输入", + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "数字输入框" + }, + "icon": "numeric", + "screenshot": "", + "snippetName": "TinyNumeric", + "schema": { + "componentName": "TinyNumeric", + "props": { + "allow-empty": true, + "placeholder": "请输入", + "controlsPosition": "right", + "step": 1 + } + } + }, + { + "name": { + "zh_CN": "单选" + }, + "icon": "radio", + "screenshot": "", + "snippetName": "TinyRadio", + "schema": { + "componentName": "TinyRadio", + "props": { + "label": "1", + "text": "单选文本" + } + } + }, + { + "name": { + "zh_CN": "下拉框" + }, + "icon": "select", + "screenshot": "", + "snippetName": "TinySelect", + "schema": { + "componentName": "TinySelect", + "props": { + "modelValue": "", + "placeholder": "请选择", + "options": [ { - "name": "运输中" + "value": "1", + "label": "黄金糕" }, { - "name": "已签收" + "value": "2", + "label": "双皮奶" } ] } @@ -13841,26 +13927,76 @@ }, { "name": { - "zh_CN": "面包屑" + "zh_CN": "开关" }, - "icon": "breadcrumb", + "icon": "switch", "screenshot": "", - "snippetName": "TinyBreadcrumb", + "snippetName": "TinySwitch", "schema": { - "componentName": "TinyBreadcrumb", + "componentName": "TinySwitch", "props": { - "options": [ + "modelValue": "" + } + } + } + ] + }, + { + "group": "table", + "children": [ + { + "name": { + "zh_CN": "表格" + }, + "icon": "grid", + "screenshot": "", + "snippetName": "tinyGrid", + "schema": { + "componentName": "TinyGrid", + "props": { + "editConfig": { + "trigger": "click", + "mode": "cell", + "showStatus": true + }, + "columns": [ + { + "type": "index", + "width": 60 + }, { - "to": "{ path: '/' }", - "label": "首页" + "type": "selection", + "width": 60 }, { - "to": "{ path: '/breadcrumb' }", - "label": "产品" + "field": "employees", + "title": "员工数" }, { - "replace": "true", - "label": "软件" + "field": "created_date", + "title": "创建日期" + }, + { + "field": "city", + "title": "城市" + } + ], + "data": [ + { + "id": "1", + "name": "GFD科技有限公司", + "city": "福州", + "employees": 800, + "created_date": "2014-04-30 00:56:00", + "boole": false + }, + { + "id": "2", + "name": "WWW科技有限公司", + "city": "深圳", + "employees": 300, + "created_date": "2016-07-08 12:36:22", + "boole": true } ] } @@ -13868,216 +14004,103 @@ }, { "name": { - "zh_CN": "标签页" + "zh_CN": "分页" }, - "icon": "tabs", + "icon": "pager", "screenshot": "", - "group": true, - "snippetName": "TinyTabs", + "snippetName": "TinyPager", "schema": { - "componentName": "TinyTabs", + "componentName": "TinyPager", "props": { - "modelValue": "first" - }, - "children": [ - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页1", - "name": "first" - }, - "children": [ - { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } - } - ] - }, - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页2", - "name": "second" - }, - "children": [ - { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } - } - ] - } - ] + "layout": "total, sizes, prev, pager, next", + "total": 100, + "pageSize": 10, + "currentPage": 1 + } } } ] }, { - "group": "element-plus", - "label": { - "zh_CN": "Element Plus组件" - }, + "group": "layout", "children": [ { "name": { - "zh_CN": "输入框" - }, - "icon": "input", - "screenshot": "", - "snippetName": "ElInput", - "schema": {} - }, - { - "name": { - "zh_CN": "按钮" - }, - "icon": "button", - "screenshot": "", - "snippetName": "ElButton", - "schema": { - "children": [ - { - "componentName": "Text", - "props": { - "text": "按钮文本" - } - } - ] - } - }, - { - "name": { - "zh_CN": "表单" + "zh_CN": "栅格布局" }, - "icon": "form", + "icon": "row", "screenshot": "", - "snippetName": "ElForm", + "snippetName": "TinyLayout", "schema": { + "componentName": "TinyLayout", + "props": {}, "children": [ { - "componentName": "ElFormItem", + "componentName": "TinyRow", "props": { - "label": "账号", - "prop": "account" + "style": "padding: 10px;" }, "children": [ { - "componentName": "ElInput", + "componentName": "TinyCol", "props": { - "modelValue": "", - "placeholder": "请输入账号" + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 } } ] }, { - "componentName": "ElFormItem", + "componentName": "TinyRow", "props": { - "label": "密码", - "prop": "password" + "style": "padding: 10px;" }, "children": [ { - "componentName": "ElInput", + "componentName": "TinyCol", "props": { - "modelValue": "", - "placeholder": "请输入密码", - "type": "password" + "span": 3 } - } - ] - }, - { - "componentName": "ElFormItem", - "props": {}, - "children": [ + }, { - "componentName": "ElButton", + "componentName": "TinyCol", "props": { - "type": "primary", - "style": "margin-right: 10px" - }, - "children": [ - { - "componentName": "Text", - "props": { - "text": "提交" - } - } - ] + "span": 3 + } }, { - "componentName": "ElButton", + "componentName": "TinyCol", "props": { - "type": "primary" - }, - "children": [ - { - "componentName": "Text", - "props": { - "text": "重置" - } - } - ] + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } } ] } ] } - }, - { - "name": { - "zh_CN": "表格" - }, - "icon": "grid", - "screenshot": "", - "snippetName": "ElTable", - "schema": { - "props": { - "data": [ - { - "date": "2016-05-03", - "name": "Tom", - "address": "No. 189, Grove St, Los Angeles" - }, - { - "date": "2016-05-02", - "name": "Tom", - "address": "No. 189, Grove St, Los Angeles" - }, - { - "date": "2016-05-04", - "name": "Tom", - "address": "No. 189, Grove St, Los Angeles" - }, - { - "date": "2016-05-01", - "name": "Tom", - "address": "No. 189, Grove St, Los Angeles" - } - ], - "columns": [ - { - "type": "index" - }, - { - "label": "Date", - "prop": "date" - }, - { - "label": "Name", - "prop": "name" - }, - { - "label": "Address", - "prop": "address" - } - ] - } - } } ] } @@ -14088,15 +14111,16 @@ "package": "@opentiny/vue", "version": "3.20.0", "destructuring": true, - "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/~3.20/files/dist3/tiny-vue-pc.mjs", - "css": "https://registry.npmmirror.com/@opentiny/vue-theme/~3.20/files/index.css" + "script": "https://unpkg.com/@opentiny/vue-runtime@~3.20/dist3/tiny-vue-pc.mjs", + "css": "https://unpkg.com/@opentiny/vue-theme@~3.20/index.css" }, { "name": "element-plus组件库", "package": "element-plus", "version": "2.4.2", - "script": "https://registry.npmmirror.com/element-plus/2.4.2/files/dist/index.full.mjs", - "css": "https://registry.npmmirror.com/element-plus/2.4.2/files/dist/index.css" + "destructuring": true, + "script": "https://unpkg.com/element-plus@2.4.2/dist/index.full.mjs", + "css": "https://unpkg.com/element-plus@2.4.2/dist/index.css" } ] } diff --git a/scripts/buildMaterials.mjs b/scripts/buildMaterials.mjs index 7d1dcdd960..5ad2ffa678 100644 --- a/scripts/buildMaterials.mjs +++ b/scripts/buildMaterials.mjs @@ -17,6 +17,9 @@ const appSchemaPath = path.join(process.cwd(), 'mockServer/src/mock/get/app-cent const appInfo = fsExtra.readJSONSync(appInfoPath) const appSchema = fsExtra.readJSONSync(appSchemaPath) +// 从materials目录下的packages.json读取物料包配置 +const materialInfo = fsExtra.readJSONSync(path.join(process.cwd(), materialsDir, 'packages.json')) + const connection = new MysqlConnection() /** @@ -114,6 +117,17 @@ const generateComponents = () => { return } + const materialPackageInfo = material.npm + + if (materialPackageInfo?.package) { + const latestPackageInfo = materialInfo.packages.find((item) => item.package === materialPackageInfo.package) + + if (latestPackageInfo) { + const { name: _name, ...rest } = latestPackageInfo + material.npm = Object.assign(material.npm, rest) + } + } + if (file.includes('/blocks/')) { const valid = validateBlock(file, material) diff --git a/scripts/connection.mjs b/scripts/connection.mjs index e452e9047f..b3db54d98c 100644 --- a/scripts/connection.mjs +++ b/scripts/connection.mjs @@ -94,6 +94,97 @@ class MysqlConnection { return str.replace(/'/g, "\\'") } + /** + * 标准化JSON对象或字符串 + * @param {any} value 要标准化的值 + * @returns {object} 标准化后的对象 + */ + normalizeJsonValue(value) { + // 如果值是对象,直接返回 + if (typeof value === 'object' && value !== null) { + return value + } + + // 如果值是字符串,尝试解析为JSON + if (typeof value === 'string') { + try { + // 先尝试直接解析 + const parsed = JSON.parse(value) + + // 如果解析结果仍然是字符串,且看起来像JSON,再次尝试解析 + if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.endsWith('}')) { + try { + return JSON.parse(parsed) + } catch (e) { + // 如果再次解析失败,返回第一次解析的结果 + return parsed + } + } + + return parsed + } catch (e) { + // 如果解析失败,返回原始字符串 + return value + } + } + + // 其他类型直接返回 + return value + } + + /** + * 比较组件数据是否有差异 + * @param {object} newComponent 新的组件数据 + * @param {object} existingComponent 数据库中已存在的组件数据 + * @returns {boolean} 是否有差异需要更新 + */ + isComponentDifferent(newComponent, existingComponent) { + // 需要比较的字段列表 + const fieldsToCompare = ['name', 'icon', 'npm', 'group', 'category', 'snippets', 'schema', 'configure'] + + // 检查每个字段是否有差异 + for (const field of fieldsToCompare) { + if (!newComponent[field] && !existingComponent[this.fieldTransform(field)]) { + // 两者都为空或未定义,视为相同 + continue + } + + const dbField = this.fieldTransform(field) + const newValue = newComponent[field] + const dbValue = existingComponent[dbField] + + // 对于对象类型的字段,需要标准化后比较 + if (typeof newValue === 'object' && newValue !== null) { + // 标准化两个值,确保它们在相同的格式下进行比较 + const normalizedNewValue = this.normalizeJsonValue(newValue) + const normalizedDbValue = this.normalizeJsonValue(dbValue) + + // 将两个对象序列化为JSON字符串进行比较 + const newValueStr = JSON.stringify(normalizedNewValue) + const dbValueStr = JSON.stringify(normalizedDbValue) + + if (newValueStr !== dbValueStr) { + return true + } + } else { + // 对于基本类型,直接比较 + const dbField = this.fieldTransform(field) + const newValue = String(newComponent[field]) + const dbValue = String(existingComponent[dbField]) + + if (newValue !== dbValue) { + console.log(`${newComponent.component}字段 ${field} 需要更新: + 新值: ${newValue} + 旧值: ${dbValue}`) + return true + } + } + } + + // 所有字段都相同,不需要更新 + return false + } + /** * 校验组件数据是否有效 * @param {object} component 组件数据 @@ -104,8 +195,7 @@ class MysqlConnection { return Object.entries(component).every(([key, value]) => { if (longTextFields.includes(key) && value !== null && typeof value !== 'object') { - logger.error(`the value of "${key}" is not valid JSON at ${file}.`) - + logger.error(`the value of "${key}" is not valid JSON at ${file || 'unknown file'}.`) return false } @@ -365,6 +455,13 @@ class MysqlConnection { .then((result) => { if (!result.length) { this.insertComponent(component) + } else { + // component 与 result 比较,如果不一致,更新组件 + const existingComponent = result[0] + const needUpdate = this.isComponentDifferent(component, existingComponent) + if (needUpdate) { + this.updateComponent(component) + } } }) .catch((error) => {