cloud-web-corejs 1.0.54-dev.626 → 1.0.54-dev.627
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 +1 -1
- package/src/components/xform/form-designer/designer.js +1993 -9
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +104 -62
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +102 -36
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +68 -24
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +2 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +213 -179
- package/src/components/xform/utils/util.js +7 -1
package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue
CHANGED
|
@@ -3,21 +3,64 @@
|
|
|
3
3
|
<el-form-item label-width="0">
|
|
4
4
|
<el-divider class="custom-divider">下拉按钮设置</el-divider>
|
|
5
5
|
</el-form-item>
|
|
6
|
-
<el-form-item label="
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<el-form-item label="按钮样式">
|
|
7
|
+
<el-select
|
|
8
|
+
v-model="optionModel.dropdownType"
|
|
9
|
+
placeholder="请选择按钮样式"
|
|
10
|
+
>
|
|
11
|
+
<el-option label="按钮" value="button"></el-option>
|
|
12
|
+
<el-option label="链接" value="link"></el-option>
|
|
13
|
+
</el-select>
|
|
14
|
+
</el-form-item>
|
|
15
|
+
<el-form-item label="下拉触发方式">
|
|
16
|
+
<el-select
|
|
17
|
+
v-model="optionModel.dropdownTrigger"
|
|
18
|
+
placeholder="请选择下拉触发方式"
|
|
19
|
+
>
|
|
20
|
+
<el-option label="点击" value="click"></el-option>
|
|
21
|
+
<el-option label="悬停" value="hover"></el-option>
|
|
22
|
+
</el-select>
|
|
23
|
+
</el-form-item>
|
|
24
|
+
<el-form-item label="下拉按钮选项"></el-form-item>
|
|
25
|
+
<li
|
|
26
|
+
v-for="(colItem, colIdx) in selectedWidget.widgetList"
|
|
27
|
+
:key="colIdx"
|
|
28
|
+
class="col-item"
|
|
29
|
+
>
|
|
11
30
|
<i class="el-icon-s-operation drag-option"></i>
|
|
12
|
-
<el-input
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
<el-input
|
|
32
|
+
v-model="colItem.options.label"
|
|
33
|
+
class="cell-span-input"
|
|
34
|
+
></el-input>
|
|
35
|
+
<el-button
|
|
36
|
+
circle
|
|
37
|
+
plain
|
|
38
|
+
size="mini"
|
|
39
|
+
type="button"
|
|
40
|
+
icon="el-icon-edit"
|
|
41
|
+
class="col-delete-button"
|
|
42
|
+
style="position: unset"
|
|
43
|
+
@click="openEditFormatConfigDialog(colItem, colIdx)"
|
|
44
|
+
></el-button>
|
|
45
|
+
<el-button
|
|
46
|
+
circle
|
|
47
|
+
plain
|
|
48
|
+
size="mini"
|
|
49
|
+
type="danger"
|
|
50
|
+
@click="deleteCol(selectedWidget, colIdx)"
|
|
51
|
+
icon="el-icon-minus"
|
|
52
|
+
class="col-delete-button"
|
|
53
|
+
style="position: unset"
|
|
54
|
+
></el-button>
|
|
17
55
|
</li>
|
|
18
56
|
</draggable>
|
|
19
57
|
<div>
|
|
20
|
-
<el-button
|
|
58
|
+
<el-button
|
|
59
|
+
type="text"
|
|
60
|
+
@click="addNewCol(selectedWidget)"
|
|
61
|
+
icon="el-icon-circle-plus-outline"
|
|
62
|
+
class="add-option"
|
|
63
|
+
>
|
|
21
64
|
增加
|
|
22
65
|
</el-button>
|
|
23
66
|
</div>
|
|
@@ -26,9 +69,9 @@
|
|
|
26
69
|
</template>
|
|
27
70
|
|
|
28
71
|
<script>
|
|
29
|
-
import Draggable from
|
|
30
|
-
import i18n from "../../../utils/i18n"
|
|
31
|
-
import {deepClone, generateId} from "../../../utils/util"
|
|
72
|
+
import Draggable from "vuedraggable";
|
|
73
|
+
import i18n from "../../../utils/i18n";
|
|
74
|
+
import { deepClone, generateId } from "../../../utils/util";
|
|
32
75
|
|
|
33
76
|
export default {
|
|
34
77
|
name: "dropdownFlag-editor",
|
|
@@ -41,23 +84,25 @@ export default {
|
|
|
41
84
|
selectedWidget: Object,
|
|
42
85
|
optionModel: Object,
|
|
43
86
|
},
|
|
44
|
-
inject: [
|
|
87
|
+
inject: ["openWidgetPropertyDialog"],
|
|
45
88
|
methods: {
|
|
46
89
|
deleteCol(gridWidget, colIdx) {
|
|
47
90
|
if (!!gridWidget && !!gridWidget.widgetList) {
|
|
48
91
|
gridWidget.widgetList.splice(colIdx, 1);
|
|
49
92
|
}
|
|
50
|
-
this.designer.emitHistoryChange()
|
|
93
|
+
this.designer.emitHistoryChange();
|
|
51
94
|
},
|
|
52
95
|
|
|
53
96
|
addNewCol(gridWidget) {
|
|
54
|
-
let newGridCol = deepClone(
|
|
97
|
+
let newGridCol = deepClone(
|
|
98
|
+
this.designer.getFieldWidgetByType("dropdown-item")
|
|
99
|
+
);
|
|
55
100
|
let tmpId = generateId();
|
|
56
|
-
newGridCol.id =
|
|
57
|
-
newGridCol.options.name =
|
|
58
|
-
newGridCol.options.label =
|
|
101
|
+
newGridCol.id = "dropdown-item-" + tmpId;
|
|
102
|
+
newGridCol.options.name = "dropdownItem" + tmpId;
|
|
103
|
+
newGridCol.options.label = "dropdownItem" + tmpId;
|
|
59
104
|
gridWidget.widgetList.push(newGridCol);
|
|
60
|
-
this.designer.emitHistoryChange()
|
|
105
|
+
this.designer.emitHistoryChange();
|
|
61
106
|
},
|
|
62
107
|
openEditFormatConfigDialog(fieldWidget, index) {
|
|
63
108
|
this.openWidgetPropertyDialog({
|
|
@@ -67,8 +112,8 @@ export default {
|
|
|
67
112
|
},
|
|
68
113
|
});
|
|
69
114
|
},
|
|
70
|
-
}
|
|
71
|
-
}
|
|
115
|
+
},
|
|
116
|
+
};
|
|
72
117
|
</script>
|
|
73
118
|
|
|
74
119
|
<style lang="scss" scoped>
|
|
@@ -85,5 +130,4 @@ li.col-item {
|
|
|
85
130
|
margin-left: 6px;
|
|
86
131
|
}
|
|
87
132
|
}
|
|
88
|
-
|
|
89
133
|
</style>
|