Jialong Lu
Jialong Lu
Please make sure these boxes are checked before submitting your PR, thank you! * [x] Make sure you follow Element's contributing guide ([中文](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.md) | [English](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.en-US.md) | [Español](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.es.md) | [Français](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.fr-FR.md)). *...
```vue // 你的答案 import { ref, computed } from "vue" const count = ref(1) //const plusOne = computed(() => count.value + 1) const plusOne = computed({ get () { return...
```vue // 你的答案 defineProps({ type: { type: String, default: 'default', validator(val) { return ['primary' , 'ghost' , 'dashed' , 'link' , 'text' , 'default'].includes(val) } }, }) ```
```vue // 你的答案 ``` import { reactive, toRefs } from "vue" function useCount() { const state = reactive({ count: 0, }) function update(value: number) { state.count = value } return...
```vue // 你的答案 ``` ` import { ref, computed } from "vue" const theme = ref("red") const colors = ["blue", "yellow", "red", "green"] const computedTheme = computed(() => theme.value) setInterval(()...
```vue // 你的答案 import { ref, Binding, unref } from "vue" /** * Implement a custom directive * Create a two-way binding on a form input element * */ const...
```vue // 你的答案 import { ref, watchEffect, Binding, unref } from "vue" /** * Implement the custom directive * Make sure the list item text color changes to red when...
```vue // 你的答案 import { watch, customRef } from "vue" /** * Implement the function */ function useDebouncedRef(value, delay = 200) { let timer = null; return customRef((track, trigger) =>...