Murphy Chen

Results 5 issues of Murphy Chen

- 考察自定义指令以及相应的指令参数传递 - 注意第一次点击是立即生效的 - 更多:https://github.com/Hacker-C/solutions-for-vuejs-challenges ```vue const VDebounceClick = { // binding 获取指令相关参数 // 参考文档:https://staging-cn.vuejs.org/guide/reusability/custom-directives.html#directive-hooks mounted: (el: HTMLElement, binding: { value: Function; arg: number }) => { el.addEventListener('click', debounce(binding.value,...

answer
zh-CN
20

- basic composables(hooks) - 简单的自定义组合式函数 - More: [my solutions for vuejs-challenges](https://github.com/Hacker-C/solutions-for-vuejs-challenges) ```vue import { Ref, ref } from 'vue' /** * Implement a composable function that toggles the state *...

answer
en
15

- the basic usage of effectScope API, you can learn it in [vue3 docs effectScope](https://vuejs.org/api/reactivity-advanced.html#effectscope). **Be careful with the asynchronous, make sure `scoped.top` task is in asynchronous tasks queue with...

answer
en
8

- Prop Validation(Props 类型校验) - Vue3 docs: https://vuejs.org/guide/components/props.html#prop-validation - More: https://github.com/Hacker-C/solutions-for-vuejs-challenges Button.vue: ```vue // - Prop Validation(Props 类型校验) // - Vue3 docs: https://vuejs.org/guide/components/props.html#prop-validation defineProps({ type: { default: 'default', required: false,...

answer
en
323

- Handling v-model modifiers(自定义 v-model 修饰符) - Vue3 docs: https://vuejs.org/guide/components/events.html#handling-v-model-modifiers - Vue SFC link: [Vue 305 - Capitalize](https://sfc.vuejs.org/#eNp9U72O00AQfpWRKeyIZM2JzkoiEIp0SJxEAWnOFMYeO3uyd1e76xwQRUKiQLwCDRUUCB20VLzMnTjegtl1HHMouibO/H3zfTOzm+ChUmzdYpAEU5NrriwYtK2ap4I3SmoLG9BYwhZKLRsIKTXch5aPhWrtLsLiznRolJJLYSyss7pFmDmIKAxHqZjGXRfCJ8Nio+rMIlkA0x2cfa1wlgYWX9k0gPWkkQXWLM8Ut1nN37iYh6VgTIXT+B+UYBx03CZNptiZkYKEbRx6uguYNEjAe5yPuDo7DVbWKpPEsSlzJ+DMMKmrmP4x3QrLG2RomslLLc8NagJOAwexTcWWWg7C/x8j1JmonBgqIHpxDNdv3119/3T9/uvVxcfLnx96fXD56+LP5x+/v33xWceZKGouqn2YfnnJURsfXrZ4HwqZmwR64gPpquUFxrkkuQKFNTGu3YetbFPfaU1W4eSc29VkB92vSmmpDK2qwJILfOqsqZ+Tz1q6iSdgrCZWe+9Jz4pG6gqztrYJRCOYzWGz9eOZR7T1rgM23O4bLMgw0WnYqoJWlwxNwhdUULYit1wKX+PdEXVfOCGjbns1DtcVIbOZrsiTGTh+dvLE72NRY+PyWXctVMNLiLxMdpP9aThcF7Xvz6OH919map5jdG8MRyNm5XOlUD/KDJLYuzcyjoi+vwzw5KMDCsddASVS2m0vgh94EA+8k+z9aMiZeEByDl0OPo/tXwBNaUo=) - more: [My solutions for vuejs-challenges](https://github.com/Hacker-C/solutions-for-vuejs-challenges) App.vue: ```vue import { ref }...

answer
en
305