vr-uniapp/src/views/layout/components/main/default/tabs.ts

69 lines
2.2 KiB
TypeScript
Raw Normal View History

2024-09-13 09:15:23 +00:00
import { get_math } from '@/utils';
import defaultCommon from './index';
interface tabs_page {
id: string;
title: string;
desc: string;
data_type: string;
classify: object;
micro_page: string;
2024-09-13 09:15:23 +00:00
micro_page_list: object;
category_list: object;
}
interface defaultTabs {
content: {
2024-08-26 10:56:19 +00:00
tabs_theme: string;
2024-09-05 05:58:21 +00:00
tabs_top_up: string;
2024-09-14 09:29:59 +00:00
home_data: tabs_page;
tabs_list: tabs_page[];
};
style: {
2024-08-26 10:56:19 +00:00
tabs_checked: color_list[];
tabs_direction: string;
2024-09-13 09:15:23 +00:00
tabs_weight_checked: string;
tabs_size_checked: number;
tabs_color_checked: string;
tabs_weight: string;
tabs_size: number;
tabs_color: string;
2024-08-30 06:20:10 +00:00
tabs_spacing: number;
common_style: object;
};
}
const defaultTabs: defaultTabs = {
content: {
2024-08-26 10:56:19 +00:00
tabs_theme: '0',
2024-09-05 05:58:21 +00:00
tabs_top_up: '1',
2024-09-14 09:29:59 +00:00
home_data: { id: get_math(), title: '首页', desc: '简介', data_type: '0', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
tabs_list: [
2024-09-14 09:29:59 +00:00
{ id: get_math(), title: '热门推荐', desc: '简介', data_type: '0', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
2024-09-14 06:53:52 +00:00
{ id: get_math(), title: '测试一', desc: '简介', data_type: '0', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
{ id: get_math(), title: '测试二', desc: '简介', data_type: '0', classify: {}, micro_page: '', micro_page_list: {}, category_list: {} },
2024-09-13 09:15:23 +00:00
],
},
style: {
2024-09-13 09:15:23 +00:00
tabs_checked: [
{ color: '#FF2222', color_percentage: undefined },
{ color: '#FF9898', color_percentage: undefined },
],
tabs_direction: '90deg',
tabs_weight_checked: '500',
tabs_size_checked: 14,
tabs_color_checked: 'rgba(51,51,51,1)',
tabs_weight: '500',
tabs_size: 14,
tabs_color: 'rgba(51,51,51,1)',
2024-08-30 06:20:10 +00:00
tabs_spacing: 20,
common_style: {
...defaultCommon,
2024-08-26 09:21:38 +00:00
padding: 10,
padding_top: 10,
padding_bottom: 10,
padding_left: 10,
padding_right: 10,
2024-09-13 09:15:23 +00:00
},
},
};
2024-09-13 09:15:23 +00:00
export default defaultTabs;