上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 494 下一页
摘要: Example 1 Before function addEvent(ele, eventName, handler) { if (ele.addEventListener) { ele.addEventListener(eventName, handler); } else if (ele.att 阅读全文
posted @ 2024-12-03 03:33 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: let _globalThis: any export const getGlobalThis = (): any => { return ( _globalThis || (_globalThis = typeof globalThis !== 'undefined' ? globalThis : 阅读全文
posted @ 2024-12-02 15:05 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要: Introduction One of the first things that Vue developers often learn is the magic of using v-bind and v-on to supercharge their HTML with dynamic bind 阅读全文
posted @ 2024-12-02 01:57 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Introduction Slots allow developers to have the flexibility to provide content to a child component, but what happens when the child component has con 阅读全文
posted @ 2024-12-02 01:52 Zhentiw 阅读(65) 评论(0) 推荐(0)
摘要: Defining default content for a slot In the event that your component has content that works as a good default, this can be accomplished by defining th 阅读全文
posted @ 2024-12-02 01:40 Zhentiw 阅读(34) 评论(0) 推荐(0)
摘要: The Shortcomings of Most Prop Definitions In the last lesson, we learned how to create props that were well documented and helped to prevent common bu 阅读全文
posted @ 2024-12-02 01:27 Zhentiw 阅读(51) 评论(0) 推荐(0)
摘要: Mutating State Here’s where Pinia gets a bit… controversial. Pinia allows us to mutate state in a variety of ways, letting us decide where and when we 阅读全文
posted @ 2024-12-02 01:14 Zhentiw 阅读(54) 评论(0) 推荐(0)
摘要: When company's API become huge and always changing, if request-busis maintained by developers manually, it's not only time consuming but also error pr 阅读全文
posted @ 2024-12-01 18:57 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: Idempotency is a mathematical concept often abstracted as: f(n) = 1n, no matter what's the value of n, f(n) alwayhs equals 1 In network requests, many 阅读全文
posted @ 2024-12-01 17:42 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: Usage of a cached request: const req = createCacheRequestor(); req.get('/a') // request req.get('/a') // use cache req.get('/b') // request req.get('/ 阅读全文
posted @ 2024-12-01 17:32 Zhentiw 阅读(19) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 494 下一页