mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-11 03:18:54 +08:00
style(theme): 统一应用主题样式并更新组件样式变量
- 在多个页面组件中添加动态主题样式绑定 - 将硬编码的颜色值替换为CSS变量和主题配置 - 引入主题样式计算逻辑到各个页面 - 更新优惠券、地址、订单等页面的主题适配 - 替换线性渐变背景为动态主题颜色 - 移除uni_modules组件中的$set方法调用以优化性能 - 更新README中主题色管理状态为已完成
This commit is contained in:
@@ -98,7 +98,7 @@ page {
|
||||
}
|
||||
> .sort-btn-confim {
|
||||
color: #fff;
|
||||
background-image: linear-gradient(90deg, #ff6b35, #ff9f28, #ffcc03);
|
||||
background-image: linear-gradient(90deg, $main-color, $light-color, $aider-light-color);
|
||||
}
|
||||
}
|
||||
.uinput {
|
||||
@@ -328,7 +328,7 @@ page {
|
||||
flex-shrink: 0;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(to right, #ff9801, #ff570a);
|
||||
background: linear-gradient(to right, $main-color, $aider-light-color);
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="content" :class="{ 'content--goods': isShowSeachGoods }">
|
||||
<view class="content" :class="{ 'content--goods': isShowSeachGoods }" :style="themeStyle">
|
||||
<u-navbar
|
||||
:bg-color="navObj.background"
|
||||
:auto-back="false"
|
||||
@@ -260,9 +260,13 @@ import goodsList from '@/components/m-goods-list/list.vue'
|
||||
import { getHotKeywords } from '@/api/home.js'
|
||||
import mSearch from '@/components/m-search-revision/m-search-revision.vue'
|
||||
import storage from '@/utils/storage'
|
||||
import { getThemeStyle } from '@/utils/theme'
|
||||
|
||||
const store = useStore()
|
||||
|
||||
// 注入主题色 CSS 变量,商品价格、排序选中态、标签等随之联动
|
||||
const themeStyle = computed(() => getThemeStyle(store.state.theme))
|
||||
|
||||
const mSearchRef = ref<any>(null)
|
||||
|
||||
const empty = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user