cloud-web-corejs 1.0.54-dev.651 → 1.0.54-dev.653
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/form-widget/field-widget/date-widget.vue +27 -14
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +135 -32
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +157 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +18 -17
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +26 -26
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +12 -14
- package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +208 -194
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -0
- package/src/components/xform/icon-picker/icons.json +284 -0
- package/src/components/xform/icon-picker/index.vue +145 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item label="关联开始字段">
|
|
4
|
+
<el-select
|
|
5
|
+
v-if="dateFieldOptions.length"
|
|
6
|
+
v-model="optionModel.limitStartField"
|
|
7
|
+
filterable
|
|
8
|
+
clearable
|
|
9
|
+
placeholder="不能小于该字段值"
|
|
10
|
+
>
|
|
11
|
+
<el-option
|
|
12
|
+
v-for="item in dateFieldOptions"
|
|
13
|
+
:key="item.value"
|
|
14
|
+
:label="item.label"
|
|
15
|
+
:value="item.value"
|
|
16
|
+
></el-option>
|
|
17
|
+
</el-select>
|
|
18
|
+
<el-input
|
|
19
|
+
v-else
|
|
20
|
+
v-model="optionModel.limitStartField"
|
|
21
|
+
placeholder="请输入开始字段属性名"
|
|
22
|
+
clearable
|
|
23
|
+
></el-input>
|
|
24
|
+
</el-form-item>
|
|
25
|
+
<el-form-item label="关联结束字段">
|
|
26
|
+
<el-select
|
|
27
|
+
v-if="dateFieldOptions.length"
|
|
28
|
+
v-model="optionModel.limitEndField"
|
|
29
|
+
filterable
|
|
30
|
+
clearable
|
|
31
|
+
placeholder="不能大于该字段值"
|
|
32
|
+
>
|
|
33
|
+
<el-option
|
|
34
|
+
v-for="item in dateFieldOptions"
|
|
35
|
+
:key="item.value"
|
|
36
|
+
:label="item.label"
|
|
37
|
+
:value="item.value"
|
|
38
|
+
></el-option>
|
|
39
|
+
</el-select>
|
|
40
|
+
<el-input
|
|
41
|
+
v-else
|
|
42
|
+
v-model="optionModel.limitEndField"
|
|
43
|
+
placeholder="请输入结束字段属性名"
|
|
44
|
+
clearable
|
|
45
|
+
></el-input>
|
|
46
|
+
</el-form-item>
|
|
47
|
+
<el-form-item label="最小日期">
|
|
48
|
+
<el-date-picker
|
|
49
|
+
v-model="optionModel.minDate"
|
|
50
|
+
:type="pickerType"
|
|
51
|
+
:format="optionModel.format"
|
|
52
|
+
:value-format="optionModel.valueFormat"
|
|
53
|
+
style="width: 100%"
|
|
54
|
+
clearable
|
|
55
|
+
placeholder="留空则不限制"
|
|
56
|
+
></el-date-picker>
|
|
57
|
+
</el-form-item>
|
|
58
|
+
<el-form-item label="最大日期">
|
|
59
|
+
<el-date-picker
|
|
60
|
+
v-model="optionModel.maxDate"
|
|
61
|
+
:type="pickerType"
|
|
62
|
+
:format="optionModel.format"
|
|
63
|
+
:value-format="optionModel.valueFormat"
|
|
64
|
+
style="width: 100%"
|
|
65
|
+
clearable
|
|
66
|
+
placeholder="留空则不限制"
|
|
67
|
+
></el-date-picker>
|
|
68
|
+
</el-form-item>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
74
|
+
import propertyMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/propertyMixin";
|
|
75
|
+
import { loopHandleWidget } from "../../../../../../components/xform/utils/util";
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
name: "date-dateLimit-editor",
|
|
79
|
+
mixins: [i18n, propertyMixin],
|
|
80
|
+
props: {
|
|
81
|
+
designer: Object,
|
|
82
|
+
selectedWidget: Object,
|
|
83
|
+
optionModel: Object,
|
|
84
|
+
tableColumns: Array,
|
|
85
|
+
},
|
|
86
|
+
computed: {
|
|
87
|
+
pickerType() {
|
|
88
|
+
return this.optionModel.type || "date";
|
|
89
|
+
},
|
|
90
|
+
currentFieldKey() {
|
|
91
|
+
return this.getFieldKeyByOptions(this.optionModel);
|
|
92
|
+
},
|
|
93
|
+
dateFieldOptions() {
|
|
94
|
+
let options = [];
|
|
95
|
+
if (this.tableColumns && this.tableColumns.length) {
|
|
96
|
+
this.collectDateFieldsFromColumns(this.tableColumns, options);
|
|
97
|
+
} else if (this.designer && this.designer.widgetList) {
|
|
98
|
+
loopHandleWidget(this.designer.widgetList, (widget) => {
|
|
99
|
+
if (widget.type !== "date" || widget.id === this.selectedWidget.id) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
let fieldKey = this.getFieldKeyByOptions(widget.options);
|
|
103
|
+
if (fieldKey && fieldKey !== this.currentFieldKey) {
|
|
104
|
+
options.push({
|
|
105
|
+
value: fieldKey,
|
|
106
|
+
label: widget.options.label || fieldKey,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return options;
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
methods: {
|
|
115
|
+
getFieldKeyByOptions(options) {
|
|
116
|
+
if (!options) {
|
|
117
|
+
return "";
|
|
118
|
+
}
|
|
119
|
+
return (options.keyNameEnabled && options.keyName) || options.name || "";
|
|
120
|
+
},
|
|
121
|
+
collectDateFieldsFromColumns(columns, options) {
|
|
122
|
+
columns.forEach((col) => {
|
|
123
|
+
if (col.children && col.children.length) {
|
|
124
|
+
this.collectDateFieldsFromColumns(col.children, options);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (!this.isDateColumn(col)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
let fieldKey = col.prop;
|
|
131
|
+
if (col.columnOption) {
|
|
132
|
+
fieldKey = this.getFieldKeyByOptions(col.columnOption) || fieldKey;
|
|
133
|
+
}
|
|
134
|
+
if (col.editColumnOption) {
|
|
135
|
+
fieldKey =
|
|
136
|
+
this.getFieldKeyByOptions(col.editColumnOption) || fieldKey;
|
|
137
|
+
}
|
|
138
|
+
if (fieldKey && fieldKey !== this.currentFieldKey) {
|
|
139
|
+
options.push({
|
|
140
|
+
value: fieldKey,
|
|
141
|
+
label: col.label || fieldKey,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
isDateColumn(col) {
|
|
147
|
+
return (
|
|
148
|
+
col.formatS === "date" ||
|
|
149
|
+
col.formatS === "editDate" ||
|
|
150
|
+
col.editFormatS === "editDate" ||
|
|
151
|
+
col.widget?.type === "date" ||
|
|
152
|
+
col.editWidget?.type === "date"
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
</script>
|
package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div>
|
|
3
3
|
<el-form-item label-width="0">
|
|
4
|
-
<el-divider class="custom-divider">{{
|
|
4
|
+
<el-divider class="custom-divider">{{
|
|
5
|
+
i18nt("designer.setting.customLabelIcon")
|
|
6
|
+
}}</el-divider>
|
|
5
7
|
</el-form-item>
|
|
6
8
|
<el-form-item :label="i18nt('designer.setting.labelIconClass')">
|
|
7
|
-
<
|
|
9
|
+
<icon-picker v-model="optionModel.labelIconClass"></icon-picker>
|
|
8
10
|
</el-form-item>
|
|
9
11
|
</div>
|
|
10
12
|
</template>
|
|
11
13
|
|
|
12
14
|
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
15
|
+
import i18n from "@base/components/xform/utils/i18n";
|
|
16
|
+
import IconPicker from "@base/components/xform/icon-picker/index.vue";
|
|
17
|
+
export default {
|
|
18
|
+
name: "labelIconClass-editor",
|
|
19
|
+
components: { IconPicker },
|
|
20
|
+
mixins: [i18n],
|
|
21
|
+
props: {
|
|
22
|
+
designer: Object,
|
|
23
|
+
selectedWidget: Object,
|
|
24
|
+
optionModel: Object,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
24
27
|
</script>
|
|
25
28
|
|
|
26
|
-
<style scoped>
|
|
27
|
-
|
|
28
|
-
</style>
|
|
29
|
+
<style scoped></style>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.labelIconPosition')"
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.labelIconPosition')">
|
|
3
3
|
<el-select v-model="optionModel.labelIconPosition">
|
|
4
|
-
<el-option
|
|
5
|
-
|
|
4
|
+
<el-option
|
|
5
|
+
v-for="item in labelIconPosition"
|
|
6
|
+
:key="item.value"
|
|
7
|
+
:label="item.label"
|
|
8
|
+
:value="item.value"
|
|
9
|
+
>
|
|
6
10
|
</el-option>
|
|
7
11
|
</el-select>
|
|
8
12
|
</el-form-item>
|
|
9
13
|
</template>
|
|
10
14
|
|
|
11
15
|
<script>
|
|
12
|
-
|
|
16
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
18
|
+
export default {
|
|
19
|
+
name: "labelIconPosition-editor",
|
|
20
|
+
mixins: [i18n],
|
|
21
|
+
props: {
|
|
22
|
+
designer: Object,
|
|
23
|
+
selectedWidget: Object,
|
|
24
|
+
optionModel: Object,
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
labelIconPosition: [
|
|
29
|
+
{ label: "front", value: "front" },
|
|
30
|
+
{ label: "rear", value: "rear" },
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
};
|
|
33
35
|
</script>
|
|
34
36
|
|
|
35
|
-
<style scoped>
|
|
36
|
-
|
|
37
|
-
</style>
|
|
37
|
+
<style scoped></style>
|
package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.labelTooltip')"
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.labelTooltip')">
|
|
3
3
|
<el-input type="text" v-model="optionModel.labelTooltip"></el-input>
|
|
4
4
|
</el-form-item>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
|
|
8
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
export default {
|
|
11
|
+
name: "labelTooltip-editor",
|
|
12
|
+
mixins: [i18n],
|
|
13
|
+
props: {
|
|
14
|
+
designer: Object,
|
|
15
|
+
selectedWidget: Object,
|
|
16
|
+
optionModel: Object,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
|
-
<style scoped>
|
|
22
|
-
|
|
23
|
-
</style>
|
|
21
|
+
<style scoped></style>
|
package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form-item :label="i18nt('designer.setting.prefixIcon')">
|
|
3
|
-
<
|
|
3
|
+
<icon-picker v-model="optionModel.prefixIcon"></icon-picker>
|
|
4
4
|
</el-form-item>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
8
|
+
import i18n from "@base/components/xform/utils/i18n";
|
|
9
|
+
import IconPicker from "@base/components/xform/icon-picker/index.vue";
|
|
10
|
+
export default {
|
|
11
|
+
name: "prefixIcon-editor",
|
|
12
|
+
components: { IconPicker },
|
|
13
|
+
mixins: [i18n],
|
|
14
|
+
props: {
|
|
15
|
+
designer: Object,
|
|
16
|
+
selectedWidget: Object,
|
|
17
|
+
optionModel: Object,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
|
-
<style scoped>
|
|
22
|
-
|
|
23
|
-
</style>
|
|
22
|
+
<style scoped></style>
|
package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form-item :label="i18nt('designer.setting.suffixIcon')">
|
|
3
|
-
<
|
|
3
|
+
<icon-picker v-model="optionModel.suffixIcon"></icon-picker>
|
|
4
4
|
</el-form-item>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
8
|
+
import i18n from "@base/components/xform/utils/i18n";
|
|
9
|
+
import IconPicker from "@base/components/xform/icon-picker/index.vue";
|
|
10
|
+
export default {
|
|
11
|
+
name: "suffixIcon-editor",
|
|
12
|
+
components: { IconPicker },
|
|
13
|
+
mixins: [i18n],
|
|
14
|
+
props: {
|
|
15
|
+
designer: Object,
|
|
16
|
+
selectedWidget: Object,
|
|
17
|
+
optionModel: Object,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
|
-
<style scoped>
|
|
22
|
-
|
|
23
|
-
</style>
|
|
22
|
+
<style scoped></style>
|