From 3d1976211feedde4f3e1bfb012a89106ecfae2ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Wed, 21 Aug 2024 18:42:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../model-shop-list-content.vue | 19 ++++++++++++++-----
src/components/model-shop-tabs/index.vue | 18 +++++++++++-------
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/components/model-shop-list/model-shop-list-content.vue b/src/components/model-shop-list/model-shop-list-content.vue
index 3fe250f2..90c343a9 100644
--- a/src/components/model-shop-list/model-shop-list-content.vue
+++ b/src/components/model-shop-list/model-shop-list-content.vue
@@ -52,6 +52,7 @@
+
@@ -128,11 +129,19 @@ const product_list_remove = (index: number) => {
form.value.product_list.splice(index, 1);
};
const add = () => {
- form.value.product_list.push({
- id: get_math(),
- src: 'carousel',
- new_src: [],
- href: {},
+ url_value_dialog_visible.value = true;
+};
+// 打开弹出框
+const url_value_dialog_visible = ref(false);
+// 弹出框选择的内容
+const url_value_dialog_call_back = (item: any[]) => {
+ item.forEach((item: any) => {
+ form.value.product_list.push({
+ id: get_math(),
+ new_url: [],
+ new_title: item.title,
+ link: item,
+ });
});
};
// 拖拽更新之后,更新数据
diff --git a/src/components/model-shop-tabs/index.vue b/src/components/model-shop-tabs/index.vue
index 9b47eae5..e01168e8 100644
--- a/src/components/model-shop-tabs/index.vue
+++ b/src/components/model-shop-tabs/index.vue
@@ -25,13 +25,17 @@ const state = reactive({
// 如果需要解构,确保使用toRefs
const { form, new_style } = toRefs(state);
-const tabs_list = ref({
- content: {
- ...toRefs(form.value),
- ...toRefs(form.value.tabs_list[0]),
- },
- style: {
- ...toRefs(new_style.value),
+const tabs_list = ref({});
+
+watchEffect(() => {
+ tabs_list.value = {
+ content: {
+ ...toRefs(form.value),
+ ...toRefs(form.value.tabs_list[0]),
+ },
+ style: {
+ ...toRefs(new_style.value),
+ }
}
})
console.log(tabs_list.value);