mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-22 02:17:28 +08:00
fix(settings): show admin dropdown defaults
This commit is contained in:
@@ -61,6 +61,10 @@ export default {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.base-input:focus-within {
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
.base-input-icon {
|
.base-input-icon {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(open, async val => {
|
const loadOptions = async () => {
|
||||||
if (val && !loaded.value) {
|
if (loaded.value) return
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const res = await props.fetchOptions()
|
const res = await props.fetchOptions()
|
||||||
@@ -117,10 +117,16 @@ export default {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(open, async val => {
|
||||||
|
if (val && !loaded.value) {
|
||||||
|
await loadOptions()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener('click', clickOutside)
|
document.addEventListener('click', clickOutside)
|
||||||
|
loadOptions()
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user