diff --git a/src/components/footer-nav/footer-nav-content.vue b/src/components/footer-nav/footer-nav-content.vue index 78823346..838505dc 100644 --- a/src/components/footer-nav/footer-nav-content.vue +++ b/src/components/footer-nav/footer-nav-content.vue @@ -28,82 +28,28 @@
图片建议宽高80*80,鼠标拖拽左侧圆点可调整导航顺序
@@ -142,16 +88,6 @@ const props = defineProps({ }); const form = ref(props.value); const emit = defineEmits(['update:value']); -const not_drag_list = ref([]); -const drag_list = ref([]); -onBeforeMount(() => { - // 先将数组拆分成两个数组 - const data = form.value.nav_content; - not_drag_list.value = [{...data[0] }]; - drag_list.value = data.splice(1); - // 为确保数据渲染,将两个数组合并成原有数组,确保数据渲染正常 - form.value.nav_content = not_drag_list.value.concat(drag_list.value); -}); // 导航样式change事件 const nav_style_change = (style: any) => { form.value.nav_style = style; @@ -163,23 +99,13 @@ const nav_type_change = (type: any) => { emit('update:value', form.value); }; // data_list移除事件 -const nav_content_remove = (index: number, type?: string) => { - if (type === 'not-drag') { - form.value.nav_content.splice(index + 1, 1); - } else { - form.value.nav_content.splice(index, 1); - } +const nav_content_remove = (index: number) => { + form.value.nav_content.splice(index, 1); emit('update:value', form.value); }; // 拖拽排序事件 -const on_sort = (item: any[], type?: string) => { - if (type === 'not-drag') { - item.forEach((item1: any, index: number) => { - form.value.nav_content[index + 1] = item1; - }); - } else { - form.value.nav_content = item; - } +const on_sort = (item: any) => { + form.value.nav_content = item; }; // 添加导航 const add = () => { @@ -221,19 +147,4 @@ const reset_event = () => { width: 100%; height: 100%; } -.link-disabled { - background: #f5f5f5; - color: #999; - border-radius: 0px; -} -.card-background { - background: #fff; - padding-left: 1.6rem; - padding-right: 2rem; - border-radius: 4px; -} - -.cursor-move { - color: #ddd; -}