fix: expanded
This commit is contained in:
parent
121ee723d9
commit
9d62381d03
3 changed files with 11 additions and 12 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue