chore: 更新部分接口
This commit is contained in:
@@ -4,17 +4,22 @@ import Postmate from 'postmate';
|
||||
import { createRenderer } from '@vtj/renderer'
|
||||
import { type BlockSchema } from '@vtj/core'
|
||||
|
||||
const dsl: BlockSchema = {
|
||||
"name": "ProjectList",
|
||||
const dsl: BlockSchema ={
|
||||
"name": "List",
|
||||
"locked": false,
|
||||
"inject": [],
|
||||
"state": {
|
||||
"editModalVisible": {
|
||||
"applicationList": {
|
||||
"type": "JSExpression",
|
||||
"value": "false"
|
||||
"value": "[]"
|
||||
}
|
||||
},
|
||||
"lifeCycles": {
|
||||
"mounted": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => {\r\n this.getApplicationList().then(res => {\r\n this.state.applicationList = res.list\r\n })\r\n}"
|
||||
}
|
||||
},
|
||||
"lifeCycles": {},
|
||||
"methods": {},
|
||||
"computed": {},
|
||||
"watch": [],
|
||||
@@ -22,10 +27,28 @@ const dsl: BlockSchema = {
|
||||
"props": [],
|
||||
"emits": [],
|
||||
"slots": [],
|
||||
"dataSources": {},
|
||||
"dataSources": {
|
||||
"getApplicationList": {
|
||||
"type": "api",
|
||||
"ref": "esnarea6u",
|
||||
"name": "getApplicationList",
|
||||
"label": "https://custom-chart-pre-api.shiyue.com/",
|
||||
"transform": {
|
||||
"type": "JSFunction",
|
||||
"value": "(res) => {\n return res;\n}"
|
||||
},
|
||||
"test": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => this.runApi({\n /* 在这里可输入接口参数 */\n})"
|
||||
},
|
||||
"mockTemplate": {
|
||||
"type": "JSFunction"
|
||||
}
|
||||
}
|
||||
},
|
||||
"__VTJ_BLOCK__": true,
|
||||
"__VERSION__": "1740469448492",
|
||||
"id": "cmc7fwbj7e",
|
||||
"__VERSION__": "1740735328808",
|
||||
"id": "ic98nyzx7",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "lvv6dsl62",
|
||||
@@ -43,7 +66,7 @@ const dsl: BlockSchema = {
|
||||
"children": "",
|
||||
"props": {
|
||||
"prop": "id",
|
||||
"label": "项目 id",
|
||||
"label": "应用 id",
|
||||
"fixed": "left",
|
||||
"index": 1
|
||||
},
|
||||
@@ -59,7 +82,49 @@ const dsl: BlockSchema = {
|
||||
"children": [],
|
||||
"props": {
|
||||
"prop": "name",
|
||||
"label": "项目名称"
|
||||
"label": "应用名称"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
},
|
||||
{
|
||||
"id": "45tlsubsf",
|
||||
"name": "ElTableColumn",
|
||||
"from": "element-plus",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"children": [
|
||||
{
|
||||
"id": "esnffq4yb",
|
||||
"name": "ElTag",
|
||||
"from": "element-plus",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"slot": {
|
||||
"name": "default",
|
||||
"params": [
|
||||
"row",
|
||||
"column",
|
||||
"$index"
|
||||
]
|
||||
},
|
||||
"children": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.context.row.active === true ? '运行中' : '已下架'"
|
||||
},
|
||||
"props": {
|
||||
"closable": false,
|
||||
"disable-transitions": true,
|
||||
"hit": false,
|
||||
"size": "small"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
"prop": "active",
|
||||
"label": "状态"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
@@ -85,7 +150,7 @@ const dsl: BlockSchema = {
|
||||
"$index"
|
||||
]
|
||||
},
|
||||
"children": "编辑",
|
||||
"children": "进入项目",
|
||||
"props": {
|
||||
"type": "primary",
|
||||
"size": "small",
|
||||
@@ -93,7 +158,7 @@ const dsl: BlockSchema = {
|
||||
"text": true,
|
||||
"bg": false,
|
||||
"loadingIcon": "Loading",
|
||||
"icon": "Edit"
|
||||
"icon": "VtjIconProject"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {
|
||||
@@ -101,11 +166,72 @@ const dsl: BlockSchema = {
|
||||
"name": "click",
|
||||
"handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => {\r\n console.log('window', window)\r\n console.log('this.context.row', this.context.row)\r\n // this.state.editModalVisible = true\r\n const routers = this.$router.getRoutes()\r\n console.log('routers', routers)\r\n console.log('this.$router', this.$router)\r\n}"
|
||||
"value": "() => {\r\n\r\n}"
|
||||
},
|
||||
"modifiers": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "1e8qs5f6xn",
|
||||
"name": "ElPopconfirm",
|
||||
"from": "element-plus",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"slot": {
|
||||
"name": "default",
|
||||
"params": [
|
||||
"row",
|
||||
"column",
|
||||
"$index"
|
||||
]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": "1hscpv89nf",
|
||||
"name": "ElButton",
|
||||
"from": "element-plus",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"slot": {
|
||||
"name": "reference",
|
||||
"params": []
|
||||
},
|
||||
"children": "下架",
|
||||
"props": {
|
||||
"size": "small",
|
||||
"plain": false,
|
||||
"text": true,
|
||||
"bg": false,
|
||||
"link": false,
|
||||
"round": false,
|
||||
"circle": false,
|
||||
"loading": false,
|
||||
"icon": "Delete",
|
||||
"type": "warning"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
"title": "是否删除?",
|
||||
"confirmButtonText": "删除",
|
||||
"iconColor": "#FF1100"
|
||||
},
|
||||
"directives": [],
|
||||
"events": {
|
||||
"confirm": {
|
||||
"name": "confirm",
|
||||
"handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => {\r\n console.log('this.context.row', this.context.row)\r\n console.log(this.context.row.active)\r\n}"
|
||||
},
|
||||
"modifiers": {
|
||||
"once": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
@@ -118,29 +244,10 @@ const dsl: BlockSchema = {
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
"data": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "miniapp",
|
||||
"actions": {
|
||||
"edit": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "mobile",
|
||||
"actions": {
|
||||
"edit": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "web",
|
||||
"actions": {
|
||||
"edit": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.applicationList"
|
||||
},
|
||||
"size": "small",
|
||||
"highlightCurrentRow": true,
|
||||
"show-summary": false,
|
||||
@@ -152,80 +259,6 @@ const dsl: BlockSchema = {
|
||||
},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
},
|
||||
{
|
||||
"id": "8l081hgwdy",
|
||||
"name": "AModal",
|
||||
"from": "ant-design-vue",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"children": [
|
||||
{
|
||||
"id": "8ojtz79z3q",
|
||||
"name": "p",
|
||||
"from": "",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"children": "Some contents...",
|
||||
"props": {},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
},
|
||||
{
|
||||
"id": "8s3fwx31ti",
|
||||
"name": "p",
|
||||
"from": "",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"children": "Some contents...",
|
||||
"props": {},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
},
|
||||
{
|
||||
"id": "8vn1umw4ja",
|
||||
"name": "p",
|
||||
"from": "",
|
||||
"invisible": false,
|
||||
"locked": false,
|
||||
"children": "Some contents...",
|
||||
"props": {},
|
||||
"directives": [],
|
||||
"events": {}
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
"open": true,
|
||||
"title": "Basic Modal"
|
||||
},
|
||||
"directives": [
|
||||
{
|
||||
"id": "9v357t0ryi",
|
||||
"name": "vIf",
|
||||
"value": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.editModalVisible"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"cancel": {
|
||||
"name": "cancel",
|
||||
"handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => {\r\n this.state.editModalVisible = false\r\n}"
|
||||
},
|
||||
"modifiers": {}
|
||||
},
|
||||
"ok": {
|
||||
"name": "ok",
|
||||
"handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "() => {\r\n this.state.editModalVisible = false\r\n}"
|
||||
},
|
||||
"modifiers": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user