从嘉

Results 16 issues of 从嘉

```vue // your answers import { ref } from "vue" const count = ref(2) setInterval(() => { count.value++ console.log(count.value) }, 1000) Make it never change: {{ count }} ```

answer
en
12

```vue // your answers import { ref, computed, watch, watchEffect, effectScope } from "vue" const scope = effectScope() const counter = ref(1) const doubled = computed(() => counter.value * 2)...

answer
en
8

```vue // your answers import { reactive, isReactive,toRaw, markRaw } from "vue" const state = { count: 1 } const reactiveState = reactive(state) /** * Modify the code so that...

answer
en
7

```vue // your answers defineProps({ type: { default: 'default', validator(value) { return ['primary', 'ghost', 'dashed', 'link', 'text', 'default'].includes(value) } }, }) Button ```

answer
en
323

```vue // your answers const click1 = () => { console.log('click1') } const click2 = (e) => { console.log('click2', e) // e.stopPropagation() } click me ```

answer
en
243

```vue // your answers import { ref } from "vue" const theme = ref("red") const colors = ["blue", "yellow", "red", "green"] setInterval(() => { theme.value = colors[Math.floor(Math.random() * 4)] },...

answer
en
14

```vue // your answers const msg = "Hello World" {{ msg }} ```

answer
en
13

```vue // your answers import { ref, nextTick } from "vue" const count = ref(0) const counter = ref(null) function increment() { count.value++ /** * DOM is not yet updated,...

answer
en
11

```vue // your answers import { onMounted, inject, onUnmounted } from "vue" const timer = inject("timer") const count = inject("count") onMounted(() => { timer.value = window.setInterval(() => { count.value++ },...

answer
en
10

```vue // your answers // Add a piece of code to make the `count` value get injected into the child component. import { inject } from "vue" const count =...

answer
en
9