diff --git a/packages/canvas/render/src/builtin/builtin.json b/packages/canvas/render/src/builtin/builtin.json index b2a5d19221..aca588dd4c 100644 --- a/packages/canvas/render/src/builtin/builtin.json +++ b/packages/canvas/render/src/builtin/builtin.json @@ -109,7 +109,9 @@ "props": { "language": "json", "tips": { - "title": { "zh_CN": "提示:数据为数组类型" }, + "title": { + "zh_CN": "提示:数据为数组类型" + }, "demo": { "zh_CN": "示例:\n[\n {\n \"name\": \"text\",\n \"value\": {\n \"type\": \"JSExpression\",\n \"value\": \"this.state.greetingMessage\"\n }\n },\n {\n \"name\": \"count\",\n \"value\": 1\n }\n]" } @@ -641,6 +643,212 @@ ] } }, + { + "name": { + "zh_CN": "导航条" + }, + "snippetName": "Navigation", + "icon": "navigation", + "schema": { + "componentName": "div", + "props": { + "style": "text-align: center; padding: 8px 12px; box-shadow: 0 0 4px #0003;" + }, + "children": [ + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: inline-flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconPublicHome", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "首页" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: inline-flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconTaskCooperation", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "介绍" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: inline-flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconText", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "文档" + } + } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "纵向导航" + }, + "snippetName": "NavigationV", + "icon": "NavigationV", + "schema": { + "componentName": "div", + "props": { + "style": "padding: 8px 12px; border-right: 1px solid #0003;" + }, + "children": [ + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconPublicHome", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "首页" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconTaskCooperation", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "介绍" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconText", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "文档" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconText", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "文档" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconText", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "文档" + } + } + ] + } + ] + } + }, { "name": { "zh_CN": "数据源容器" diff --git a/packages/design-core/assets/navigation.svg b/packages/design-core/assets/navigation.svg new file mode 100644 index 0000000000..ef1290d39a --- /dev/null +++ b/packages/design-core/assets/navigation.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/design-core/assets/navigationv.svg b/packages/design-core/assets/navigationv.svg new file mode 100644 index 0000000000..957aa31ac5 --- /dev/null +++ b/packages/design-core/assets/navigationv.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/design-core/assets/routerlink.svg b/packages/design-core/assets/routerlink.svg new file mode 100644 index 0000000000..ab4cde8bab --- /dev/null +++ b/packages/design-core/assets/routerlink.svg @@ -0,0 +1,25 @@ + + + + + + + + +Created with Pixso. +Created with Pixso. + + + + + + + + + \ No newline at end of file diff --git a/packages/design-core/assets/routerview.svg b/packages/design-core/assets/routerview.svg new file mode 100644 index 0000000000..aa830c9dd0 --- /dev/null +++ b/packages/design-core/assets/routerview.svg @@ -0,0 +1,41 @@ + + + + + + + + +Created with Pixso. +Created with Pixso. + + + + + + + + + + + \ No newline at end of file