1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00

style: 优化代码格式与样式配置

1. 统一修复组件标签空格格式
2. 移除tabbar多余的scoped样式并内联样式类
3. 更新设置弹窗的z-index与确认按钮颜色
4. 简化恢复默认设置的提示文本
This commit is contained in:
小莫唐尼
2026-09-09 16:34:12 +08:00
parent 13fbbe8840
commit 1c9a4f5d46
3 changed files with 12 additions and 36 deletions
+3 -3
View File
@@ -20,10 +20,10 @@
<template>
<view>
<uh-global-actions>
<uh-scrolltop-button :fixed="false"/>
<uh-settings-button :fixed="false" @click="globalSettingsVisible = !globalSettingsVisible"/>
<uh-scrolltop-button :fixed="false" />
<uh-settings-button :fixed="false" @click="globalSettingsVisible = !globalSettingsVisible" />
</uh-global-actions>
<uh-settings-popup v-model="globalSettingsVisible" @close="globalSettingsVisible = false" />
<KuRootView />
@@ -3,6 +3,9 @@
import { useSettingStore } from '@/store/setting'
import { usePreferenceRows } from '@/hooks/usePreferenceRows'
import { useSettingsPopup } from '@/hooks/useSettingsPopup'
import { useDialog } from '@wot-ui/ui'
const dialog = useDialog()
const settingStore = useSettingStore()
@@ -49,11 +52,11 @@
function handleResetAll() {
uni.showModal({
title: '提示',
content: '确定将所有偏好恢复为站点默认吗?本地自定义的偏好将被清除,未配置站点默认的项将恢复为内置默认。',
content: '确定将所有偏好恢复为站点默认吗?',
showCancel: true,
cancelText: '取消',
confirmText: '确定',
confirmColor: '#03a9f4',
confirmColor: '#B9E424',
success: (res) => {
if (res.confirm) {
settingStore.resetPreferences()
@@ -69,12 +72,11 @@
function onOpen() {
emits('open')
}
</script>
<template>
<uh-glass-popup v-model="settingsPopupVisible" position="bottom" custom-class="rounded-xl !border"
safe-area-inset-bottom :z-index="99999" hide-when-close @close="onClose" @open="onOpen">
safe-area-inset-bottom :z-index="110" hide-when-close @close="onClose" @open="onOpen">
<view class="box-border px-3 pt-3">
<view class="mb-3 flex items-center justify-between">
<text class="text-md font-bold">偏好设置</text>
@@ -219,4 +221,4 @@
</view>
</view>
</uh-glass-popup>
</template>
</template>
+2 -28
View File
@@ -101,7 +101,7 @@
<template>
<view v-if="customTabbarEnable" class="h-56px pb-safe bg-page">
<view class="border-and-fixed w-full px-3">
<view class="box-border fixed bottom-3 z-100 w-full px-3">
<view class="flex box-border w-full items-center justify-between gap-x-2" @touchmove.stop.prevent>
<view
class="flex-1 box-border uh-global-card-glass bg-white/75 border rounded-full p-1 h-50px flex items-center gap-x-1">
@@ -120,30 +120,4 @@
<view class="pb-safe" />
</view>
</view>
</template>
<style scoped lang="scss">
.border-and-fixed {
position: fixed;
bottom: 24rpx;
z-index: 1000;
box-sizing: border-box;
}
// 中间鼓包的样式
.bulge {
position: absolute;
top: -20px;
left: 50%;
transform-origin: top center;
transform: translateX(-50%) scale(0.5) translateY(-33%);
display: flex;
justify-content: center;
align-items: center;
width: 250rpx;
height: 250rpx;
border-radius: 50%;
background-color: #fff;
box-shadow: inset 0 0 0 1px #fefefe;
}
</style>
</template>