Skip to content

Latest commit

 

History

History
593 lines (588 loc) · 11.6 KB

prompt.md

File metadata and controls

593 lines (588 loc) · 11.6 KB

我有一个低代码平台项目,它可以根据符合规范的 JSON 数据生成页面,这个 JSON 数据是一个数组,里面的每一项都是一个 JSON 对象,每个 JSON 对象都对应着一个组件。 下面用 ``` 包括起来的代码就是所有的组件列表。

[
  {
    "animations": [], // 动画
    "events": {}, // 事件
    "groupStyle": {}, // 组合样式
    "isLock": false, // 是否锁定
    "collapseName": "style",
    "linkage": { // 联动属性
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VText", // 组件类型
    "label": "文字", // 组件名称
    "propValue": "双击编辑文字", // 组件值
    "icon": "wenben", // 组件图标
    "request": { // 组件请求
      "method": "GET",
      "data": [],
      "url": "",
      "series": false,
      "time": 1000,
      "paramType": "",
      "requestCount": 0
    },
    "style": { // 组件样式
      "rotate": 0,
      "opacity": 1,
      "width": 200,
      "height": 28,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "",
      "color": ""
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VButton",
    "label": "按钮",
    "propValue": "按钮",
    "icon": "button",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 100,
      "height": 34,
      "borderWidth": 1,
      "borderColor": "",
      "borderRadius": "",
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "",
      "color": "",
      "backgroundColor": ""
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "Picture",
    "label": "图片",
    "icon": "tupian",
    "propValue": {
      "url": "img/title.07a15c19.jpg",
      "flip": {
        "horizontal": false,
        "vertical": false
      }
    },
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 300,
      "height": 200,
      "borderRadius": ""
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "RectShape",
    "label": "矩形",
    "propValue": " ",
    "icon": "juxing",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 200,
      "height": 200,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "center",
      "color": "",
      "borderColor": "#000",
      "borderWidth": 1,
      "backgroundColor": "",
      "borderStyle": "solid",
      "borderRadius": "",
      "verticalAlign": "middle"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "LineShape",
    "label": "直线",
    "propValue": "",
    "icon": "zhixian",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 200,
      "height": 2,
      "backgroundColor": "#000"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "CircleShape",
    "label": "圆形",
    "propValue": " ",
    "icon": "24gl-circle",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 200,
      "height": 200,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "center",
      "color": "",
      "borderColor": "#000",
      "borderWidth": 1,
      "backgroundColor": "",
      "borderStyle": "solid",
      "borderRadius": "",
      "verticalAlign": "middle"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "SVGStar",
    "label": "星形",
    "icon": "kongwujiaoxing",
    "propValue": "",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 80,
      "height": 80,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "center",
      "color": "",
      "borderColor": "#000",
      "backgroundColor": "rgba(255, 255, 255, 1)"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "SVGTriangle",
    "label": "三角形",
    "icon": "xingzhuang-sanjiaoxing",
    "propValue": "",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 80,
      "height": 80,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "center",
      "color": "",
      "borderColor": "#000",
      "backgroundColor": "rgba(255, 255, 255, 1)"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VTable",
    "label": "表格",
    "icon": "biaoge",
    "propValue": {
      "data": [
        [
          "表头1",
          "表头2",
          "表头3"
        ],
        [
          "内容1",
          "内容2",
          "内容3"
        ]
      ],
      "stripe": true,
      "thBold": true
    },
    "request": {
      "method": "GET",
      "data": [],
      "url": "",
      "series": false,
      "time": 1000,
      "paramType": "",
      "requestCount": 0
    },
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 600,
      "height": 200,
      "fontSize": "",
      "fontWeight": 400,
      "textAlign": "center",
      "color": "",
      "backgroundColor": "rgba(255, 255, 255, 1)"
    }
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VChart",
    "label": "图表",
    "icon": "el-icon-data-analysis",
    "propValue": {
      "chart": "VChart",
      "option": {
        "title": {
          "text": "柱状图",
          "show": true
        },
        "legend": {
          "show": true
        },
        "tooltip": {
          "show": true,
          "trigger": "item"
        },
        "xAxis": {
          "show": true,
          "data": [
            "A",
            "B",
            "C",
            "D",
            "E"
          ]
        },
        "yAxis": {},
        "series": {
          "type": "bar",
          "name": "销量",
          "data": [
            23,
            61,
            35,
            77,
            35
          ],
          "itemStyle": {
            "barBorderRadius": 5,
            "borderWidth": 1,
            "borderType": "solid",
            "borderColor": "#73c0de",
            "shadowColor": "#5470c6",
            "shadowBlur": 3
          }
        }
      }
    },
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 800,
      "height": 500,
      "borderRadius": ""
    }
  }
]

如果一个页面包含了一个文本和按钮组件,那么这个页面的 JSON 代码如下:

[
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VText",
    "label": "文字",
    "propValue": "双击编辑文字",
    "icon": "wenben",
    "request": {
      "method": "GET",
      "data": [],
      "url": "",
      "series": false,
      "time": 1000,
      "paramType": "",
      "requestCount": 0
    },
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 200,
      "height": 28,
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "",
      "color": "",
      "top": 96,
      "left": 253
    },
    "id": "aDznLRoPXX3LMHgvfsc1c"
  },
  {
    "animations": [],
    "events": {},
    "groupStyle": {},
    "isLock": false,
    "collapseName": "style",
    "linkage": {
      "duration": 0,
      "data": [
        {
          "id": "",
          "label": "",
          "event": "",
          "style": [
            {
              "key": "",
              "value": ""
            }
          ]
        }
      ]
    },
    "component": "VButton",
    "label": "按钮",
    "propValue": "按钮",
    "icon": "button",
    "style": {
      "rotate": 0,
      "opacity": 1,
      "width": 100,
      "height": 34,
      "borderWidth": 1,
      "borderColor": "",
      "borderRadius": "",
      "fontSize": "",
      "fontWeight": 400,
      "lineHeight": "",
      "letterSpacing": 0,
      "textAlign": "",
      "color": "",
      "backgroundColor": "",
      "top": 162,
      "left": 308
    },
    "id": "DaaGKgxWdTXV3tOiBI_h4"
  }
]

你作为一个技术专家,现在需要按照上面的规则来为我生成页面,并且生成的页面中每一个组件的属性都不能忽略。

现在我需要生成一个海报页面,主要用于宣传编程有什么用。