-
+
@@ -20,6 +22,7 @@
{{ list }}
+
动态渲染
@@ -27,6 +30,10 @@
{{ component.id }}
+
+
+
+
@@ -37,19 +44,21 @@
-// 接收一个动态插槽名作为 prop
-const props = defineProps({
- dynamicSlotName: String
-});
-
\ No newline at end of file
+
+ {{ store.count }}
+ add
+ sub
+
+
\ No newline at end of file
diff --git a/src/components/componentMapping.ts b/src/components/componentMapping.ts
index 8f3ade9..831688e 100644
--- a/src/components/componentMapping.ts
+++ b/src/components/componentMapping.ts
@@ -1,5 +1,6 @@
// componentMapping.ts
import TestComponent from './TestComponent.vue';
+import AdaptivePage from './AdaptivePage.vue';
import Icon from './Icon.tsx';
import {
@@ -25,12 +26,12 @@ import {
Countdown, Steps, Step, Switch,
Tabs, TabPane, Tag, Textarea,
TimePicker, Timeline, TimelineItem, Tooltip,
- Transfer, Tree, TreeSelect, Trigger,Typography,TypographyParagraph, TypographyText, TypographyTitle,
+ Transfer, Tree, TreeSelect, Trigger, Typography, TypographyParagraph, TypographyText, TypographyTitle,
Upload, OverflowList, VerificationCode, Watermark
} from '@arco-design/web-vue';
export const componentMapping: { [key: string]: any } = {
- TestComponent,
+ TestComponent, AdaptivePage,
Affix, Alert, Anchor, AnchorLink,
AutoComplete, Avatar, AvatarGroup, BackTop,
Badge, Breadcrumb, BreadcrumbItem, Button,
@@ -53,7 +54,7 @@ export const componentMapping: { [key: string]: any } = {
Countdown, Steps, Step, Switch,
Tabs, TabPane, Tag, Textarea,
TimePicker, Timeline, TimelineItem, Tooltip,
- Transfer, Tree, TreeSelect, Trigger,Typography,TypographyParagraph, TypographyText, TypographyTitle,
+ Transfer, Tree, TreeSelect, Trigger, Typography, TypographyParagraph, TypographyText, TypographyTitle,
Upload, OverflowList, VerificationCode, Watermark
};
diff --git a/src/components/dfd.json b/src/components/dfd.json
deleted file mode 100644
index 35455f6..0000000
--- a/src/components/dfd.json
+++ /dev/null
@@ -1,1415 +0,0 @@
-{
- "cells": [
- {
- "position": {
- "x": 846.5,
- "y": -330
- },
- "size": {
- "width": 65,
- "height": 25
- },
- "view": "vue-shape-view",
- "shape": "Action.Start",
- "nodeType": "Action.Start",
- "label": "开始",
- "data": {},
- "component": "action-start",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "start",
- "_order": 0,
- "zIndex": 1,
- "_validateError": false
- },
- {
- "position": {
- "x": 790,
- "y": 690
- },
- "size": {
- "width": 65,
- "height": 25
- },
- "view": "vue-shape-view",
- "shape": "Action.End",
- "nodeType": "Action.End",
- "label": "结束",
- "data": {},
- "component": "action-end",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "end",
- "_order": 0,
- "zIndex": 1,
- "_validateError": false
- },
- {
- "position": {
- "x": 690,
- "y": 240
- },
- "size": {
- "width": 496.5,
- "height": 244
- },
- "view": "vue-shape-view",
- "shape": "Action.Foreach",
- "nodeType": "Action.Foreach",
- "label": "循环",
- "data": {
- "inputCollection": "${formobj.host.ip}",
- "iterationParam": "item"
- },
- "component": "action-foreach",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "c9656849-4caf-47d5-85d7-df540fbe9873",
- "zIndex": 2,
- "_validateError": false,
- "children": [
- "4f71eec5-1487-4053-924c-3fd42f087263",
- "63400f2b-4950-4057-8aa4-329750913cc9"
- ],
- "meta": {
- "hasStart": true
- },
- "originPosition": {
- "x": 690,
- "y": 240
- },
- "originSize": {
- "width": 280,
- "height": 200
- },
- "_selected": false
- },
- {
- "position": {
- "x": 748.75,
- "y": 287.5
- },
- "size": {
- "width": 65,
- "height": 25
- },
- "view": "vue-shape-view",
- "shape": "Action.Start",
- "nodeType": "Action.Start",
- "label": "开始",
- "data": {},
- "component": "action-start",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "4f71eec5-1487-4053-924c-3fd42f087263",
- "parent": "c9656849-4caf-47d5-85d7-df540fbe9873",
- "zIndex": 3,
- "_validateError": false,
- "_selected": false
- },
- {
- "position": {
- "x": 881.5,
- "y": 390
- },
- "size": {
- "width": 65,
- "height": 25
- },
- "view": "vue-shape-view",
- "shape": "Action.End",
- "nodeType": "Action.End",
- "label": "结束",
- "data": {},
- "component": "action-end",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "63400f2b-4950-4057-8aa4-329750913cc9",
- "zIndex": 5,
- "_validateError": false,
- "parent": "c9656849-4caf-47d5-85d7-df540fbe9873"
- },
- {
- "position": {
- "x": 811.5,
- "y": -125
- },
- "size": {
- "width": 135,
- "height": 60
- },
- "view": "vue-shape-view",
- "shape": "Action.Script",
- "nodeType": "Action.Script",
- "label": "执行函数",
- "data": {
- "funcType": "page",
- "script": "appointHosts",
- "params": [
- {
- "name": "playbook",
- "value": "${curBookreference.playbook_path}"
- }
- ]
- },
- "component": "action-script",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "dfe05a8c-0f47-4ae1-bc97-b1fabf31ea15",
- "zIndex": 10,
- "_validateError": false,
- "_selected": false
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "14e3c0ef-a205-4d3a-a930-0d4a8c5eca14",
- "zIndex": 11,
- "source": {
- "cell": "dfe05a8c-0f47-4ae1-bc97-b1fabf31ea15",
- "port": "bottom"
- },
- "target": {
- "cell": "b4cfb4a7-a1cb-47ac-84f3-d8a805f1abbb",
- "port": "top"
- }
- },
- {
- "position": {
- "x": 811.5,
- "y": -245
- },
- "size": {
- "width": 135,
- "height": 60
- },
- "view": "vue-shape-view",
- "shape": "Action.ValidateForm",
- "nodeType": "Action.ValidateForm",
- "label": "校验表单",
- "data": {
- "formId": "reform"
- },
- "component": "action-validate-form",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "a10a5c79-a14d-403d-83fc-70a5e86a96d8",
- "zIndex": 14,
- "_validateError": false,
- "_selected": false
- },
- {
- "position": {
- "x": 480,
- "y": 2.5
- },
- "size": {
- "width": 152,
- "height": 64
- },
- "view": "vue-shape-view",
- "shape": "Action.Message",
- "nodeType": "Action.Message",
- "label": "顶部消息提示",
- "data": {
- "notifyType": "error",
- "content": "Playbook中hosts为空或不存在,请检查",
- "duration": 1.5,
- "closable": false,
- "background": false
- },
- "component": "action-message",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "6e5ffab4-c9be-406c-92d7-61d2646a09a8",
- "zIndex": 16,
- "_validateError": false,
- "_selected": false
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "681bb452-53a0-49a3-9806-fb1648931c53",
- "zIndex": 18,
- "source": {
- "cell": "a10a5c79-a14d-403d-83fc-70a5e86a96d8",
- "port": "bottom"
- },
- "target": {
- "cell": "dfe05a8c-0f47-4ae1-bc97-b1fabf31ea15",
- "port": "top"
- }
- },
- {
- "position": {
- "x": 855,
- "y": 9
- },
- "size": {
- "width": 51,
- "height": 51
- },
- "view": "vue-shape-view",
- "shape": "Action.Switch",
- "nodeType": "Action.Switch",
- "label": "分支",
- "data": {},
- "component": "action-switch",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "b4cfb4a7-a1cb-47ac-84f3-d8a805f1abbb",
- "zIndex": 19,
- "_validateError": false
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "ba99a5e4-5cde-4eea-8cb0-a85eef8c9f5f",
- "zIndex": 20,
- "data": {
- "condition": "${!hosts}"
- },
- "source": {
- "cell": "b4cfb4a7-a1cb-47ac-84f3-d8a805f1abbb",
- "port": "left"
- },
- "target": {
- "cell": "6e5ffab4-c9be-406c-92d7-61d2646a09a8",
- "port": "right"
- }
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "59b574db-330d-4a31-bebd-fa814e54eec3",
- "zIndex": 21,
- "data": {
- "condition": "${hosts!==null}"
- },
- "source": {
- "cell": "b4cfb4a7-a1cb-47ac-84f3-d8a805f1abbb",
- "port": "bottom"
- },
- "target": {
- "cell": "c9656849-4caf-47d5-85d7-df540fbe9873",
- "port": "top"
- }
- },
- {
- "position": {
- "x": 790,
- "y": 580
- },
- "size": {
- "width": 152,
- "height": 64
- },
- "view": "vue-shape-view",
- "shape": "Action.Back",
- "nodeType": "Action.Back",
- "label": "返回页面",
- "data": {},
- "component": "action-back",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- }
- ]
- },
- "id": "c85cad0a-0c62-4083-85d9-05e7367d17b9",
- "zIndex": 22,
- "_validateError": false,
- "_selected": false
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "4aab79bf-8483-41dc-9329-6d393d4d6ec8",
- "zIndex": 23,
- "source": {
- "cell": "6e5ffab4-c9be-406c-92d7-61d2646a09a8",
- "port": "bottom"
- },
- "target": {
- "cell": "c85cad0a-0c62-4083-85d9-05e7367d17b9",
- "port": "left"
- }
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "e6d6df9a-2f37-4e08-bd13-0db01a396588",
- "zIndex": 25,
- "source": {
- "cell": "c85cad0a-0c62-4083-85d9-05e7367d17b9",
- "port": "bottom"
- },
- "target": {
- "cell": "end",
- "port": "top"
- }
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "04c6eae3-d5d8-40de-8c5b-0f91e1b08d0b",
- "zIndex": 35,
- "source": {
- "cell": "start",
- "port": "bottom"
- },
- "target": {
- "cell": "a10a5c79-a14d-403d-83fc-70a5e86a96d8",
- "port": "top"
- }
- },
- {
- "shape": "edge",
- "attrs": {
- "line": {
- "stroke": "#dadada",
- "targetMarker": {
- "name": "block",
- "width": 12,
- "height": 8
- }
- }
- },
- "id": "2773fa96-6552-4bd1-a3f7-ace737dd83b7",
- "zIndex": 36,
- "source": {
- "cell": "c9656849-4caf-47d5-85d7-df540fbe9873",
- "port": "bottom"
- },
- "target": {
- "cell": "c85cad0a-0c62-4083-85d9-05e7367d17b9",
- "port": "top"
- }
- },
- {
- "position": {
- "x": 1323.5,
- "y": 180
- },
- "size": {
- "width": 135,
- "height": 60
- },
- "view": "vue-shape-view",
- "shape": "Action.Http",
- "nodeType": "Action.Http",
- "label": "发送HTTP请求",
- "data": {
- "schema": {},
- "url": "${'/onecloud/api/v2/ansibleplaybookreferences/'+formobj.referenceName+'/run'}",
- "method": "POST",
- "params": {},
- "data": {
- "host": "${{\r\n \"name\": hosts,\r\n \"ip\": item\r\n}\r\n}",
- "args": "${utils.JSON.parse(args)}",
- "sync": "${true}"
- },
- "headers": {
- "X-Project-Id": "${projectId}"
- },
- "description": null,
- "serviceType": "onecloud"
- },
- "component": "action-http",
- "ports": {
- "groups": {
- "top": {
- "position": "top",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "right": {
- "position": "right",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "bottom": {
- "position": "bottom",
- "label": {
- "position": "bottom"
- },
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- },
- "left": {
- "position": "left",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "#5F95FF",
- "strokeWidth": 1,
- "fill": "#fff",
- "style": {
- "visibility": "hidden"
- }
- }
- }
- }
- },
- "items": [
- {
- "group": "top",
- "id": "top"
- },
- {
- "group": "right",
- "id": "right"
- },
- {
- "group": "bottom",
- "id": "bottom"
- },
- {
- "group": "left",
- "id": "left"
- },
- {
- "group": "bottom",
- "id": "port-error",
- "attrs": {
- "circle": {
- "r": 5,
- "magnet": true,
- "stroke": "red",
- "strokeWidth": 1,
- "fill": "#fff",
- "title": "处理异常",
- "data-title": "处理异常"
- }
- }
- }
- ]
- },
- "id": "74c11e68-621e-40d5-aa00-d4e9fb9818c2",
- "_order": 0,
- "_validateError": false,
- "_selected": true,
- "zIndex": 37
- }
- ]
- }
\ No newline at end of file
diff --git a/src/main.ts b/src/main.ts
index 5827ee0..976444f 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -5,8 +5,12 @@ import ArcoVue from '@arco-design/web-vue';
// 额外引入图标库
import ArcoVueIcon from '@arco-design/web-vue/es/icon';
import '@arco-design/web-vue/dist/arco.css';
+import {createPinia} from "pinia"
+
+const pinia = createPinia()
const app = createApp(App);
+app.use(pinia)
app.use(ArcoVue);
app.use(ArcoVueIcon);
app.mount('#app');
\ No newline at end of file
diff --git a/src/schemes/components/AdaptivePage.json b/src/schemes/components/AdaptivePage.json
index afe0f46..25b2ba3 100644
--- a/src/schemes/components/AdaptivePage.json
+++ b/src/schemes/components/AdaptivePage.json
@@ -1,7 +1,11 @@
{
"type": "AdaptivePage",
+ "name":"AdaptivePage",
+ "id":"AdaptivePage",
"version": "2.0",
"props": {},
+ "class":"",
+ "style":"",
"variables": {},
"dataSources":{},
"functions" : {},
diff --git a/src/schemes/scheme.json b/src/schemes/scheme.json
index d5eadf1..d1d400e 100644
--- a/src/schemes/scheme.json
+++ b/src/schemes/scheme.json
@@ -1,4 +1,23 @@
{
+ "AdaptivePage": {
+ "type": "AdaptivePage",
+ "name": "AdaptivePage",
+ "id": "AdaptivePage",
+ "version": "2.0",
+ "props": {},
+ "class": "",
+ "style": "",
+ "variables": {},
+ "dataSources": {},
+ "functions": {},
+ "orchestrations": {},
+ "events": {},
+ "slots": {},
+ "header": {},
+ "footer": {},
+ "children": {},
+ "meta": {}
+ },
"Affix": {
"type": "Affix",
"name": "affix",
diff --git a/src/schemes/scheme.ts b/src/schemes/scheme.ts
index 2e81de5..d85f6c8 100644
--- a/src/schemes/scheme.ts
+++ b/src/schemes/scheme.ts
@@ -1,4 +1,23 @@
export const componentScheme = {
+ "AdaptivePage": {
+ "type": "AdaptivePage",
+ "name": "AdaptivePage",
+ "id": "AdaptivePage",
+ "version": "2.0",
+ "props": {},
+ "class": "",
+ "style": "",
+ "variables": {},
+ "dataSources": {},
+ "functions": {},
+ "orchestrations": {},
+ "events": {},
+ "slots": {},
+ "header": {},
+ "footer": {},
+ "children": {},
+ "meta": {}
+ },
"Affix": {
"type": "Affix",
"name": "affix",
diff --git a/src/stores/useSchemeStore.ts b/src/stores/useSchemeStore.ts
new file mode 100644
index 0000000..a96f16a
--- /dev/null
+++ b/src/stores/useSchemeStore.ts
@@ -0,0 +1,17 @@
+import { defineStore } from 'pinia'
+import { IPageComponent } from '../type/IPageComponent';
+import { ref,computed } from 'vue';
+
+export const useCounterStore = defineStore('counter', () => {
+ const count = ref(0)
+ const schema=ref
()
+ const doubleCount = computed(() => count.value * 2)
+ function increment() {
+ count.value++
+ }
+ function decrement() {
+ count.value--
+ }
+
+ return { count,schema, doubleCount, increment,decrement }
+})
\ No newline at end of file
diff --git a/src/type/IComponent.js b/src/type/IComponent.js
deleted file mode 100644
index c8ad2e5..0000000
--- a/src/type/IComponent.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/src/type/IComponent.ts b/src/type/IComponent.ts
index b194514..b1fd449 100644
--- a/src/type/IComponent.ts
+++ b/src/type/IComponent.ts
@@ -7,5 +7,8 @@ export interface IComponent {
props: JSON;
style: string;
class: string;
- children: IComponent[];
+ events:JSON;
+ orchestrations:JSON;
+ version:string;
+ loop:JSON
}
\ No newline at end of file
diff --git a/src/type/IPageComponent.ts b/src/type/IPageComponent.ts
new file mode 100644
index 0000000..abe2f5f
--- /dev/null
+++ b/src/type/IPageComponent.ts
@@ -0,0 +1,12 @@
+import { IComponent } from "./IComponent";
+
+export interface IPageComponent extends IComponent
+{
+ variables:JSON;
+ dataSources:JSON;
+ functions:JSON;
+ header:JSON;
+ footer:JSON;
+ meta:JSON;
+ children: IPageComponent[];
+}
\ No newline at end of file