vue2-client 1.8.299 → 1.8.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +96 -96
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +63 -0
- package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +53 -24
- package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +57 -0
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
- package/src/base-client/components/common/XDataCard/XDataCard.vue +156 -0
- package/src/base-client/components/common/XDataCard/index.js +3 -0
- package/src/base-client/components/common/XDataCard/index.md +41 -0
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +3 -2
- package/src/base-client/components/common/XDescriptions/lowcodeEditorRegister.js +31 -31
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +214 -214
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/XFormGroupDetails.vue +72 -72
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +21 -5
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/pages/Example/index.vue +4 -3
- package/src/pages/lowCode/lowCodeEditor.vue +191 -2
- package/vue.config.js +3 -3
package/package.json
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"private": false,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
-
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
-
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
-
"test:unit": "vue-cli-service test:unit",
|
|
10
|
-
"lint": "vue-cli-service lint",
|
|
11
|
-
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
-
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
-
"@antv/data-set": "^0.11.8",
|
|
18
|
-
"@antv/g2plot": "^2.4.31",
|
|
19
|
-
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
-
"animate.css": "^4.1.1",
|
|
21
|
-
"ant-design-vue": "^1.7.8",
|
|
22
|
-
"axios": "^0.27.2",
|
|
23
|
-
"clipboard": "^2.0.11",
|
|
24
|
-
"core-js": "^3.33.0",
|
|
25
|
-
"crypto-js": "^4.1.1",
|
|
26
|
-
"date-fns": "^2.29.3",
|
|
27
|
-
"default-passive-events": "^2.0.0",
|
|
28
|
-
"dotenv": "^16.3.1",
|
|
29
|
-
"echarts": "^5.5.0",
|
|
30
|
-
"enquire.js": "^2.1.6",
|
|
31
|
-
"file-saver": "^2.0.5",
|
|
32
|
-
"highlight.js": "^11.7.0",
|
|
33
|
-
"html2canvas": "^1.4.1",
|
|
34
|
-
"js-base64": "^3.7.5",
|
|
35
|
-
"js-cookie": "^2.2.1",
|
|
36
|
-
"jsencrypt": "^3.3.2",
|
|
37
|
-
"jspdf": "^2.5.1",
|
|
38
|
-
"lodash.clonedeep": "^4.5.0",
|
|
39
|
-
"lodash.get": "^4.4.2",
|
|
40
|
-
"lodash.debounce": "^4",
|
|
41
|
-
"mockjs": "^1.1.0",
|
|
42
|
-
"nprogress": "^0.2.0",
|
|
43
|
-
"qs": "^6.11.2",
|
|
44
|
-
"regenerator-runtime": "^0.14.0",
|
|
45
|
-
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
-
"viser-vue": "^2.4.8",
|
|
47
|
-
"vue": "^2.7.14",
|
|
48
|
-
"vue-codemirror": "4.0.6",
|
|
49
|
-
"vue-i18n": "^8.28.2",
|
|
50
|
-
"vue-json-viewer": "^2.2.22",
|
|
51
|
-
"vue-router": "^3.6.5",
|
|
52
|
-
"vue-video-player": "^5.0.2",
|
|
53
|
-
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
-
"vuedraggable": "^2.24.3",
|
|
55
|
-
"vuex": "^3.6.2",
|
|
56
|
-
"xlsx": "0.18.5"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@ant-design/colors": "^7.0.0",
|
|
60
|
-
"@babel/core": "^7.22.20",
|
|
61
|
-
"@babel/eslint-parser": "^7.22.15",
|
|
62
|
-
"@babel/preset-env": "^7.22.20",
|
|
63
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
|
64
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
65
|
-
"@vue/cli-service": "^5.0.8",
|
|
66
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
67
|
-
"@vue/test-utils": "^1.3.6",
|
|
68
|
-
"babel-jest": "^26.6.3",
|
|
69
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
70
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
71
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
72
|
-
"deepmerge": "^4.3.1",
|
|
73
|
-
"eslint": "^8.51.0",
|
|
74
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
75
|
-
"fast-deep-equal": "^3.1.3",
|
|
76
|
-
"ignore-loader": "^0.1.2",
|
|
77
|
-
"jest": "^26.6.3",
|
|
78
|
-
"jest-environment-jsdom": "^26.6.2",
|
|
79
|
-
"jest-transform-stub": "^2.0.0",
|
|
80
|
-
"less-loader": "^6.2.0",
|
|
81
|
-
"script-loader": "^0.7.2",
|
|
82
|
-
"style-resources-loader": "^1.5.0",
|
|
83
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
84
|
-
"vue-jest": "^4.0.1",
|
|
85
|
-
"vue-template-compiler": "^2.7.14",
|
|
86
|
-
"webpack": "^5.88.2",
|
|
87
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
88
|
-
"whatwg-fetch": "^3.6.19"
|
|
89
|
-
},
|
|
90
|
-
"browserslist": [
|
|
91
|
-
"> 1%",
|
|
92
|
-
"last 2 versions",
|
|
93
|
-
"not dead",
|
|
94
|
-
"not ie 11"
|
|
95
|
-
]
|
|
96
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.8.300",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
+
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
+
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
+
"test:unit": "vue-cli-service test:unit",
|
|
10
|
+
"lint": "vue-cli-service lint",
|
|
11
|
+
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
+
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
+
"test": "jest"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
+
"@antv/data-set": "^0.11.8",
|
|
18
|
+
"@antv/g2plot": "^2.4.31",
|
|
19
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
+
"animate.css": "^4.1.1",
|
|
21
|
+
"ant-design-vue": "^1.7.8",
|
|
22
|
+
"axios": "^0.27.2",
|
|
23
|
+
"clipboard": "^2.0.11",
|
|
24
|
+
"core-js": "^3.33.0",
|
|
25
|
+
"crypto-js": "^4.1.1",
|
|
26
|
+
"date-fns": "^2.29.3",
|
|
27
|
+
"default-passive-events": "^2.0.0",
|
|
28
|
+
"dotenv": "^16.3.1",
|
|
29
|
+
"echarts": "^5.5.0",
|
|
30
|
+
"enquire.js": "^2.1.6",
|
|
31
|
+
"file-saver": "^2.0.5",
|
|
32
|
+
"highlight.js": "^11.7.0",
|
|
33
|
+
"html2canvas": "^1.4.1",
|
|
34
|
+
"js-base64": "^3.7.5",
|
|
35
|
+
"js-cookie": "^2.2.1",
|
|
36
|
+
"jsencrypt": "^3.3.2",
|
|
37
|
+
"jspdf": "^2.5.1",
|
|
38
|
+
"lodash.clonedeep": "^4.5.0",
|
|
39
|
+
"lodash.get": "^4.4.2",
|
|
40
|
+
"lodash.debounce": "^4",
|
|
41
|
+
"mockjs": "^1.1.0",
|
|
42
|
+
"nprogress": "^0.2.0",
|
|
43
|
+
"qs": "^6.11.2",
|
|
44
|
+
"regenerator-runtime": "^0.14.0",
|
|
45
|
+
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
+
"viser-vue": "^2.4.8",
|
|
47
|
+
"vue": "^2.7.14",
|
|
48
|
+
"vue-codemirror": "4.0.6",
|
|
49
|
+
"vue-i18n": "^8.28.2",
|
|
50
|
+
"vue-json-viewer": "^2.2.22",
|
|
51
|
+
"vue-router": "^3.6.5",
|
|
52
|
+
"vue-video-player": "^5.0.2",
|
|
53
|
+
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
+
"vuedraggable": "^2.24.3",
|
|
55
|
+
"vuex": "^3.6.2",
|
|
56
|
+
"xlsx": "0.18.5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@ant-design/colors": "^7.0.0",
|
|
60
|
+
"@babel/core": "^7.22.20",
|
|
61
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
62
|
+
"@babel/preset-env": "^7.22.20",
|
|
63
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
64
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
65
|
+
"@vue/cli-service": "^5.0.8",
|
|
66
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
67
|
+
"@vue/test-utils": "^1.3.6",
|
|
68
|
+
"babel-jest": "^26.6.3",
|
|
69
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
70
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
71
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
72
|
+
"deepmerge": "^4.3.1",
|
|
73
|
+
"eslint": "^8.51.0",
|
|
74
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
75
|
+
"fast-deep-equal": "^3.1.3",
|
|
76
|
+
"ignore-loader": "^0.1.2",
|
|
77
|
+
"jest": "^26.6.3",
|
|
78
|
+
"jest-environment-jsdom": "^26.6.2",
|
|
79
|
+
"jest-transform-stub": "^2.0.0",
|
|
80
|
+
"less-loader": "^6.2.0",
|
|
81
|
+
"script-loader": "^0.7.2",
|
|
82
|
+
"style-resources-loader": "^1.5.0",
|
|
83
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
84
|
+
"vue-jest": "^4.0.1",
|
|
85
|
+
"vue-template-compiler": "^2.7.14",
|
|
86
|
+
"webpack": "^5.88.2",
|
|
87
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
88
|
+
"whatwg-fetch": "^3.6.19"
|
|
89
|
+
},
|
|
90
|
+
"browserslist": [
|
|
91
|
+
"> 1%",
|
|
92
|
+
"last 2 versions",
|
|
93
|
+
"not dead",
|
|
94
|
+
"not ie 11"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
-
|
|
3
|
-
export default AmapPointRendering
|
|
1
|
+
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
+
|
|
3
|
+
export default AmapPointRendering
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 事件编辑弹窗 -->
|
|
4
|
-
<LowCodeEventEditorModal
|
|
5
|
-
ref="eventEditor"
|
|
6
|
-
@changeOuterValue="changeOuterValue"
|
|
7
|
-
@refresh="refresh"
|
|
8
|
-
@openModal="changeModalVisible"
|
|
9
|
-
:event-editor-current="eventEditorCurrent"
|
|
10
|
-
:editor-properties-config="editorPropertiesConfig"/>
|
|
11
|
-
<!-- 增加页面弹窗 -->
|
|
12
|
-
<LowCodeAddPageModal
|
|
13
|
-
ref="addPage"
|
|
14
|
-
@refresh="refresh"/>
|
|
15
|
-
<!-- 生命周期函数弹窗 -->
|
|
16
|
-
<LowCodeLifeCycleModal ref="lifeCycle"/>
|
|
17
|
-
<!-- Logic回调弹窗 -->
|
|
18
|
-
<LowCodeLogicCallbackModal ref="logicCallBack"/>
|
|
19
|
-
<!-- Logic参数弹窗 -->
|
|
20
|
-
<LowCodeLogicParamModal ref="logicParam"/>
|
|
21
|
-
<!-- 自定义JS弹窗 -->
|
|
22
|
-
<LowCodeCustomJSModal ref="customJS"/>
|
|
23
|
-
<LowCodeRunFunctionParamModal ref="functionParam" />
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
import LowCodeEventEditorModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue'
|
|
29
|
-
import LowCodeAddPageModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue'
|
|
30
|
-
import LowCodeLifeCycleModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue'
|
|
31
|
-
import LowCodeLogicCallbackModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue'
|
|
32
|
-
import LowCodeLogicParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue'
|
|
33
|
-
import LowCodeCustomJSModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue'
|
|
34
|
-
import LowCodeRunFunctionParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue'
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: 'LowCodeEditorModal',
|
|
38
|
-
components: {
|
|
39
|
-
LowCodeLogicCallbackModal,
|
|
40
|
-
LowCodeLifeCycleModal,
|
|
41
|
-
LowCodeEventEditorModal,
|
|
42
|
-
LowCodeAddPageModal,
|
|
43
|
-
LowCodeLogicParamModal,
|
|
44
|
-
LowCodeCustomJSModal,
|
|
45
|
-
LowCodeRunFunctionParamModal
|
|
46
|
-
},
|
|
47
|
-
props: {
|
|
48
|
-
// 用于保存右侧编辑组件的属性
|
|
49
|
-
// eslint-disable-next-line vue/require-default-prop
|
|
50
|
-
editorPropertiesConfig: {
|
|
51
|
-
type: Object,
|
|
52
|
-
require: true
|
|
53
|
-
},
|
|
54
|
-
// 用于事件编辑的回显,在点击事件编辑按钮后,会将此变量赋值
|
|
55
|
-
eventEditorCurrent: {
|
|
56
|
-
type: Object,
|
|
57
|
-
default: undefined
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
inject: [
|
|
61
|
-
'componentsMap'
|
|
62
|
-
],
|
|
63
|
-
methods: {
|
|
64
|
-
// 打开弹框
|
|
65
|
-
changeModalVisible (modalName) {
|
|
66
|
-
switch (modalName) {
|
|
67
|
-
case 'eventEditor' :
|
|
68
|
-
this.$refs.eventEditor.changeVisible()
|
|
69
|
-
return
|
|
70
|
-
case 'addPage':
|
|
71
|
-
this.$refs.addPage.changeVisible()
|
|
72
|
-
return
|
|
73
|
-
case 'lifeCycle':
|
|
74
|
-
this.$refs.lifeCycle.changeVisible()
|
|
75
|
-
return
|
|
76
|
-
case 'logicCallBack':
|
|
77
|
-
this.$refs.logicCallBack.changeVisible()
|
|
78
|
-
return
|
|
79
|
-
case 'logicParam':
|
|
80
|
-
this.$refs.logicParam.changeVisible()
|
|
81
|
-
return
|
|
82
|
-
case 'customJS':
|
|
83
|
-
this.$refs.customJS.changeVisible()
|
|
84
|
-
return
|
|
85
|
-
case 'functionParam':
|
|
86
|
-
this.$refs.functionParam.changeVisible()
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
// 刷新组件
|
|
90
|
-
refresh (type) {
|
|
91
|
-
this.$emit('refresh', type)
|
|
92
|
-
},
|
|
93
|
-
// 修改外侧(编辑器)的值
|
|
94
|
-
changeOuterValue (key, value) {
|
|
95
|
-
this.$emit('changeOuterValue', key, value)
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
computed: {
|
|
99
|
-
config () {
|
|
100
|
-
return this.$store.state.lowCode.config
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style scoped lang="less">
|
|
107
|
-
|
|
108
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- 事件编辑弹窗 -->
|
|
4
|
+
<LowCodeEventEditorModal
|
|
5
|
+
ref="eventEditor"
|
|
6
|
+
@changeOuterValue="changeOuterValue"
|
|
7
|
+
@refresh="refresh"
|
|
8
|
+
@openModal="changeModalVisible"
|
|
9
|
+
:event-editor-current="eventEditorCurrent"
|
|
10
|
+
:editor-properties-config="editorPropertiesConfig"/>
|
|
11
|
+
<!-- 增加页面弹窗 -->
|
|
12
|
+
<LowCodeAddPageModal
|
|
13
|
+
ref="addPage"
|
|
14
|
+
@refresh="refresh"/>
|
|
15
|
+
<!-- 生命周期函数弹窗 -->
|
|
16
|
+
<LowCodeLifeCycleModal ref="lifeCycle"/>
|
|
17
|
+
<!-- Logic回调弹窗 -->
|
|
18
|
+
<LowCodeLogicCallbackModal ref="logicCallBack"/>
|
|
19
|
+
<!-- Logic参数弹窗 -->
|
|
20
|
+
<LowCodeLogicParamModal ref="logicParam"/>
|
|
21
|
+
<!-- 自定义JS弹窗 -->
|
|
22
|
+
<LowCodeCustomJSModal ref="customJS"/>
|
|
23
|
+
<LowCodeRunFunctionParamModal ref="functionParam" />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import LowCodeEventEditorModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue'
|
|
29
|
+
import LowCodeAddPageModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue'
|
|
30
|
+
import LowCodeLifeCycleModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue'
|
|
31
|
+
import LowCodeLogicCallbackModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue'
|
|
32
|
+
import LowCodeLogicParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue'
|
|
33
|
+
import LowCodeCustomJSModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue'
|
|
34
|
+
import LowCodeRunFunctionParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue'
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'LowCodeEditorModal',
|
|
38
|
+
components: {
|
|
39
|
+
LowCodeLogicCallbackModal,
|
|
40
|
+
LowCodeLifeCycleModal,
|
|
41
|
+
LowCodeEventEditorModal,
|
|
42
|
+
LowCodeAddPageModal,
|
|
43
|
+
LowCodeLogicParamModal,
|
|
44
|
+
LowCodeCustomJSModal,
|
|
45
|
+
LowCodeRunFunctionParamModal
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
// 用于保存右侧编辑组件的属性
|
|
49
|
+
// eslint-disable-next-line vue/require-default-prop
|
|
50
|
+
editorPropertiesConfig: {
|
|
51
|
+
type: Object,
|
|
52
|
+
require: true
|
|
53
|
+
},
|
|
54
|
+
// 用于事件编辑的回显,在点击事件编辑按钮后,会将此变量赋值
|
|
55
|
+
eventEditorCurrent: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: undefined
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
inject: [
|
|
61
|
+
'componentsMap'
|
|
62
|
+
],
|
|
63
|
+
methods: {
|
|
64
|
+
// 打开弹框
|
|
65
|
+
changeModalVisible (modalName) {
|
|
66
|
+
switch (modalName) {
|
|
67
|
+
case 'eventEditor' :
|
|
68
|
+
this.$refs.eventEditor.changeVisible()
|
|
69
|
+
return
|
|
70
|
+
case 'addPage':
|
|
71
|
+
this.$refs.addPage.changeVisible()
|
|
72
|
+
return
|
|
73
|
+
case 'lifeCycle':
|
|
74
|
+
this.$refs.lifeCycle.changeVisible()
|
|
75
|
+
return
|
|
76
|
+
case 'logicCallBack':
|
|
77
|
+
this.$refs.logicCallBack.changeVisible()
|
|
78
|
+
return
|
|
79
|
+
case 'logicParam':
|
|
80
|
+
this.$refs.logicParam.changeVisible()
|
|
81
|
+
return
|
|
82
|
+
case 'customJS':
|
|
83
|
+
this.$refs.customJS.changeVisible()
|
|
84
|
+
return
|
|
85
|
+
case 'functionParam':
|
|
86
|
+
this.$refs.functionParam.changeVisible()
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// 刷新组件
|
|
90
|
+
refresh (type) {
|
|
91
|
+
this.$emit('refresh', type)
|
|
92
|
+
},
|
|
93
|
+
// 修改外侧(编辑器)的值
|
|
94
|
+
changeOuterValue (key, value) {
|
|
95
|
+
this.$emit('changeOuterValue', key, value)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
config () {
|
|
100
|
+
return this.$store.state.lowCode.config
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped lang="less">
|
|
107
|
+
|
|
108
|
+
</style>
|
|
@@ -38,6 +38,15 @@
|
|
|
38
38
|
<div v-if="editorPanelCurrent[0] === 'properties'">
|
|
39
39
|
<!-- 组件属性编辑 -->
|
|
40
40
|
<div v-if="editorPropertiesConfig.props !== undefined">
|
|
41
|
+
<div v-if="editorPropertiesConfig.type === 'tabs'" style="border: 2px solid rgba(0,0,0,0.2); padding: 10%; margin: 5%">
|
|
42
|
+
<p>标签</p>
|
|
43
|
+
<template v-for="(tab, tabIndex) in editorPropertiesConfig.body">
|
|
44
|
+
<div :key="tab.key" style="border-bottom: 1px solid rgb(200,229,255)">
|
|
45
|
+
标签名: <a-input :default-value="tab.label" @change="handleTabPropChange($event, tabIndex, 'label')"/>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
<a-button icon="plus" @click="addNewTab"/>
|
|
49
|
+
</div>
|
|
41
50
|
<div v-if="editorPropertiesConfig.span">
|
|
42
51
|
栅格数:
|
|
43
52
|
<a-row>
|
|
@@ -184,6 +193,11 @@ export default {
|
|
|
184
193
|
color: 'orange',
|
|
185
194
|
text: '行'
|
|
186
195
|
}
|
|
196
|
+
case 'tabs':
|
|
197
|
+
return {
|
|
198
|
+
color: 'cyan',
|
|
199
|
+
text: '标签页'
|
|
200
|
+
}
|
|
187
201
|
default:
|
|
188
202
|
return {
|
|
189
203
|
color: 'green',
|
|
@@ -191,6 +205,55 @@ export default {
|
|
|
191
205
|
}
|
|
192
206
|
}
|
|
193
207
|
},
|
|
208
|
+
// 修改标签名
|
|
209
|
+
handleTabPropChange (event, index, type) {
|
|
210
|
+
// 找到目标配置
|
|
211
|
+
const targetConfig = lowcodeUtils.getComponentConfig(this.editorPropertiesConfig.id, this.config.page)
|
|
212
|
+
// 新输入的值
|
|
213
|
+
targetConfig.body[index][type] = event.target.value
|
|
214
|
+
},
|
|
215
|
+
// 添加新标签
|
|
216
|
+
addNewTab () {
|
|
217
|
+
// 找到目标配置
|
|
218
|
+
const targetConfig = lowcodeUtils.getComponentConfig(this.editorPropertiesConfig.id, this.config.page)
|
|
219
|
+
const pageId = lowcodeUtils.nanoidWithoutSymbol(2)
|
|
220
|
+
targetConfig.body.push({
|
|
221
|
+
key: targetConfig.body.length.toString(),
|
|
222
|
+
label: targetConfig.body.length.toString(),
|
|
223
|
+
type: 'tab',
|
|
224
|
+
body: {
|
|
225
|
+
type: 'container_page',
|
|
226
|
+
span: 24,
|
|
227
|
+
id: 'container_' + lowcodeUtils.nanoidWithoutSymbol(6),
|
|
228
|
+
page: [
|
|
229
|
+
{
|
|
230
|
+
id: 'container_page_' + pageId,
|
|
231
|
+
type: 'page',
|
|
232
|
+
body: [
|
|
233
|
+
{
|
|
234
|
+
id: 'container_page_' + pageId + '_0',
|
|
235
|
+
type: 'row',
|
|
236
|
+
config: {
|
|
237
|
+
align: 'top',
|
|
238
|
+
gutter: 0,
|
|
239
|
+
justify: 'start'
|
|
240
|
+
},
|
|
241
|
+
body: [
|
|
242
|
+
{
|
|
243
|
+
type: 'container',
|
|
244
|
+
selected: false,
|
|
245
|
+
span: 24,
|
|
246
|
+
id: 'container_' + lowcodeUtils.nanoidWithoutSymbol(6),
|
|
247
|
+
props: {}
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
},
|
|
194
257
|
// 事件编辑器中,点击编辑按钮
|
|
195
258
|
editEventIconClick (eventType, eventIndex) {
|
|
196
259
|
// 找到目标配置
|
|
@@ -43,6 +43,27 @@
|
|
|
43
43
|
|| <br> ||
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
+
<!-- 显示Tab容器 -->
|
|
47
|
+
<div
|
|
48
|
+
v-else-if="item.type === 'tabs'">
|
|
49
|
+
<a-tabs>
|
|
50
|
+
<template v-for="(tab) in item.body">
|
|
51
|
+
<a-tab-pane :key="tab.key" :tab="tab.label">
|
|
52
|
+
<LowCodeRender
|
|
53
|
+
ref="sub"
|
|
54
|
+
:is-root="false"
|
|
55
|
+
@showDraw="handelSubShowDraw"
|
|
56
|
+
@showModal="handelSubShowModal"
|
|
57
|
+
v-if="renderSub"
|
|
58
|
+
@spanDrag="handleDrag"
|
|
59
|
+
@containerDelete="handleContainerDelete"
|
|
60
|
+
@clickComponentInEditor="clickComponentInner"
|
|
61
|
+
:page-config="tab.body"
|
|
62
|
+
:edit-mode="editMode"/>
|
|
63
|
+
</a-tab-pane>
|
|
64
|
+
</template>
|
|
65
|
+
</a-tabs>
|
|
66
|
+
</div>
|
|
46
67
|
<!-- 递归显示页面容器 -->
|
|
47
68
|
<div
|
|
48
69
|
v-else-if="item.type === 'container_page'"
|
|
@@ -105,18 +126,22 @@
|
|
|
105
126
|
:destroyOnClose="true">
|
|
106
127
|
<template v-for="(row, rowIndex) in modal.body">
|
|
107
128
|
<template v-for="(item, itemIndex) in row.body">
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
<div v-if="item.type === 'tabs'" :key="'modalItem_' + rowIndex + '_' + itemIndex">
|
|
130
|
+
<h1>tabssssss</h1>
|
|
131
|
+
</div>
|
|
132
|
+
<div v-else :key="'modalItem_' + rowIndex + '_' + itemIndex">
|
|
133
|
+
<component
|
|
134
|
+
v-if="checkComponentRequiredProps(item.type, item.props)"
|
|
135
|
+
:lifeCycleFunction="resolveLifeCycleEvent(item)"
|
|
136
|
+
:is="resolveComponentType(item.type)"
|
|
137
|
+
:propsData="{...item.props, showModalOrDraw: false}"
|
|
138
|
+
@componentDidMounted="componentDidMounted"
|
|
139
|
+
@onEvent="handleEvent"
|
|
140
|
+
:mixinComponentId="item.id"/>
|
|
141
|
+
<div v-else class="propsNotFixedComponent">
|
|
142
|
+
<p style="line-height: 200px; text-align: center; font-size: 2em; margin: 0">{{ item.type }}</p>
|
|
143
|
+
<p style="text-align: center; font-size: 1.2em">必填参数未设置完全!暂停渲染</p>
|
|
144
|
+
</div>
|
|
120
145
|
</div>
|
|
121
146
|
</template>
|
|
122
147
|
</template>
|
|
@@ -134,18 +159,22 @@
|
|
|
134
159
|
:destroyOnClose="true">
|
|
135
160
|
<template v-for="(row, rowIndex) in draw.body">
|
|
136
161
|
<template v-for="(item, itemIndex) in row.body">
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
<div v-if="item.type === 'tabs'" :key="'drawItem_' + rowIndex + '_' + itemIndex">
|
|
163
|
+
<h1>tabssssss</h1>
|
|
164
|
+
</div>
|
|
165
|
+
<div v-else :key="'drawItem_' + rowIndex + '_' + itemIndex">
|
|
166
|
+
<component
|
|
167
|
+
v-if="checkComponentRequiredProps(item.type, item.props)"
|
|
168
|
+
:lifeCycleFunction="resolveLifeCycleEvent(item)"
|
|
169
|
+
:is="resolveComponentType(item.type)"
|
|
170
|
+
:propsData="{...item.props, showModalOrDraw: false}"
|
|
171
|
+
@componentDidMounted="componentDidMounted"
|
|
172
|
+
@onEvent="handleEvent"
|
|
173
|
+
:mixinComponentId="item.id"/>
|
|
174
|
+
<div v-else class="propsNotFixedComponent">
|
|
175
|
+
<p style="line-height: 200px; text-align: center; font-size: 2em; margin: 0">{{ item.type }}</p>
|
|
176
|
+
<p style="text-align: center; font-size: 1.2em">必填参数未设置完全!暂停渲染</p>
|
|
177
|
+
</div>
|
|
149
178
|
</div>
|
|
150
179
|
</template>
|
|
151
180
|
</template>
|