随笔分类 -  Vue

摘要:Navigation is triggered using Vue Router when a <router-link> is clicked, but also can be triggered programmatically from inside our code. In this les 阅读全文
posted @ 2024-11-26 03:53 Zhentiw 阅读(6) 评论(0) 推荐(0) 编辑
摘要:Often when building web applications we need to be able to perform multiple actions (View, Edit, Register) for a single resource (Event). Each URL pro 阅读全文
posted @ 2024-11-26 03:46 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要:As our application evolves, we may need to change the URL paths of where our pages initially found. There are two convenience methods for this: ⚠️ Pro 阅读全文
posted @ 2024-11-26 03:45 Zhentiw 阅读(9) 评论(0) 推荐(0) 编辑
摘要:Problem: How do we read query parameters off the URL? For example, often when we write pagination, we might have a URL that looks like this: http://ex 阅读全文
posted @ 2024-11-25 15:40 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要:Need to follow some rules: Each folder should has a page.js configuration to save the meta data. // page.js export default { title: "About", menuOrder 阅读全文
posted @ 2024-11-24 20:13 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要:It is not good to import axios from each Components or different services, because it will create a new instance of axios everytime. import axios from 阅读全文
posted @ 2024-11-24 03:49 Zhentiw 阅读(3) 评论(0) 推荐(0) 编辑
摘要:Sometime when doing thing is harder in template syntax, you can switch to using render function intead. For example, we have s Stackcomponent, it dyna 阅读全文
posted @ 2024-11-23 22:21 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要:For component level authority controls, we need to find a common partten so that we can extract a common component to handle the permission control in 阅读全文
posted @ 2024-11-19 15:38 Zhentiw 阅读(3) 评论(0) 推荐(0) 编辑
摘要:export enum EffectFlags { /** * ReactiveEffect only */ ACTIVE = 1 << 0, RUNNING = 1 << 1, TRACKING = 1 << 2, NOTIFIED = 1 << 3, DIRTY = 1 << 4, ALLOW_ 阅读全文
posted @ 2024-11-19 02:51 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要:import {computed} from "vue" export function useComputed(fn) { const map = new Map() return function(...args) { const key = JSON.stringify(args); if ( 阅读全文
posted @ 2024-10-22 15:01 Zhentiw 阅读(21) 评论(0) 推荐(0) 编辑
摘要:<template> <div> count: {{ count }} </div> <div> doubled: {{ doubledCount }} </div> <button @click="increase">increase</button> </template> <script se 阅读全文
posted @ 2024-10-07 15:06 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要:how to encapsulate second time of ui components For example we have follow code, with one UI component MyInput // App.vue <template> <div> <MyInput></ 阅读全文
posted @ 2024-10-06 01:06 Zhentiw 阅读(7) 评论(0) 推荐(0) 编辑
摘要:We often see circular dependency, why it's a problem, why we should avoid it and hwo to avoid it? Let's see any example first // main.js import A from 阅读全文
posted @ 2024-10-05 20:16 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Let's say we have a Vue application that renders many heavy components on the first load. The problem we're facing is a long white screen period while 阅读全文
posted @ 2024-09-15 20:49 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要:One way data binding, the parent component pasing data through v-modelto child component, if child modify the data, v-modelwill take care emit the cha 阅读全文
posted @ 2024-08-25 19:51 Zhentiw 阅读(62) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-05-02 04:02 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-05-02 03:40 Zhentiw 阅读(0) 评论(0) 推荐(0) 编辑
摘要:Even by using modules, they still share the same namespace. So you couldn’t have the same mutation name in different modules. Namespaces solve that by 阅读全文
posted @ 2019-04-29 13:26 Zhentiw 阅读(1950) 评论(0) 推荐(0) 编辑
摘要:Sometimes we need to create modules at runtime, for example depending on a condition. We could even want to lazy load that module by using Webpack’s c 阅读全文
posted @ 2019-04-28 16:28 Zhentiw 阅读(408) 评论(0) 推荐(0) 编辑
摘要:When the Vuex store grows, it can have many mutations, actions and getters, belonging to different contexts. Vuex allows you to split your store into 阅读全文
posted @ 2019-04-28 16:17 Zhentiw 阅读(577) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示