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:
+2
-2
@@ -20,8 +20,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<uh-global-actions>
|
<uh-global-actions>
|
||||||
<uh-scrolltop-button :fixed="false"/>
|
<uh-scrolltop-button :fixed="false" />
|
||||||
<uh-settings-button :fixed="false" @click="globalSettingsVisible = !globalSettingsVisible"/>
|
<uh-settings-button :fixed="false" @click="globalSettingsVisible = !globalSettingsVisible" />
|
||||||
</uh-global-actions>
|
</uh-global-actions>
|
||||||
|
|
||||||
<uh-settings-popup v-model="globalSettingsVisible" @close="globalSettingsVisible = false" />
|
<uh-settings-popup v-model="globalSettingsVisible" @close="globalSettingsVisible = false" />
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
import { useSettingStore } from '@/store/setting'
|
import { useSettingStore } from '@/store/setting'
|
||||||
import { usePreferenceRows } from '@/hooks/usePreferenceRows'
|
import { usePreferenceRows } from '@/hooks/usePreferenceRows'
|
||||||
import { useSettingsPopup } from '@/hooks/useSettingsPopup'
|
import { useSettingsPopup } from '@/hooks/useSettingsPopup'
|
||||||
|
import { useDialog } from '@wot-ui/ui'
|
||||||
|
|
||||||
|
const dialog = useDialog()
|
||||||
|
|
||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
|
|
||||||
@@ -49,11 +52,11 @@
|
|||||||
function handleResetAll() {
|
function handleResetAll() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定将所有偏好恢复为站点默认吗?本地自定义的偏好将被清除,未配置站点默认的项将恢复为内置默认。',
|
content: '确定将所有偏好恢复为站点默认吗?',
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
confirmText: '确定',
|
confirmText: '确定',
|
||||||
confirmColor: '#03a9f4',
|
confirmColor: '#B9E424',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
settingStore.resetPreferences()
|
settingStore.resetPreferences()
|
||||||
@@ -69,12 +72,11 @@
|
|||||||
function onOpen() {
|
function onOpen() {
|
||||||
emits('open')
|
emits('open')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<uh-glass-popup v-model="settingsPopupVisible" position="bottom" custom-class="rounded-xl !border"
|
<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="box-border px-3 pt-3">
|
||||||
<view class="mb-3 flex items-center justify-between">
|
<view class="mb-3 flex items-center justify-between">
|
||||||
<text class="text-md font-bold">偏好设置</text>
|
<text class="text-md font-bold">偏好设置</text>
|
||||||
|
|||||||
+1
-27
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view v-if="customTabbarEnable" class="h-56px pb-safe bg-page">
|
<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 box-border w-full items-center justify-between gap-x-2" @touchmove.stop.prevent>
|
||||||
<view
|
<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">
|
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">
|
||||||
@@ -121,29 +121,3 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</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>
|
|
||||||
Reference in New Issue
Block a user