Skip to content

Commit 643e8e6

Browse files
committed
fix: 🐛 修复微信小程序部分样式展示异常的问题
1 parent 96e2672 commit 643e8e6

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

pages.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
2-
import { appName } from './src/settings/index.mjs'
2+
import { appName, primaryColor } from './src/settings/index.mjs'
33

44
export default defineUniPages({
55
easycom: {
@@ -143,7 +143,7 @@ export default defineUniPages({
143143
],
144144
tabBar: {
145145
color: '#999999',
146-
selectedColor: '#018d71',
146+
selectedColor: primaryColor,
147147
backgroundColor: '#FFFFFF',
148148
list: [
149149
{

src/pages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
],
144144
"tabBar": {
145145
"color": "#999999",
146-
"selectedColor": "#018d71",
146+
"selectedColor": "#028d71",
147147
"backgroundColor": "#FFFFFF",
148148
"list": [
149149
{

src/pages/index/example/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const activeTabItem = computed(() => tabModel[tabIndex.value].children)
3434
<view class="h-full flex flex-col overflow-hidden">
3535
<view class="h-[--safe-top] flex-none uni-mp:mt-4"></view>
3636

37-
<view class="flex flex-none bg-white px-3 py-2 uni-mp:pr-[var(--safe-right)]">
37+
<view class="flex flex-none bg-white px-3 py-2 !uni-mp:pr-[var(--safe-right)]">
3838
<view v-for="(item, index) of tabModel" :key="index" class="h-10 w-0 flex flex-1 items-center justify-center rounded-lg" :class="[tabIndex === index ? 'bg-primary-50 text-primary-600 font-bold' : '']" @click="onTabClick(index)">
3939
{{ item.label }}
4040
</view>

src/pages/login/index.vue

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,23 @@ function onProjectClick() {
117117
</view>
118118
</view>
119119

120-
<view class="space-y-6">
121-
<button
122-
class="relative w-full overflow-hidden rounded-2xl from-primary-500 to-primary-400 bg-gradient-to-r px-6 py-4 font-semibold shadow-lg transition-all duration-200 active:scale-98 disabled:cursor-not-allowed !text-white disabled:opacity-70"
123-
:class="{ 'shadow-xl': !isLoading }"
124-
:disabled="isLoading"
125-
@click="onLoginClick"
126-
>
127-
<view class="flex items-center justify-center space-x-3">
128-
<view v-if="isLoading" class="i-carbon-fade h-5 w-5 animate-spin bg-white"></view>
129-
<view v-else class="i-carbon-phone h-5 w-5"></view>
130-
<text>{{ isLoading ? '登录中...' : '手机号快捷登录' }}</text>
131-
</view>
132-
133-
<view class="absolute inset-0 from-transparent via-white to-transparent bg-gradient-to-r opacity-0 transition-all duration-500 -translate-x-full group-active:translate-x-full group-active:opacity-20"></view>
134-
</button>
120+
<view class="space-y-4">
121+
<view class="">
122+
<button
123+
class="relative w-full overflow-hidden rounded-2xl from-primary-500 to-primary-400 bg-gradient-to-r px-6 py-4 font-semibold shadow-lg transition-all duration-200 active:scale-98 disabled:cursor-not-allowed !text-white disabled:opacity-70"
124+
:class="{ 'shadow-xl': !isLoading }"
125+
:disabled="isLoading"
126+
@click="onLoginClick"
127+
>
128+
<view class="flex items-center justify-center space-x-3">
129+
<view v-if="isLoading" class="i-carbon-fade h-5 w-5 animate-spin bg-white"></view>
130+
<view v-else class="i-carbon-phone h-5 w-5"></view>
131+
<text>{{ isLoading ? '登录中...' : '手机号快捷登录' }}</text>
132+
</view>
133+
134+
<view class="absolute inset-0 from-transparent via-white to-transparent bg-gradient-to-r opacity-0 transition-all duration-500 -translate-x-full group-active:translate-x-full group-active:opacity-20"></view>
135+
</button>
136+
</view>
135137

136138
<view class="flex items-center px-2 space-x-2">
137139
<view

0 commit comments

Comments
 (0)