wip: 项目重构临时提交
This commit is contained in:
1 parent
5c6241e9be
commit
805078fd1a
8 files changed
+574
-188
No files matched your search
Vendored
+8
@@ -19,16 +19,24 @@ declare module 'vue' {
|
||||
QiunLoading: typeof import('./src/components/qiun-loading/qiun-loading.vue')['default']
|
||||
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
|
||||
WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
|
||||
WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
|
||||
WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default']
|
||||
WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default']
|
||||
WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default']
|
||||
WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default']
|
||||
WdGridItem: typeof import('wot-design-uni/components/wd-grid-item/wd-grid-item.vue')['default']
|
||||
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
|
||||
WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default']
|
||||
WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default']
|
||||
WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default']
|
||||
WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
|
||||
WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
|
||||
WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default']
|
||||
WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
|
||||
WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
|
||||
WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
|
||||
WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default']
|
||||
WdSwitch: typeof import('wot-design-uni/components/wd-switch/wd-switch.vue')['default']
|
||||
WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
|
||||
WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
|
||||
WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default']
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="关于我们" left-arrow @click-left="handleBack" />
|
||||
|
||||
<!-- 顶部信息区域 -->
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<wd-card>
|
||||
<view class="flex items-center p-2">
|
||||
<wd-img width="60px" height="60px" src="/static/logo.png" mode="aspectFit" class="mr-4" />
|
||||
<view class="flex-1">
|
||||
@@ -66,11 +63,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
const version = ref("1.0.0");
|
||||
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
const getYear = () => {
|
||||
return new Date().getFullYear();
|
||||
};
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="账号和安全" left-arrow @click-left="handleBack" />
|
||||
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<wd-card>
|
||||
<wd-cell-group border>
|
||||
<wd-cell
|
||||
title="账户密码"
|
||||
@@ -213,11 +211,6 @@ const mobileTimer = ref<ReturnType<typeof setInterval> | null>(null);
|
||||
const emailCountdown = ref(0);
|
||||
const emailTimer = ref<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
// 处理返回按钮点击
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
/** 加载用户信息 */
|
||||
const loadUserProfile = async () => {
|
||||
userProfile.value = await UserAPI.getProfile();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="用户协议" left-arrow @click-left="handleBack" />
|
||||
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<wd-card>
|
||||
<view class="flex-col-center py-4">
|
||||
<text class="text-xl font-bold mb-2">用户协议</text>
|
||||
<text class="text-sm text-gray-500">更新日期:2024年3月15日</text>
|
||||
@@ -64,11 +62,6 @@ const agreementContent = [
|
||||
},
|
||||
];
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 同意协议
|
||||
const handleAgree = () => {
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="设置" left-arrow @click-left="handleBack" />
|
||||
|
||||
<wd-cell-group custom-style="margin-top: 20rpx">
|
||||
<wd-cell-group>
|
||||
<wd-cell v-if="isLogin" title="个人资料" icon="user" is-link @click="navigateToProfile" />
|
||||
<wd-cell
|
||||
v-if="isLogin"
|
||||
@@ -192,11 +190,6 @@ const handleLogout = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 检查登录状态
|
||||
onLoad(() => {
|
||||
getCacheSize();
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="网络测试" left-arrow @click-left="handleBack" />
|
||||
|
||||
<!-- 网络状态展示 -->
|
||||
<wd-card title="网络状态" custom-style="margin: 20rpx">
|
||||
<wd-card>
|
||||
<wd-cell-group border>
|
||||
<wd-cell title="网络状态">
|
||||
<wd-tag :type="networkType ? 'success' : 'danger'" size="small">
|
||||
@@ -181,11 +179,6 @@ const startTest = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 生命周期钩子
|
||||
onMounted(() => {
|
||||
getNetworkType();
|
||||
|
||||
@@ -1,231 +1,644 @@
|
||||
<template>
|
||||
<!-- 内容区域 -->
|
||||
<view class="app-container">
|
||||
<wd-navbar title="主题设置" left-arrow @click-left="handleBack" />
|
||||
|
||||
<view class="theme-settings-container">
|
||||
<!-- 页面标题 -->
|
||||
<wd-card custom-class="page-header">
|
||||
<view class="page-header">
|
||||
<text class="page-title">主题设置</text>
|
||||
<view class="page-subtitle">个性化您的应用外观</view>
|
||||
</wd-card>
|
||||
|
||||
<!-- 暗黑模式设置 -->
|
||||
<wd-card class="mb-3">
|
||||
<view class="flex-between py-2">
|
||||
<text>暗黑模式</text>
|
||||
<wd-switch :model-value="theme === 'dark'" @change="toggleTheme" />
|
||||
</view>
|
||||
</wd-card>
|
||||
<!-- 主题色选择 -->
|
||||
<wd-card title="主题色" class="mb-3">
|
||||
<view class="color-grid">
|
||||
<view
|
||||
v-for="item in colorColumns"
|
||||
:key="item.value"
|
||||
class="color-item"
|
||||
:class="{ active: currentThemeColor === item.value }"
|
||||
@click="setThemeColor(item.value)"
|
||||
>
|
||||
<view class="color-box" :style="{ backgroundColor: item.value }">
|
||||
<wd-icon v-if="currentThemeColor === item.value" name="check" size="16" color="#fff" />
|
||||
</view>
|
||||
<text class="color-label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</wd-card>
|
||||
<!-- 自定义颜色 -->
|
||||
<wd-card class="mb-3">
|
||||
<view class="flex-between items-center py-2" @click="showCustomColorPopup = true">
|
||||
<view class="flex-start gap-2 items-center">
|
||||
<wd-icon name="edit" size="20" :color="currentThemeColor" />
|
||||
<text>自定义颜色</text>
|
||||
</view>
|
||||
<view class="flex-start gap-2 items-center">
|
||||
<view class="color-box small" :style="{ backgroundColor: currentThemeColor }"></view>
|
||||
<text class="text-sm text-gray-500">{{ currentThemeColor }}</text>
|
||||
<wd-icon name="arrow-right" size="14" color="#999" />
|
||||
</view>
|
||||
</view>
|
||||
</wd-card>
|
||||
<!-- 预览效果 -->
|
||||
<wd-card title="预览效果" class="mb-3">
|
||||
<view class="py-2">
|
||||
<view class="flex-start gap-2">
|
||||
<wd-button type="primary" size="small">主要按钮</wd-button>
|
||||
<wd-button type="primary" plain size="small">次要按钮</wd-button>
|
||||
<wd-tag type="primary">标签</wd-tag>
|
||||
</view>
|
||||
</view>
|
||||
</wd-card>
|
||||
<!-- 重置按钮 -->
|
||||
<view class="mt-5 mx-3">
|
||||
<wd-button plain block @click="handleReset">恢复默认</wd-button>
|
||||
<text class="page-subtitle">个性化您的应用外观</text>
|
||||
</view>
|
||||
|
||||
<!-- 自定义颜色弹窗 -->
|
||||
<wd-popup v-model="showCustomColorPopup" position="bottom" closeable>
|
||||
<view class="custom-color-popup">
|
||||
<view class="text-center mb-5"><text class="text-lg font-bold">自定义主题色</text></view>
|
||||
<view class="mb-5">
|
||||
<view class="color-preview-large" :style="{ backgroundColor: customColor }"></view>
|
||||
<wd-input v-model="customColor" placeholder="请输入颜色值,如 #FF6B6B" clearable />
|
||||
<text class="input-tip">支持 HEX 格式颜色值</text>
|
||||
<!-- 暗黑模式设置 -->
|
||||
<wd-card class="setting-section">
|
||||
<view class="section-header">
|
||||
<wd-icon name="moon" size="20" :color="theme === 'dark' ? '#FFD700' : '#666'" />
|
||||
<text class="section-title">外观模式</text>
|
||||
</view>
|
||||
<wd-cell title="暗黑模式" :value="theme === 'dark' ? '已开启' : '已关闭'">
|
||||
<wd-switch :model-value="theme === 'dark'" @change="handleToggleDarkMode" />
|
||||
</wd-cell>
|
||||
</wd-card>
|
||||
|
||||
<!-- 主题色设置 -->
|
||||
<wd-card class="setting-section">
|
||||
<view class="section-header">
|
||||
<wd-icon name="palette" size="20" color="#666" />
|
||||
<text class="section-title">主题色彩</text>
|
||||
</view>
|
||||
|
||||
<!-- 预设颜色选择 -->
|
||||
<view class="color-section">
|
||||
<text class="color-label">预设主题色</text>
|
||||
<view class="color-grid">
|
||||
<view
|
||||
v-for="(color, index) in themeColorOptions"
|
||||
:key="index"
|
||||
class="color-item"
|
||||
:class="{ active: currentThemeColor === color.primary }"
|
||||
@click="handleSelectColor(color)"
|
||||
>
|
||||
<view
|
||||
class="color-preview"
|
||||
:style="{
|
||||
backgroundColor: color.primary,
|
||||
border:
|
||||
currentThemeColor === color.primary ? '3px solid #fff' : '1px solid #e0e0e0',
|
||||
}"
|
||||
>
|
||||
<text v-if="currentThemeColor === color.primary" class="check-icon">✓</text>
|
||||
</view>
|
||||
<text class="color-name">{{ color.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex gap-2">
|
||||
<wd-button type="info" block @click="showCustomColorPopup = false">取消</wd-button>
|
||||
<wd-button type="primary" block @click="applyCustomColor">应用</wd-button>
|
||||
</view>
|
||||
|
||||
<!-- 当前主题色显示 -->
|
||||
<view class="current-theme-section">
|
||||
<view class="current-theme-item">
|
||||
<text class="current-theme-label">当前主题色</text>
|
||||
<view class="current-theme-value">
|
||||
<view
|
||||
class="current-color-preview"
|
||||
:style="{ backgroundColor: currentThemeColor }"
|
||||
></view>
|
||||
<text class="current-color-text">{{ currentThemeColor }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自定义颜色 -->
|
||||
<wd-cell title="自定义颜色" is-link @click="showCustomInput">
|
||||
<wd-icon name="edit" size="16" color="#999" />
|
||||
</wd-cell>
|
||||
</wd-card>
|
||||
|
||||
<!-- 预览区域 -->
|
||||
<wd-card class="setting-section">
|
||||
<view class="section-header">
|
||||
<wd-icon name="eye" size="20" color="#666" />
|
||||
<text class="section-title">效果预览</text>
|
||||
</view>
|
||||
|
||||
<wd-divider />
|
||||
|
||||
<wd-grid :column="2" border>
|
||||
<wd-grid-item>
|
||||
<wd-button type="primary" size="small">主要按钮</wd-button>
|
||||
</wd-grid-item>
|
||||
<wd-grid-item>
|
||||
<text class="preview-text" :style="{ color: currentThemeColor }">主题色文本</text>
|
||||
</wd-grid-item>
|
||||
<wd-grid-item>
|
||||
<view class="preview-border" :style="{ borderColor: currentThemeColor }">主题色边框</view>
|
||||
</wd-grid-item>
|
||||
<wd-grid-item>
|
||||
<wd-tag type="primary" size="small">标签</wd-tag>
|
||||
</wd-grid-item>
|
||||
</wd-grid>
|
||||
</wd-card>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<wd-card class="action-section">
|
||||
<wd-button type="info" size="large" block @click="handleResetTheme">重置为默认主题</wd-button>
|
||||
</wd-card>
|
||||
|
||||
<!-- 自定义颜色输入弹窗 -->
|
||||
<wd-popup v-model="showCustomColorInput" position="bottom" :safe-area-inset-bottom="true">
|
||||
<view class="custom-color-popup">
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">自定义主题色</text>
|
||||
<wd-icon name="close" size="20" color="#999" @click="showCustomColorInput = false" />
|
||||
</view>
|
||||
|
||||
<wd-divider />
|
||||
|
||||
<view class="color-input-section">
|
||||
<view class="input-label">请输入十六进制颜色值</view>
|
||||
<view class="input-container">
|
||||
<view class="color-preview-small" :style="{ backgroundColor: customColor }"></view>
|
||||
<wd-input
|
||||
v-model="customColor"
|
||||
placeholder="例如: #165DFF"
|
||||
:maxlength="7"
|
||||
class="color-input"
|
||||
/>
|
||||
</view>
|
||||
<view class="input-tip">支持格式:#RGB 或 #RRGGBB</view>
|
||||
</view>
|
||||
|
||||
<wd-divider />
|
||||
|
||||
<view class="popup-actions">
|
||||
<wd-button type="info" size="large" @click="showCustomColorInput = false">取消</wd-button>
|
||||
<wd-button type="primary" size="large" @click="applyCustomColor">应用</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { useTheme } from "@/composables/useTheme";
|
||||
import { useTheme, themeColorOptions } from "@/composables/useTheme";
|
||||
|
||||
const { theme, currentThemeColor, colorColumns, toggleTheme, setThemeColor, resetTheme } =
|
||||
useTheme();
|
||||
const { theme, themeVars, toggleTheme, selectThemeColor } = useTheme();
|
||||
|
||||
// 自定义颜色相关
|
||||
const showCustomColorPopup = ref(false);
|
||||
const customColor = ref(currentThemeColor.value);
|
||||
// 自定义颜色输入
|
||||
const customColor = ref("");
|
||||
const showCustomColorInput = ref(false);
|
||||
|
||||
// 动态设置页面标题
|
||||
onLoad(() => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "主题设置",
|
||||
});
|
||||
// 当前选中的主题色
|
||||
const currentThemeColor = computed(() => {
|
||||
return themeVars.colorTheme || themeColorOptions[0].primary;
|
||||
});
|
||||
|
||||
// 选择预设颜色
|
||||
const handleSelectColor = (color: (typeof themeColorOptions)[0]) => {
|
||||
selectThemeColor(color);
|
||||
customColor.value = color.primary;
|
||||
|
||||
// 提示
|
||||
uni.showToast({
|
||||
title: "主题色已更新",
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
});
|
||||
};
|
||||
|
||||
// 显示自定义颜色输入
|
||||
const showCustomInput = () => {
|
||||
showCustomColorInput.value = true;
|
||||
customColor.value = currentThemeColor.value;
|
||||
};
|
||||
|
||||
// 应用自定义颜色
|
||||
const applyCustomColor = () => {
|
||||
const colorRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
||||
|
||||
// 验证颜色格式
|
||||
const colorRegex = /^#([0-9A-F]{6}|[0-9A-F]{3})$/i;
|
||||
if (!colorRegex.test(customColor.value)) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的颜色格式",
|
||||
title: "请输入有效的颜色值",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
setThemeColor(customColor.value);
|
||||
showCustomColorPopup.value = false;
|
||||
// 转换3位颜色值为6位
|
||||
let color = customColor.value;
|
||||
if (color.length === 4) {
|
||||
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3];
|
||||
}
|
||||
|
||||
// 创建自定义主题色选项
|
||||
const customColorOption = {
|
||||
name: "自定义",
|
||||
value: "custom",
|
||||
primary: color,
|
||||
};
|
||||
|
||||
selectThemeColor(customColorOption);
|
||||
showCustomColorInput.value = false;
|
||||
|
||||
// 提示
|
||||
uni.showToast({
|
||||
title: "主题色已更新",
|
||||
title: "自定义主题色已应用",
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
});
|
||||
};
|
||||
|
||||
// 重置主题
|
||||
const handleReset = () => {
|
||||
// 重置为默认主题
|
||||
const handleResetTheme = () => {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确定要恢复默认主题吗?",
|
||||
title: "确认重置",
|
||||
content: "确定要重置为默认主题吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
resetTheme();
|
||||
customColor.value = currentThemeColor.value;
|
||||
selectThemeColor(themeColorOptions[0]);
|
||||
customColor.value = themeColorOptions[0].primary;
|
||||
|
||||
uni.showToast({
|
||||
title: "已恢复默认",
|
||||
title: "已重置为默认主题",
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 处理返回按钮点击
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
// 切换暗黑模式
|
||||
const handleToggleDarkMode = () => {
|
||||
toggleTheme();
|
||||
nextTick(() => {
|
||||
uni.showToast({
|
||||
title: `已切换到${theme.value === "dark" ? "暗黑" : "浅色"}模式`,
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 页面显示时更新自定义颜色值
|
||||
onShow(() => {
|
||||
onLoad(() => {
|
||||
// 初始化自定义颜色输入框
|
||||
customColor.value = currentThemeColor.value;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// 初始化自定义颜色输入框
|
||||
customColor.value = currentThemeColor.value;
|
||||
});
|
||||
|
||||
// 页面显示时确保主题色同步
|
||||
onShow(() => {
|
||||
customColor.value = currentThemeColor.value;
|
||||
console.log("主题设置页面显示,当前主题:", {
|
||||
mode: theme.value,
|
||||
color: currentThemeColor.value,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.theme-settings-container {
|
||||
min-height: 100vh;
|
||||
padding: 20rpx;
|
||||
background-color: var(--wot-color-bg-light, #f8f9fa);
|
||||
transition: background-color 0.3s ease;
|
||||
|
||||
// 强制 Wot 组件应用暗黑模式样式
|
||||
:deep(.wd-card) {
|
||||
background: var(--wot-card-bg-color, #fff);
|
||||
border-radius: 16rpx;
|
||||
box-shadow: var(--wot-card-shadow, 0 2rpx 12rpx rgba(0, 0, 0, 0.05));
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
:deep(.wd-cell) {
|
||||
color: var(--wot-color-text, #333);
|
||||
background-color: var(--wot-card-bg-color, #fff);
|
||||
|
||||
.wd-cell__title {
|
||||
color: var(--wot-color-text, #333) !important;
|
||||
}
|
||||
|
||||
.wd-cell__value {
|
||||
color: var(--wot-color-text-secondary, #666) !important;
|
||||
}
|
||||
|
||||
.wd-cell__right-icon {
|
||||
color: var(--wot-color-text-secondary, #999) !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.wd-grid-item) {
|
||||
color: var(--wot-color-text, #333) !important;
|
||||
background-color: var(--wot-card-bg-color, #fff) !important;
|
||||
}
|
||||
|
||||
// 专门为颜色预览块重置背景色
|
||||
:deep(.color-item) {
|
||||
background-color: transparent !important;
|
||||
|
||||
.color-preview {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.wd-button) {
|
||||
&[type="primary"] {
|
||||
color: #fff !important;
|
||||
background-color: var(--wot-color-theme, #165dff) !important;
|
||||
}
|
||||
|
||||
&[type="info"] {
|
||||
color: #fff !important;
|
||||
background-color: var(--wot-color-info, #909399) !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.wd-input) {
|
||||
color: var(--wot-color-text, #333) !important;
|
||||
background-color: var(--wot-card-bg-color, #fff) !important;
|
||||
}
|
||||
|
||||
:deep(.wd-popup) {
|
||||
background-color: var(--wot-popup-bg-color, #fff) !important;
|
||||
}
|
||||
|
||||
.custom-color-popup {
|
||||
padding: 40rpx 30rpx;
|
||||
background: var(--wot-popup-bg-color, #fff);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.page-header {
|
||||
padding: 40rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, var(--wot-color-theme) 0%, var(--primary-color-light) 100%);
|
||||
background: linear-gradient(135deg, var(--wot-color-theme, #165dff) 0%, #667eea 100%);
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
.page-title {
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.page-subtitle {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.page-subtitle {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.setting-section {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx 30rpx 20rpx;
|
||||
border-bottom: 1rpx solid var(--wot-color-border, #f0f0f0);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin-left: 12rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: var(--wot-color-text, #333);
|
||||
}
|
||||
|
||||
.color-section {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.color-label {
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--wot-color-text-secondary, #666);
|
||||
}
|
||||
|
||||
.color-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 24rpx 20rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.color-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
align-items: center;
|
||||
padding: 8rpx;
|
||||
justify-content: center;
|
||||
width: calc(25% - 15rpx);
|
||||
padding: 10rpx;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.active .color-box {
|
||||
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.15);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.color-box {
|
||||
.color-preview {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-bottom: 8rpx;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
&.small {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.check-icon {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 22rpx;
|
||||
line-height: 1.2;
|
||||
color: var(--wot-color-text-secondary, #666);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.active .color-preview {
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
&:active .color-preview {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.current-theme-section {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.current-theme-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.current-theme-label {
|
||||
font-size: 28rpx;
|
||||
color: var(--wot-color-text-secondary, #666);
|
||||
}
|
||||
|
||||
.current-theme-value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.current-color-preview {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border: 2rpx solid var(--wot-color-border, #f0f0f0);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.current-color-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.preview-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.preview-border {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--wot-color-text-secondary, #666);
|
||||
border: 2rpx solid;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.action-section {
|
||||
:deep(.wd-card) {
|
||||
padding: 30rpx;
|
||||
background: var(--wot-card-bg-color, #fff);
|
||||
border-radius: 16rpx;
|
||||
box-shadow: var(--wot-card-shadow, 0 2rpx 12rpx rgba(0, 0, 0, 0.05));
|
||||
}
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: var(--wot-color-text, #333);
|
||||
}
|
||||
|
||||
.color-input-section {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--wot-color-text-secondary, #666);
|
||||
}
|
||||
|
||||
.input-container {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.color-preview-small {
|
||||
flex-shrink: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border: 2rpx solid var(--wot-color-border, #f0f0f0);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.color-input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.input-tip {
|
||||
margin-left: 80rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--wot-color-text-placeholder, #999);
|
||||
}
|
||||
|
||||
.popup-actions {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
/* 响应式布局 */
|
||||
@media (max-width: 750rpx) {
|
||||
.color-grid {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600rpx) {
|
||||
.color-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
// 全局暗黑模式适配(针对当前页面)
|
||||
:global([data-theme="dark"]) .theme-settings-container {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
background-color: var(--wot-color-bg, #1a1a1a) !important;
|
||||
|
||||
.page-header {
|
||||
background: linear-gradient(135deg, var(--wot-color-theme, #165dff) 0%, #4a5568 100%);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
}
|
||||
|
||||
.color-label {
|
||||
font-size: 22rpx;
|
||||
color: var(--wot-color-text-secondary);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
color: var(--wot-color-text-secondary, #d1d5db) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-color-popup {
|
||||
padding: 40rpx 30rpx;
|
||||
background-color: var(--wot-color-bg-container);
|
||||
.preview-text {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
}
|
||||
|
||||
.color-preview-large {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
margin-bottom: 30rpx;
|
||||
border: 2rpx solid var(--wot-color-border);
|
||||
border-radius: 16rpx;
|
||||
.preview-border {
|
||||
color: var(--wot-color-text-secondary, #d1d5db) !important;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
color: var(--wot-color-text-secondary, #d1d5db) !important;
|
||||
}
|
||||
|
||||
.input-tip {
|
||||
display: block;
|
||||
margin-top: 15rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--wot-color-text-placeholder);
|
||||
text-align: center;
|
||||
color: var(--wot-color-text-placeholder, #9ca3af) !important;
|
||||
}
|
||||
|
||||
:deep(.wd-card) {
|
||||
background: var(--wot-card-bg-color, #2a2a2a) !important;
|
||||
}
|
||||
|
||||
:deep(.wd-cell) {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
background-color: var(--wot-card-bg-color, #2a2a2a) !important;
|
||||
|
||||
.wd-cell__title {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
}
|
||||
|
||||
.wd-cell__value {
|
||||
color: var(--wot-color-text-secondary, #d1d5db) !important;
|
||||
}
|
||||
|
||||
.wd-cell__right-icon {
|
||||
color: var(--wot-color-text-secondary, #9ca3af) !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.wd-grid-item) {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
background-color: var(--wot-card-bg-color, #2a2a2a) !important;
|
||||
}
|
||||
|
||||
// 专门为颜色预览块重置背景色
|
||||
:deep(.color-item) {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
:deep(.wd-input) {
|
||||
color: var(--wot-color-text, #fff) !important;
|
||||
background-color: var(--wot-card-bg-color, #2a2a2a) !important;
|
||||
}
|
||||
|
||||
:deep(.wd-popup) {
|
||||
background-color: var(--wot-popup-bg-color, #2a2a2a) !important;
|
||||
}
|
||||
|
||||
.custom-color-popup {
|
||||
background: var(--wot-popup-bg-color, #2a2a2a) !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Submodule
+1
Submodule youlai-boot added at f62dcb57e3.
Reference in new issue
Block a user