mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 19:09:19 +08:00
refactor(frontend): 优化订单状态卡片和产品卡片的交互和样式
- OrderStatusCard 重构布局,按钮移到右上角,新增悬停阴影和圆角设计 - ProductCard 大幅重构 UI 样式,增强视觉层次和交互反馈 - 修复 TabBar / use-tabbar hooks 在特定场景下的状态同步问题 - CategoryFormModal / ProductFormModal 同步样式适配
This commit is contained in:
@@ -86,6 +86,17 @@ export function useTabs() {
|
||||
* @param tab
|
||||
*/
|
||||
function getTabDisableState(tab: RouteLocationNormalized = route) {
|
||||
if (!tab || typeof tab.path !== 'string') {
|
||||
return {
|
||||
disabledCloseAll: true,
|
||||
disabledCloseCurrent: true,
|
||||
disabledCloseLeft: true,
|
||||
disabledCloseOther: true,
|
||||
disabledCloseRight: true,
|
||||
disabledRefresh: true,
|
||||
};
|
||||
}
|
||||
|
||||
const tabs = tabbarStore.getTabs;
|
||||
const affixTabs = tabbarStore.affixTabs;
|
||||
const index = tabs.findIndex((item) => item.path === tab.path);
|
||||
|
||||
@@ -31,6 +31,9 @@ const {
|
||||
|
||||
const menus = computed(() => {
|
||||
const tab = tabbarStore.getTabByKey(currentActive.value);
|
||||
if (!tab || typeof tab.path !== 'string') {
|
||||
return [];
|
||||
}
|
||||
const menus = createContextMenus(tab);
|
||||
return menus.map((item) => {
|
||||
return {
|
||||
|
||||
@@ -133,6 +133,10 @@ export function useTabbar() {
|
||||
);
|
||||
|
||||
const createContextMenus = (tab: TabDefinition) => {
|
||||
if (!tab || typeof tab.path !== 'string') {
|
||||
return [];
|
||||
}
|
||||
|
||||
const {
|
||||
disabledCloseAll,
|
||||
disabledCloseCurrent,
|
||||
|
||||
Reference in New Issue
Block a user