yqform-edit 1.0.13 → 1.0.14
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/dist/yqform-edit.common.js +175 -121
- package/dist/yqform-edit.css +1 -1
- package/dist/yqform-edit.umd.js +175 -121
- package/dist/yqform-edit.umd.min.js +6 -6
- package/package.json +1 -1
- package/src/components/common/rightConfig/formConfig.vue +7 -4
- package/src/components/dynamic-form/components/component-content.vue +22 -3
- package/src/components/dynamic-form/components/component-options.vue +10 -3
- package/src/components/dynamic-form/dynamic-form.vue +15 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="config-container">
|
|
3
3
|
<!-- 页面标题配置 -->
|
|
4
|
-
<div class="page-config">
|
|
4
|
+
<div class="page-config" v-show="showPageConfig">
|
|
5
5
|
<div class="config-title">页面设置</div>
|
|
6
6
|
<div class="config-title-content">
|
|
7
7
|
<div class="option-title">标题</div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
<div class="page-config group-config second-config">
|
|
15
|
+
<div class="page-config group-config second-config" v-show="showPageConfig">
|
|
16
16
|
<div class="config-title more-header">
|
|
17
17
|
<span class="show-more" @click="moreHeaderShow = true" v-if="!moreHeaderShow">更多</span>
|
|
18
18
|
<span class="show-more" @click="moreHeaderShow = false" v-if="moreHeaderShow">收起</span>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
<!-- 分组设置 -->
|
|
58
|
-
<div class="page-config split-group">
|
|
58
|
+
<div class="page-config split-group" v-show="showGroupConfig">
|
|
59
59
|
<div class="config-title">分组设置</div>
|
|
60
60
|
<div class="config-title-content">
|
|
61
61
|
<div class="option-title">标题</div>
|
|
@@ -92,7 +92,7 @@ import { randomIdFactory } from '@/utils/index.js'
|
|
|
92
92
|
export default {
|
|
93
93
|
name: 'rightConfig',
|
|
94
94
|
inject: ['getImgFile', 'currentFormSpec', 'form'],
|
|
95
|
-
props: ['currentPageIndex'],
|
|
95
|
+
props: ['currentPageIndex', 'showGroupConfig', 'showPageConfig'],
|
|
96
96
|
data() {
|
|
97
97
|
return {
|
|
98
98
|
form_config: {
|
|
@@ -183,6 +183,9 @@ export default {
|
|
|
183
183
|
},
|
|
184
184
|
immediate: true,
|
|
185
185
|
},
|
|
186
|
+
showGroupConfig(value) {
|
|
187
|
+
console.log('showGroupConfig >', value)
|
|
188
|
+
},
|
|
186
189
|
},
|
|
187
190
|
computed: {
|
|
188
191
|
group_spec: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div id="formContent" class="content" @click="clickPage">
|
|
2
|
+
<div id="formContent" class="content" :class="showPageConfig ? 'content-active' : ''" @click="clickPage">
|
|
3
3
|
<!--状态栏-->
|
|
4
4
|
<section class="status-bar">
|
|
5
5
|
<time>9:41</time>
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
<!--底部-->
|
|
29
29
|
<footer
|
|
30
30
|
class="bottom"
|
|
31
|
+
:class="showGroupConfig ? 'bottom-active' : ''"
|
|
31
32
|
:style="{ gap: isNotFirstOrLast ? '48px' : '0px' }"
|
|
33
|
+
@click.stop="clickGroup"
|
|
32
34
|
@mouseenter="asideShow = true"
|
|
33
35
|
@mouseleave="asideShow = false">
|
|
34
36
|
<template>
|
|
@@ -89,7 +91,7 @@ export default {
|
|
|
89
91
|
name: 'ComponentContent',
|
|
90
92
|
inject: ['pid', 'setPageIndex'],
|
|
91
93
|
components: { Content },
|
|
92
|
-
emits: ['onSelect', 'selectPage'],
|
|
94
|
+
emits: ['onSelect', 'selectPage', 'selectGroup'],
|
|
93
95
|
props: {
|
|
94
96
|
noControl: {
|
|
95
97
|
type: Boolean,
|
|
@@ -118,6 +120,14 @@ export default {
|
|
|
118
120
|
required: false,
|
|
119
121
|
default: true,
|
|
120
122
|
},
|
|
123
|
+
showPageConfig: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
required: false,
|
|
126
|
+
default: false,
|
|
127
|
+
},
|
|
128
|
+
showGroupConfig: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
},
|
|
121
131
|
},
|
|
122
132
|
data() {
|
|
123
133
|
return {
|
|
@@ -195,9 +205,12 @@ export default {
|
|
|
195
205
|
selectItem(key) {
|
|
196
206
|
this.$emit('onSelect', key)
|
|
197
207
|
},
|
|
198
|
-
clickPage(){
|
|
208
|
+
clickPage() {
|
|
199
209
|
this.$emit('selectPage')
|
|
200
210
|
},
|
|
211
|
+
clickGroup() {
|
|
212
|
+
this.$emit('selectGroup')
|
|
213
|
+
},
|
|
201
214
|
getPage(index) {
|
|
202
215
|
this.pageIndex = index
|
|
203
216
|
},
|
|
@@ -287,6 +300,9 @@ export default {
|
|
|
287
300
|
</script>
|
|
288
301
|
|
|
289
302
|
<style scoped lang="scss">
|
|
303
|
+
.content.content-active {
|
|
304
|
+
border: 0.5px solid rgba(25, 137, 247, 1);
|
|
305
|
+
}
|
|
290
306
|
.content {
|
|
291
307
|
border-radius: 30px;
|
|
292
308
|
border: 0.5px solid rgba(166, 166, 166, 1);
|
|
@@ -425,6 +441,9 @@ export default {
|
|
|
425
441
|
}
|
|
426
442
|
}
|
|
427
443
|
|
|
444
|
+
.bottom.bottom-active {
|
|
445
|
+
border: 0.5px solid rgba(25, 137, 247, 1);
|
|
446
|
+
}
|
|
428
447
|
.bottom {
|
|
429
448
|
position: absolute;
|
|
430
449
|
bottom: 0;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="options-container" :style="copyPreview ? '' : 'height: 80vh'">
|
|
3
|
-
<FormConfig
|
|
4
|
-
|
|
3
|
+
<FormConfig
|
|
4
|
+
v-if="!copyPreview"
|
|
5
|
+
:currentPageIndex="currentPageIndex"
|
|
6
|
+
:showGroupConfig="showGroupConfig"
|
|
7
|
+
:showPageConfig="showPageConfig" />
|
|
8
|
+
<div class="question" v-show="!noSelectItem && !showPageConfig && !showGroupConfig">
|
|
5
9
|
<div class="config-title">题目设置</div>
|
|
6
10
|
<div class="question-config">
|
|
7
11
|
<div class="config-title-content">
|
|
@@ -218,7 +222,7 @@
|
|
|
218
222
|
</div>
|
|
219
223
|
</div>
|
|
220
224
|
<!-- 更多配置 -->
|
|
221
|
-
<div class="more" v-show="!noSelectItem && !showPageConfig">
|
|
225
|
+
<div class="more" v-show="!noSelectItem && !showGroupConfig && !showPageConfig">
|
|
222
226
|
<div class="config-title more-header">
|
|
223
227
|
<span class="show-more" @click="moreMoreShow = 'show'" v-if="moreMoreShow === 'hide'">更多</span>
|
|
224
228
|
<span class="show-more" @click="moreMoreShow = 'hide'" v-if="moreMoreShow === 'show'">收起</span>
|
|
@@ -326,6 +330,9 @@ export default {
|
|
|
326
330
|
showPageConfig: {
|
|
327
331
|
type: Boolean,
|
|
328
332
|
},
|
|
333
|
+
showGroupConfig: {
|
|
334
|
+
type: Boolean,
|
|
335
|
+
},
|
|
329
336
|
},
|
|
330
337
|
data() {
|
|
331
338
|
return {
|
|
@@ -5,14 +5,18 @@
|
|
|
5
5
|
:currentKey="currentItemKey"
|
|
6
6
|
:currentPageIndex="currentPageIndex"
|
|
7
7
|
:form="form"
|
|
8
|
+
:showPageConfig="showPageConfig"
|
|
9
|
+
:showGroupConfig="showGroupConfig"
|
|
8
10
|
@onSelect="setItemIndex"
|
|
9
|
-
@selectPage="selectPage"
|
|
11
|
+
@selectPage="selectPage"
|
|
12
|
+
@selectGroup="selectGroup" />
|
|
10
13
|
<ComponentOptions
|
|
11
14
|
:item="currentItem"
|
|
12
15
|
:currentItemKey="currentItemKey"
|
|
13
16
|
:currentPageIndex="currentPageIndex"
|
|
14
17
|
:form="form"
|
|
15
|
-
:showPageConfig="showPageConfig"
|
|
18
|
+
:showPageConfig="showPageConfig"
|
|
19
|
+
:showGroupConfig="showGroupConfig" />
|
|
16
20
|
</div>
|
|
17
21
|
</template>
|
|
18
22
|
|
|
@@ -42,6 +46,7 @@ export default {
|
|
|
42
46
|
dependValues: [],
|
|
43
47
|
movePage: 0,
|
|
44
48
|
showPageConfig: true,
|
|
49
|
+
showGroupConfig: false,
|
|
45
50
|
}
|
|
46
51
|
},
|
|
47
52
|
props: {
|
|
@@ -101,6 +106,7 @@ export default {
|
|
|
101
106
|
methods: {
|
|
102
107
|
setItemIndex(index) {
|
|
103
108
|
this.showPageConfig = false
|
|
109
|
+
this.showGroupConfig = false
|
|
104
110
|
this.currentItemKey = index
|
|
105
111
|
},
|
|
106
112
|
setPageIndex(index) {
|
|
@@ -108,6 +114,13 @@ export default {
|
|
|
108
114
|
},
|
|
109
115
|
selectPage() {
|
|
110
116
|
this.showPageConfig = true
|
|
117
|
+
this.showGroupConfig = false
|
|
118
|
+
this.currentItemKey = ''
|
|
119
|
+
},
|
|
120
|
+
selectGroup() {
|
|
121
|
+
console.log('selectGroup')
|
|
122
|
+
this.showGroupConfig = true
|
|
123
|
+
this.showPageConfig = false
|
|
111
124
|
this.currentItemKey = ''
|
|
112
125
|
},
|
|
113
126
|
resetPage() {
|