diff --git a/check_tags.py b/check_tags.py new file mode 100644 index 00000000..cc70e230 --- /dev/null +++ b/check_tags.py @@ -0,0 +1,25 @@ +import os + +def check_tags(file_path): + print(f"Checking {file_path}") + try: + content = open(file_path, 'r', encoding='utf-8').read() + tags = ['template', 'script', 'style', 'view', 'text', 'image', 'scroll-view'] + for tag in tags: + o = content.count(f'<{tag}') + c = content.count(f'') + if o != c: + print(f" [ERROR] {tag}: open={o}, close={c}") + else: + print(f" [OK] {tag}: {o}") + except Exception as e: + print(f" [ERROR] Failed to read: {e}") + +files = [ + r'd:\骅锋\mall\pages\mall\admin\order\order-statistics\index.uvue', + r'd:\骅锋\mall\pages\mall\admin\order\list.uvue', + r'd:\骅锋\mall\pages\mall\admin\order\order-configuration\index.uvue' +] + +for f in files: + check_tags(f) diff --git a/find_tags.py b/find_tags.py new file mode 100644 index 00000000..6d81937f --- /dev/null +++ b/find_tags.py @@ -0,0 +1,27 @@ +import re + +def find_mismatched_text_tags(file_path): + with open(file_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + + stack = [] + print(f"Scanning {file_path}...") + for i, line in enumerate(lines): + # Use a better regex to find opening and closing tags separately + open_tags = re.findall(r'', line) + + for _ in open_tags: + stack.append(i + 1) + for _ in close_tags: + if stack: + stack.pop() + else: + print(f" Extra closing tag at line {i+1}") + + for line_num in stack: + print(f" Unclosed tag at line {line_num}") + +find_mismatched_text_tags(r'd:\骅锋\mall\pages\mall\admin\order\order-configuration\index.uvue') +find_mismatched_text_tags(r'd:\骅锋\mall\pages\mall\admin\order\order-statistics\index.uvue') +find_mismatched_text_tags(r'd:\骅锋\mall\pages\mall\admin\order\list.uvue') diff --git a/layouts/admin/AdminLayout.uvue b/layouts/admin/AdminLayout.uvue index 8cd9562a..0f8ecc18 100644 --- a/layouts/admin/AdminLayout.uvue +++ b/layouts/admin/AdminLayout.uvue @@ -57,12 +57,14 @@ @tab-close="onTabClose" @close-other="onCloseOther" @close-all="onCloseAll" + @refresh="onRefresh" /> - + + @@ -77,6 +79,7 @@ import AdminSubSider from '@/layouts/admin/components/AdminSubSider.uvue' import AdminHeader from '@/layouts/admin/components/AdminHeader.uvue' import AdminTagsView from '@/layouts/admin/components/AdminTagsView.uvue' import AdminFooter from '@/layouts/admin/components/AdminFooter.uvue' +import AdminPageLoading from '@/layouts/admin/components/AdminPageLoading.uvue' import { getTopMenus, @@ -117,6 +120,9 @@ import { getComponent } from '@/layouts/admin/router/adminComponentMap.uts' const ASIDE_W = 70 const SUB_W = 200 +// 页面加载状态 +const isPageLoading = ref(false) + const hasNotification = ref(false) /** @@ -251,6 +257,12 @@ const currentComponent = computed(() => { // 监听路由变化,同步状态 (处理从 Tabs 或外部跳转的情况) watch(() => activeRouteId.value, (newId) => { + // 触发页面加载动画 + isPageLoading.value = true + setTimeout(() => { + isPageLoading.value = false + }, 400) // 给予足够的时间让异步组件加载 + const route = findRouteById(newId) if (route && route.parentId) { // 同步一级菜单 @@ -399,7 +411,7 @@ onMounted(() => { flex-direction: row; width: 100%; min-height: 100vh; - background: #f5f7f9; + background: #f0f2f5; position: relative; } @@ -443,7 +455,7 @@ onMounted(() => { flex-direction: column; min-height: 100vh; transition: margin-left 300ms ease; - background: #f5f7f9; + background: #f0f2f5; width: 100%; } @@ -473,13 +485,15 @@ onMounted(() => { flex: 1; overflow-y: scroll; overflow-x: auto; /* 允许横向滚动,兼容极端窄屏 */ - background: #f5f7f9; + background: #f0f2f5; + padding: 0; } .content-inner { min-height: calc(100vh - 120px); - padding: 12px 14px; + padding: 12px; } + .content-inner.is-mobile { padding: 8px; } diff --git a/layouts/admin/components/AdminAside.uvue b/layouts/admin/components/AdminAside.uvue index 9a2db126..b2870425 100644 --- a/layouts/admin/components/AdminAside.uvue +++ b/layouts/admin/components/AdminAside.uvue @@ -52,7 +52,8 @@ function getIconText(icon: string): string { 'user': '👥', 'product': '📦', 'order': '📜', - 'marketing': '📉', 'share': '📢', 'content': '📝', + 'marketing': '📉', + 'content': '📝', 'finance': '💰', 'statistic': '📊', 'setting': '⚙️', diff --git a/layouts/admin/components/AdminPageLoading.uvue b/layouts/admin/components/AdminPageLoading.uvue new file mode 100644 index 00000000..40f74422 --- /dev/null +++ b/layouts/admin/components/AdminPageLoading.uvue @@ -0,0 +1,53 @@ + + + + + diff --git a/layouts/admin/pages/HomeIndex.uvue b/layouts/admin/pages/HomeIndex.uvue index 8d06963c..0b16eabe 100644 --- a/layouts/admin/pages/HomeIndex.uvue +++ b/layouts/admin/pages/HomeIndex.uvue @@ -225,8 +225,9 @@ const statsData = ref({ - diff --git a/pages/mall/admin/cms/category/list.uvue b/pages/mall/admin/cms/category/list.uvue index 00ebd37c..86e75809 100644 --- a/pages/mall/admin/cms/category/list.uvue +++ b/pages/mall/admin/cms/category/list.uvue @@ -1,39 +1,39 @@ -