mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🐛 Fix(custom): fix an issue setting copy format will result ui collapse
This commit is contained in:
@@ -157,8 +157,8 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="radio-group">
|
||||
<label v-for="item in pasteFormatList" :key="item" class="radio-option">
|
||||
<input v-model="form.pasteFormat" type="radio" :value="item" class="radio-input" />
|
||||
<label v-for="item in pasteFormatList" :key="`format-${item}`" class="radio-option">
|
||||
<input v-model="form.pasteFormat" type="radio" :value="item" class="radio-input" :name="'paste-format'" />
|
||||
<span class="radio-custom" />
|
||||
<span class="radio-text">
|
||||
{{ t(`pages.manage.setting.copyFormat.${item}`) }}
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { FolderIcon, Trash2Icon } from 'lucide-vue-next'
|
||||
import { onBeforeMount, ref, watch } from 'vue'
|
||||
import { nextTick, onBeforeMount, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import useConfirm from '@/hooks/useConfirm'
|
||||
@@ -261,7 +261,10 @@ const pasteFormatList = ['markdown', 'markdown-with-link', 'rawurl', 'html', 'bb
|
||||
settingsKeys.forEach(key => {
|
||||
watch(
|
||||
() => form.value[key],
|
||||
newValue => saveConfig({ [`settings.${key}`]: newValue }),
|
||||
newValue => {
|
||||
saveConfig({ [`settings.${key}`]: newValue })
|
||||
},
|
||||
{ flush: 'post' },
|
||||
)
|
||||
})
|
||||
|
||||
@@ -337,6 +340,7 @@ async function initData() {
|
||||
settingsKeys.forEach(key => {
|
||||
form.value[key] = config.settings[key] ?? form.value[key]
|
||||
})
|
||||
await nextTick() // 确保DOM更新完成
|
||||
}
|
||||
|
||||
async function handleDownloadDirClick() {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* Container */
|
||||
.manage-setting-container {
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
overflow-y: scroll;
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
box-sizing: border-box;
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
/* Card Base */
|
||||
.setting-card {
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--color-border-secondary);
|
||||
border-radius: var(--radius-xl);
|
||||
background: var(--color-surface);
|
||||
@@ -144,11 +143,7 @@
|
||||
}
|
||||
|
||||
/* Setting sections with reduced spacing */
|
||||
.setting-section {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
.setting-section + .setting-section {
|
||||
margin-top: 1rem;
|
||||
@@ -157,11 +152,6 @@
|
||||
}
|
||||
|
||||
/* Form Groups */
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.form-label-wrapper {
|
||||
display: flex;
|
||||
@@ -276,9 +266,12 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
min-height: fit-content;
|
||||
}
|
||||
|
||||
.radio-option {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border);
|
||||
@@ -288,6 +281,8 @@
|
||||
transition: var(--transition-fast);
|
||||
gap: 0.75rem;
|
||||
cursor: pointer;
|
||||
min-height: 2.5rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.radio-option:hover {
|
||||
@@ -297,8 +292,13 @@
|
||||
|
||||
.radio-input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.radio-custom {
|
||||
@@ -333,12 +333,6 @@
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
}
|
||||
|
||||
.radio-text {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Input Groups */
|
||||
.input-group {
|
||||
display: flex;
|
||||
@@ -357,6 +351,8 @@
|
||||
padding: 0.75rem 1rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
width: 10%;
|
||||
min-width: 80px;
|
||||
color: white;
|
||||
background: var(--color-accent);
|
||||
transition: var(--transition-fast);
|
||||
@@ -470,6 +466,35 @@
|
||||
background: var(--color-surface-elevated);
|
||||
}
|
||||
|
||||
.setting-section {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-direction: column;
|
||||
min-height: fit-content;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.radio-text {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
line-height: 1.4;
|
||||
overflow-wrap: break-word;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.setting-card.content-card {
|
||||
min-height: fit-content;
|
||||
contain: layout style;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (width <= 768px) {
|
||||
.manage-setting-container {
|
||||
|
||||
Reference in New Issue
Block a user