diff --git a/packages/demo/public/assets.json b/packages/demo/public/assets.json index 4256d8320..2dd7a5c09 100644 --- a/packages/demo/public/assets.json +++ b/packages/demo/public/assets.json @@ -66,6 +66,262 @@ } } }, + { + "componentName": "Drawer", + "title": "抽屉", + "docUrl": "", + "screenshot": "", + "npm": { + "package": "@alifd/next", + "version": "1.19.18", + "exportName": "Drawer", + "main": "src/index.js", + "destructuring": true, + "subName": "" + }, + "props": [ + { + "name": "prefix", + "propType": "string", + "defaultValue": "next-" + }, + { + "name": "style", + "propType": "object" + }, + { + "name": "pure", + "propType": "bool" + }, + { + "name": "rtl", + "propType": "bool" + }, + { + "name": "trigger", + "propType": { + "type": "instanceOf", + "value": "element" + }, + "defaultValue": null + }, + { + "name": "triggerType", + "propType": { + "type": "oneOfType", + "value": [ + "string", + { + "type": "instanceOf", + "value": "array" + } + ] + }, + "defaultValue": "click" + }, + { + "name": "width", + "propType": { + "type": "oneOfType", + "value": [ + "number", + "string" + ] + }, + "description": "宽度,仅在 placement是 left right 的时候生效" + }, + { + "name": "height", + "propType": { + "type": "oneOfType", + "value": [ + "number", + "string" + ] + }, + "description": "高度,仅在 placement是 top bottom 的时候生效" + }, + { + "name": "closeable", + "propType": { + "type": "oneOfType", + "value": [ + "string", + "bool" + ] + }, + "description": "控制对话框关闭的方式,值可以为字符串或者布尔值,其中字符串是由以下值组成:\n**close** 表示点击关闭按钮可以关闭对话框\n**mask** 表示点击遮罩区域可以关闭对话框\n**esc** 表示按下 esc 键可以关闭对话框\n如 'close' 或 'close,esc,mask'\n如果设置为 true,则以上关闭方式全部生效\n如果设置为 false,则以上关闭方式全部失效", + "defaultValue": true + }, + { + "name": "onClose", + "propType": "func", + "description": "对话框关闭时触发的回调函数\n@param {String} trigger 关闭触发行为的描述字符串\n@param {Object} event 关闭时事件对象" + }, + { + "name": "placement", + "propType": { + "type": "oneOf", + "value": [ + "top", + "right", + "bottom", + "left" + ] + }, + "description": "位于页面的位置", + "defaultValue": "right" + }, + { + "name": "title", + "propType": { + "type": "instanceOf", + "value": "node" + }, + "description": "标题" + }, + { + "name": "headerStyle", + "propType": "object", + "description": "header上的样式" + }, + { + "name": "bodyStyle", + "propType": "object", + "description": "body上的样式" + }, + { + "name": "visible", + "propType": "bool", + "description": "是否显示" + }, + { + "name": "hasMask", + "propType": "bool", + "description": "是否显示遮罩", + "defaultValue": true + }, + { + "name": "onVisibleChange", + "propType": "func" + }, + { + "name": "animation", + "propType": { + "type": "oneOfType", + "value": [ + "object", + "bool" + ] + }, + "description": "显示隐藏时动画的播放方式\n@property {String} in 进场动画\n@property {String} out 出场动画" + }, + { + "name": "locale", + "propType": "object" + }, + { + "name": "popupContainer", + "propType": "any" + } + ],"configure": { + "component": { + "isContainer": true, + "isModel": true + } + } + }, + { + "componentName": "Drawer.Inner", + "title": "Drawer.Inner", + "docUrl": "", + "screenshot": "", + "npm": { + "package": "@alifd/next", + "version": "1.19.18", + "exportName": "Drawer", + "main": "src/index.js", + "destructuring": true, + "subName": "Inner" + }, + "props": [ + { + "name": "prefix", + "propType": "string", + "defaultValue": "next-" + }, + { + "name": "className", + "propType": "string" + }, + { + "name": "closeable", + "propType": "bool", + "defaultValue": true + }, + { + "name": "role", + "propType": "string", + "defaultValue": "dialog" + }, + { + "name": "title", + "propType": "string" + }, + { + "name": "placement", + "propType": { + "type": "oneOf", + "value": [ + "top", + "right", + "bottom", + "left" + ] + } + }, + { + "name": "rtl", + "propType": "bool" + }, + { + "name": "onClose", + "propType": "func" + }, + { + "name": "locale", + "propType": "object" + }, + { + "name": "headerStyle", + "propType": "object" + }, + { + "name": "bodyStyle", + "propType": "object" + }, + { + "name": "afterClose", + "propType": "func" + }, + { + "name": "beforeOpen", + "propType": "func" + }, + { + "name": "beforeClose", + "propType": "func" + }, + { + "name": "cache", + "propType": "bool" + }, + { + "name": "shouldUpdatePosition", + "propType": "bool" + } + ] + }, { "componentName": "Table", "title": "Table", @@ -12273,7 +12529,32 @@ } } ] - },{ + }, + { + "componentName": "Drawer", + "title": "抽屉", + "icon": "", + "package": "@alife/next", + "library": "Next", + "snippets": [ + { + "title": "抽屉", + "screenshot": "https://img.alicdn.com/tfs/TB1RiM3lgHqK1RjSZFEXXcGMXXa-404-422.png", + "schema": { + "componentName": "Drawer", + "props": { + "prefix": "next-", + "triggerType": "click", + "closeable": true, + "placement": "right", + "hasMask": true, + "visible": true + } + } + } + ] + }, + { "componentName": "Table", "title": "表格", "icon": "https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_table.png", diff --git a/packages/demo/public/schema.json b/packages/demo/public/schema.json index 4622272a4..91880b822 100644 --- a/packages/demo/public/schema.json +++ b/packages/demo/public/schema.json @@ -72,37 +72,37 @@ "componentName":"Breadcrumb.Item", "id":"node_dockcy8n9xeg", "props":{ - "prefix":"next-" - }, - "children":[ - "首页"] + "prefix":"next-", + "children":[ + "首页"] + } }, { "componentName":"Breadcrumb.Item", "id":"node_dockcy8n9xei", "props":{ - "prefix":"next-" - }, - "children":[ - "品质中台"] + "prefix":"next-", + "children":[ + "品质中台"] + } }, { "componentName":"Breadcrumb.Item", "id":"node_dockcy8n9xek", "props":{ - "prefix":"next-" - }, - "children":[ - "商家品质页面管理"] + "prefix":"next-", + "children":[ + "商家品质页面管理"] + } }, { "componentName":"Breadcrumb.Item", "id":"node_dockcy8n9xem", "props":{ - "prefix":"next-" - }, - "children":[ - "质检知识条配置"] + "prefix":"next-", + "children":[ + "质检知识条配置"] + } }] }] }, @@ -213,17 +213,17 @@ "style":{ "margin":"0 5px 0 5px" }, - "htmlType":"submit" - }, - "children":[ - { + "htmlType":"submit", + "children":[ + { "componentName":"Icon", "id":"node_dockcy8n9xey", "props":{ - "type":"success" + "type":"success" } - }, - "搜索"] + }, + "搜索"] + } }, { "componentName":"Button", @@ -233,10 +233,10 @@ "style":{ "margin":"0 5px 0 5px" }, - "htmlType":"reset" - }, - "children":[ - "清空"] + "htmlType":"reset", + "children":[ + "清空"] + } }] }] }] @@ -266,6 +266,7 @@ "style":{ "width":"100px" }, + "children":["新建配置"], "events":{ "onClick":{ "type":"JSFunction", @@ -286,9 +287,7 @@ "onClick":{ "type":"JSFunction", "value":"function(){ this.onClick() }" - }, - "children":[ - "新建配置"] + } } }] },