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);