fix: expanded

This commit is contained in:
mattyatea 2024-02-01 00:06:46 +09:00
parent 121ee723d9
commit 9d62381d03
3 changed files with 11 additions and 12 deletions

View file

@ -49,7 +49,6 @@ const props = withDefaults(defineProps<{
const rootEl = shallowRef<HTMLDivElement>();
const bg = ref<string>();
const showBody = ref((props.persistKey && miLocalStorage.getItem(`${miLocalStoragePrefix}${props.persistKey}`)) ? (miLocalStorage.getItem(`${miLocalStoragePrefix}${props.persistKey}`) === 't') : props.expanded);
watch(showBody, () => {
if (props.persistKey) {
miLocalStorage.setItem(`${miLocalStoragePrefix}${props.persistKey}`, showBody.value ? 't' : 'f');