@@ -84,14 +87,16 @@ const right_update = (item: any) => {
};
const draglist = ref
(null);
-const emits = defineEmits(['accomplish']);
+const emits = defineEmits(['accomplish', 'custom_edit']);
const accomplish = () => {
if (!draglist.value) {
return;
} else {
emits('accomplish', draglist.value.diy_data);
}
-
+};
+const custom_edit = (list: diy, height: number) => {
+ emits('custom_edit', list, height);
};
diff --git a/src/components/model-custom/model-custom-content.vue b/src/components/model-custom/model-custom-content.vue
index 428f5e11..3a35ac15 100644
--- a/src/components/model-custom/model-custom-content.vue
+++ b/src/components/model-custom/model-custom-content.vue
@@ -55,11 +55,13 @@
内容设置
- 自定义编辑
+ 自定义编辑
+
+
@@ -93,17 +95,31 @@ const custom_width = computed(() => {
return center_width.value;
}
})
-
+// 外层自定义的弹出框
const dialogVisible = ref(false);
+// 自定义组的弹出框
+const dialogVisible_group = ref(false);
const form = ref(props.value);
-
+// 外层的内容
+let custom_list = reactive([]);
+const center_height = ref(0);
+// 自定义组的内容
+let custom_group_list = reactive([]);
+const center_group_height = ref(0);
const dragkey = ref('');
// 自定义编辑的逻辑
-const custom_edit = () => {
- dialogVisible.value = true;
+const custom_edit = (type: string, list?: any, height?: number) => {
dragkey.value = Math.random().toString(36).substring(2);
- custom_list = cloneDeep(form.value.custom_list);
- center_height.value = cloneDeep(form.value.height);
+ if (type == 'custom') {
+ dialogVisible.value = true;
+ custom_list = cloneDeep(form.value.custom_list);
+ center_height.value = cloneDeep(form.value.height);
+ } else {
+ dialogVisible_group.value = true;
+ custom_group_list = list;
+
+ center_group_height.value = height || 0;
+ }
};
// 点击完成的处理逻辑
const accomplish = (list: any) => {
@@ -112,8 +128,6 @@ const accomplish = (list: any) => {
};
//#endregion
// 弹出框里的内容
-let custom_list = reactive([]);
-const center_height = ref(0);
interface custom_config {
show_type: string[],
show_number: number[],