diff --git a/src/components/base/qrcode/index.vue b/src/components/base/qrcode/index.vue
index 8875974f..11b87e79 100644
--- a/src/components/base/qrcode/index.vue
+++ b/src/components/base/qrcode/index.vue
@@ -20,7 +20,6 @@
diff --git a/src/components/model-search/model-search-styles.vue b/src/components/model-search/model-search-styles.vue
index 388818a0..bc2c4a41 100644
--- a/src/components/model-search/model-search-styles.vue
+++ b/src/components/model-search/model-search-styles.vue
@@ -61,11 +61,16 @@
diff --git a/src/components/page-settings/page-content.vue b/src/components/page-settings/page-content.vue
index 8452ced1..c627415b 100644
--- a/src/components/page-settings/page-content.vue
+++ b/src/components/page-settings/page-content.vue
@@ -5,17 +5,51 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- {{ item.name }}
+ {{item.name }}
@@ -44,8 +78,10 @@ const base_list = reactive({
{ name: '隐藏', value: '0' },
],
});
-const themeChange = (value: string) => {
- console.log(value);
+
+const emit = defineEmits(['update:change-theme']);
+const themeChange = (val: string) => {
+ emit('update:change-theme', val);
};
diff --git a/src/components/page-settings/page-setting.vue b/src/components/page-settings/page-setting.vue
index 4489b1e8..7921a4f0 100644
--- a/src/components/page-settings/page-setting.vue
+++ b/src/components/page-settings/page-setting.vue
@@ -1,10 +1,10 @@
@@ -19,4 +19,138 @@ const props = defineProps({
default: () => ({}),
},
});
+const default_config = {
+ style: {
+ theme_1: {
+ header_background_type: 'color_image',
+ header_background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ header_background_direction: '180deg',
+ header_background_img_style: 2,
+ header_background_img_url: [],
+ header_background_title_color: '#000',
+ header_background_title_typeface: '500',
+ header_background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ icon_color: '#ccc',
+ button_inner_color: '#fff',
+ color_list: [{ color: '#FF973D', color_percentage: undefined }, { color: '#FF3131', color_percentage: undefined }],
+ direction: '90deg',
+ background_img_style: '',
+ background_img_url: [],
+ search_button_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
+ tips_color: '#ccc',
+ hot_words_color: '#000',
+ search_border: '#fff',
+ search_border_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
+ },
+ theme_2: {
+ header_background_type: 'color_image',
+ header_background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ header_background_direction: '180deg',
+ header_background_img_style: 2,
+ header_background_img_url: [],
+ header_background_title_color: '#000',
+ header_background_title_typeface: '500',
+ header_background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ icon_color: '#ccc',
+ button_inner_color: '#fff',
+ color_list: [{ color: '#FF973D', color_percentage: undefined }, { color: '#FF3131', color_percentage: undefined }],
+ direction: '90deg',
+ background_img_style: '',
+ background_img_url: [],
+ search_button_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
+ tips_color: '#ccc',
+ hot_words_color: '#000',
+ search_border: '#fff',
+ search_border_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
+ },
+ theme_3: {
+ background_type: 'color_image',
+ background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ background_direction: '180deg',
+ background_img_style: 2,
+ background_img_url: [],
+ background_title_color: '#000',
+ background_title_typeface: '500',
+ background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ },
+ theme_4: {
+ background_type: 'color_image',
+ background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ background_direction: '180deg',
+ background_img_style: 2,
+ background_img_url: [],
+ background_title_color: '#000',
+ background_title_typeface: '500',
+ background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ },
+ theme_5: {
+ background_type: 'color_image',
+ background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ background_direction: '180deg',
+ background_img_style: 2,
+ background_img_url: [],
+ background_title_color: '#000',
+ background_title_typeface: '500',
+ background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ },
+ theme_6: {
+ background_type: 'color_image',
+ background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ background_direction: '180deg',
+ background_img_style: 2,
+ background_img_url: [],
+ background_title_color: '#000',
+ background_title_typeface: '500',
+ background_title_size: 14,
+ function_buttons_type: 'black',
+ immersive_style: false,
+ up_slide_display: true,
+ },
+ },
+};
+const form = ref(props.value);
+const change_theme = (val: string) => {
+ if (val) {
+ form.value.style = Object.assign({}, form.value.style, (default_config.style)[`theme_${Number(val)}`]);
+ }
+};
diff --git a/src/components/page-settings/page-styles.vue b/src/components/page-settings/page-styles.vue
index d0ef97c6..e45f2f5a 100644
--- a/src/components/page-settings/page-styles.vue
+++ b/src/components/page-settings/page-styles.vue
@@ -1,6 +1,6 @@
-
+
头部样式
@@ -15,13 +15,19 @@
背景图
-
+
+
+
-
+
+
+
-
+
+
+
@@ -53,6 +59,10 @@
+
+
+
+
@@ -64,6 +74,10 @@ const props = defineProps({
return {};
},
},
+ content: {
+ type: Object,
+ default: () => { },
+ },
});
const emit = defineEmits(['update:value']);
// 默认值
diff --git a/src/layout/components/main/default/header-nav.ts b/src/layout/components/main/default/header-nav.ts
index 91d69cbe..5daefbef 100644
--- a/src/layout/components/main/default/header-nav.ts
+++ b/src/layout/components/main/default/header-nav.ts
@@ -1,44 +1,121 @@
+import { get_math } from '@/utils';
import defaultCommon from './index';
-
+interface hot_word_list {
+ id: string;
+ value: string;
+ color: string;
+}
interface DefaultFooterNav {
content: {
theme: string;
+ logo: uploadList[];
title: string;
+ link: object;
+ indicator_location: string;
bottom_navigation_show: string;
+ is_center: boolean;
+ is_icon_show: boolean;
+ icon_src: string;
+ icon_img_src: uploadList[];
+ icon_class: string;
+ search_botton_src: uploadList[];
+ search_botton_icon: string;
+ is_tips_show: boolean;
+ tips: string;
+ is_search_show: boolean;
+ search_type: string;
+ search_tips: string;
+ hot_word_list: hot_word_list[];
};
style: {
- background_type: string;
- background_color_list: color_list[];
- background_direction: string;
- background_img_style: number;
- background_img_url: uploadList[];
- background_title_color: string,
- background_title_typeface: string,
- background_title_size: number,
+ header_background_type: string;
+ header_background_color_list: color_list[];
+ header_background_direction: string;
+ header_background_img_style: number;
+ header_background_img_url: uploadList[];
+ header_background_title_color: string,
+ header_background_title_typeface: string,
+ header_background_title_size: number,
function_buttons_type: string,
immersive_style: boolean,
up_slide_display: boolean,
+ icon_color: string;
+ button_inner_color: string;
+ color_list: color_list[];
+ direction: string;
+ background_img_style: string;
+ background_img_url: uploadList[];
+ search_button_radius: object;
+ tips_color: string;
+ hot_words_color: string;
+ search_border: string;
+ search_border_radius: object;
common_style: object;
}
}
const defaultFooterNav: DefaultFooterNav = {
content: {
theme: '1',
+ logo: [],
title: '',
+ link: {},
+ indicator_location: 'center',
+ is_center: false,
+ is_icon_show: true,
+ icon_src: '',
+ icon_img_src: [],
+ icon_class: '',
+ search_botton_src: [],
+ search_botton_icon: '',
+ is_tips_show: true,
+ tips: '请输入搜索内容',
+ is_search_show: false,
+ search_type: 'text',
+ search_tips: '搜索',
+ hot_word_list: [
+ {
+ id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
+ value: '',
+ color: '#000000',
+ }
+ ],
bottom_navigation_show: '1'
},
style: {
- background_type: 'color_image',
- background_color_list: [{ color: '#fff', color_percentage: undefined }],
- background_direction: '180deg',
- background_img_style: 2,
- background_img_url: [],
- background_title_color: '#000',
- background_title_typeface: '500',
- background_title_size: 14,
+ header_background_type: 'color_image',
+ header_background_color_list: [{ color: '#fff', color_percentage: undefined }],
+ header_background_direction: '180deg',
+ header_background_img_style: 2,
+ header_background_img_url: [],
+ header_background_title_color: '#000',
+ header_background_title_typeface: '500',
+ header_background_title_size: 14,
function_buttons_type: 'black',
immersive_style: false,
up_slide_display: true,
+ icon_color: '#ccc',
+ button_inner_color: '#fff',
+ color_list: [{ color: '#FF973D', color_percentage: undefined }, { color: '#FF3131', color_percentage: undefined }],
+ direction: '90deg',
+ background_img_style: '',
+ background_img_url: [],
+ search_button_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
+ tips_color: '#ccc',
+ hot_words_color: '#000',
+ search_border: '#fff',
+ search_border_radius: {
+ radius: 16,
+ radius_top_left: 16,
+ radius_top_right: 16,
+ radius_bottom_left: 16,
+ radius_bottom_right: 16,
+ },
common_style: defaultCommon,
},
};