上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 499 下一页
摘要: When we code up Vue apps we use API calls a lot to load in back-end data. When we are waiting for this API data to load, it’s a good user interface pr 阅读全文
posted @ 2024-11-29 20:26 Zhentiw 阅读(73) 评论(0) 推荐(0)
摘要: 📄 /composables/use-promise.js import { ref } from "@vue/composition-api"; export default function usePromise(fn) { // fn is the actual API call const 阅读全文
posted @ 2024-11-29 20:22 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: == 从上到下按照规则比较,直到能够得到确切结果为止:1. 两端存在 NaN,返回 false2. undefined 和 null 只有与自身比较,或者互相比较时,才会返回 true,和其他原始类型比较返回 false3. 两端类型相同,比较值4. 两端都是原始类型,转换成数字重新比较 5. 一端 阅读全文
posted @ 2024-11-29 15:32 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: Table of content Use key Feeze object Use composition function (Vue2) Use computed lazy v-model v-model 保持对象引用稳定 Use v-show instead of v-if defer keep 阅读全文
posted @ 2024-11-29 15:19 Zhentiw 阅读(44) 评论(0) 推荐(0)
摘要: Watch Let’s look at another simple example using our composition API. Here’s some code that has a simple search input box, uses the search text to cal 阅读全文
posted @ 2024-11-28 21:48 Zhentiw 阅读(37) 评论(0) 推荐(0)
摘要: In Vue 3’s Composition API we can create callback hooks inside setup() by adding on to the LifeCycle method name: import { onBeforeMount, onMounted, o 阅读全文
posted @ 2024-11-28 21:34 Zhentiw 阅读(71) 评论(0) 推荐(0)
摘要: U+200B: Zero-width space Used for soft line breaks in long words. U+FEFF: Zero-width non-breaking space Prevents line breaks at specific positions. U+ 阅读全文
posted @ 2024-11-28 01:09 Zhentiw 阅读(115) 评论(0) 推荐(0)
摘要: Let's say on the page we have some heavy component need to be render when page load. <template> <div class="container"> <div v-for="n in 100"> <heavy- 阅读全文
posted @ 2024-11-28 00:59 Zhentiw 阅读(40) 评论(0) 推荐(0)
摘要: If we have multi composition functions: <template> ... </template> <script> import useEventSpace from "@/use/event-space"; import useMapping from "@/u 阅读全文
posted @ 2024-11-27 23:07 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: import {reactive, computed} from "vue" export default { setup() { const event = reactive({ capacity: 4, attending: ["Tim", "Bob"], spacesLeft: compute 阅读全文
posted @ 2024-11-27 23:02 Zhentiw 阅读(39) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 499 下一页