wp

Results 2 issues of wp

题目的意思应该是:plusOne 始终比count大1,plusOne可以改,如果改成100,那么count应该是99 ```vue import { ref, computed } from "vue" const count = ref(1) const plusOne = computed({ get: () => count.value+1, set: (val) =>{ count.value = val-1 return val...

answer
zh-CN

```vue import { ref } from "vue" function useLocalStorage(key: string, initialValue: any) { const save = window.localStorage.getItem(key) const value = ref(save??initialValue) watchEffect(()=>{ window.localStorage.setItem(key,value.value) }) return value } const counter =...

answer
zh-CN