1.代码优化

v1.0.0
sws 2024-09-13 17:15:23 +08:00
parent c6ca2709a4
commit 9d4f415ab2
1 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,5 @@
import { get_math } from "@/utils"; import { get_math } from '@/utils';
import defaultCommon from "./index"; import defaultCommon from './index';
interface tabs_page { interface tabs_page {
id: string; id: string;
title: string; title: string;
@ -7,8 +7,8 @@ interface tabs_page {
data_type: string; data_type: string;
classify: object; classify: object;
micro_page: string; micro_page: string;
micro_page_list: string[]; micro_page_list: object;
category_list: string[]; category_list: object;
} }
interface defaultTabs { interface defaultTabs {
content: { content: {
@ -19,12 +19,12 @@ interface defaultTabs {
style: { style: {
tabs_checked: color_list[]; tabs_checked: color_list[];
tabs_direction: string; tabs_direction: string;
tabs_weight_checked: string, tabs_weight_checked: string;
tabs_size_checked: number, tabs_size_checked: number;
tabs_color_checked: string, tabs_color_checked: string;
tabs_weight: string, tabs_weight: string;
tabs_size: number, tabs_size: number;
tabs_color: string, tabs_color: string;
tabs_spacing: number; tabs_spacing: number;
common_style: object; common_style: object;
}; };
@ -34,13 +34,16 @@ const defaultTabs: defaultTabs = {
tabs_theme: '0', tabs_theme: '0',
tabs_top_up: '1', tabs_top_up: '1',
tabs_list: [ tabs_list: [
{ id: get_math(), title: '热门推荐', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: [], category_list: [] }, { id: get_math(), title: '热门推荐', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
{ id: get_math(), title: '测试一', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: [], category_list: [] }, { id: get_math(), title: '测试一', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
{ id: get_math(), title: '测试二', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: [], category_list: [] }, { id: get_math(), title: '测试二', desc: '简介', data_type: 'micro_page', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
] ],
}, },
style: { style: {
tabs_checked: [{ color: '#FF2222', color_percentage: undefined }, { color: '#FF9898', color_percentage: undefined }], tabs_checked: [
{ color: '#FF2222', color_percentage: undefined },
{ color: '#FF9898', color_percentage: undefined },
],
tabs_direction: '90deg', tabs_direction: '90deg',
tabs_weight_checked: '500', tabs_weight_checked: '500',
tabs_size_checked: 14, tabs_size_checked: 14,
@ -56,8 +59,8 @@ const defaultTabs: defaultTabs = {
padding_bottom: 10, padding_bottom: 10,
padding_left: 10, padding_left: 10,
padding_right: 10, padding_right: 10,
} },
}, },
}; };
export default defaultTabs; export default defaultTabs;